Skip to main content

MCP servers

The Model Context Protocol (MCP) is an open standard for giving an agent extra tools — a database it can query, an issue tracker it can read, a company API. Pathvela supports MCP servers, so you can extend the agent with capabilities beyond its built-in tools.

How it works

You declare MCP servers in a JSON config file. When the agent starts in that project, it connects to the servers you've listed and their tools become available to it, alongside the built-in ones. Each external tool shows up namespaced as mcp__<server>__<tool>, so it's always clear where a tool came from.

Configuring servers

Add an .mcp.json file. Pathvela reads it from several locations, project-first:

LocationScope
.mcp.jsonProject (this repo)
.lily/mcp.jsonProject
~/.lily/mcp.jsonGlobal (all projects)

A config lists your servers and how to launch each one:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "ghp_..."
      }
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgres://localhost/mydb"]
    }
  }
}

Commit a project .mcp.json to share the same servers with your team; keep personal ones in ~/.lily/mcp.json.

Enabling and disabling

A server you don't want running right now can stay in the config but be left disabled — it stays declared without being launched, so you can flip it back on later without re-writing the entry. The agent can also reconnect and reload servers itself while it works, so a config change doesn't always mean restarting.

Pathvela configures MCP through the file above — there's no /mcp slash command in the terminal UI. Edit the JSON, and the servers are picked up.

Security

MCP servers run with whatever access you give them — credentials in env, network reach, local commands. Only add servers you trust, and treat the tokens in an .mcp.json like any other secret: keep them out of version control (use your global ~/.lily/mcp.json, or environment references) rather than committing them.

See also