Documentation Navigation
configure

Model Context Protocol Support

Expand the tools available to your agents by connecting external Model Context Protocol (MCP) servers.

#Local MCP Servers

Run local tools by adding a subprocess command:

json
{
  "mcp": {
    "sqlite-tools": {
      "type": "local",
      "command": ["npx", "-y", "@modelcontextprotocol/server-sqlite"],
      "environment": {
        "DB_PATH": "./data.db"
      }
    }
  }
}

#Remote MCP Servers

Connect to servers over HTTP/SSE:

json
{
  "mcp": {
    "remote-search": {
      "type": "remote",
      "url": "https://mcp.example.com",
      "headers": {
        "Authorization": "Bearer MY_KEY"
      }
    }
  }
}

#OAuth & Authentication

Codey supports OAuth PKCE flow for remote MCP servers. When a remote server returns a 401, Codey automatically opens your browser to log in, and saves tokens in ~/.local/share/codey/mcp-auth.json.