Connecting a Client
Every example uses https://<your-discover-host>/mcp — replace it with your deployment’s endpoint. See Introduction to MCP for how to get it.
Claude Code (CLI)
Section titled “Claude Code (CLI)”claude mcp add --transport http discover "https://<your-discover-host>/mcp"Then in a session:
/mcpSelect discover → Authenticate → your browser opens → sign in.
- Add
-s userto enable it for all projects, or-s projectto write a shared.mcp.json. - Stuck?
claude mcp remove discover, then add it again.
To share the config with your team, commit a .mcp.json at the repo root:
{ "mcpServers": { "discover": { "type": "http", "url": "https://<your-discover-host>/mcp" } }}VS Code (GitHub Copilot, 1.102+)
Section titled “VS Code (GitHub Copilot, 1.102+)”Create .vscode/mcp.json in your workspace, or run MCP: Add Server from the Command Palette (Cmd + Shift + P):
{ "servers": { "discover": { "type": "http", "url": "https://<your-discover-host>/mcp" } }}Open MCP: List Servers → Start discover → VS Code opens the browser for OAuth. The tools then appear in Copilot Chat’s Agent mode under the tools icon.
Cursor
Section titled “Cursor”Global config at ~/.cursor/mcp.json, or workspace config at .cursor/mcp.json:
{ "mcpServers": { "discover": { "url": "https://<your-discover-host>/mcp" } }}Go to Settings → MCP, find the server, and click to authenticate. If your Cursor build does not run OAuth for HTTP servers, use the mcp-remote bridge instead.
Workspace config at .kiro/settings/mcp.json, or user-level at ~/.kiro/settings/mcp.json. Use the mcp-remote bridge — it is the most reliable path for OAuth-protected remote servers:
{ "mcpServers": { "discover": { "command": "npx", "args": ["-y", "mcp-remote", "https://<your-discover-host>/mcp"], "disabled": false, "autoApprove": [] } }}Kiro picks the file up automatically, or reconnect from the MCP Servers panel. The first run opens a browser for login.
Any other client — the mcp-remote bridge
Section titled “Any other client — the mcp-remote bridge”Windsurf, Zed, Cline, Continue, or any client that speaks stdio MCP but not remote HTTP with OAuth: point it at mcp-remote.
{ "mcpServers": { "discover": { "command": "npx", "args": ["-y", "mcp-remote", "https://<your-discover-host>/mcp"] } }}Requires Node.js for npx. mcp-remote handles registration, the browser login, token storage in ~/.mcp-auth/, and refresh. The client just sees an ordinary stdio MCP server.
claude.ai (web and desktop)
Section titled “claude.ai (web and desktop)”Go to Settings → Connectors → Add custom connector, paste https://<your-discover-host>/mcp, and click Connect. Sign in when the popup opens.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Fix |
|---|---|
| Browser shows “Authentication successful” but the client still says not connected | The client’s local callback listener timed out on a stale tab. Start a fresh Authenticate — do not complete an old browser tab. |
ERR_CONNECTION_REFUSED on localhost:<port>/callback | Same cause — the flow that opened that port has closed. Re-trigger auth from the client. |
| Stuck in a login loop, or you want to re-authenticate | Claude Code: claude mcp remove discover, then re-add. mcp-remote: delete ~/.mcp-auth/ and reconnect. |
403 Forbidden returned as HTML on /mcp | A network or WAF layer is blocking you. Check you are on a permitted network. |
401 after it previously worked | The token expired and refresh failed. Re-authenticate. |
| No tools appear after connecting | Make sure the client is in agent/tools mode and the server shows as connected. Call health to confirm the surface. |
Endpoint sanity checks
Section titled “Endpoint sanity checks”# Protected Resource Metadata — lists the resource, auth server and scopes:curl -s "https://<your-discover-host>/.well-known/oauth-protected-resource/mcp"
# Unauthenticated /mcp must return 401 with a WWW-Authenticate pointer:curl -si -X POST "https://<your-discover-host>/mcp" \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"tools/list","id":1}' | head -5
# Liveness (no auth required):curl -s "https://<your-discover-host>/healthz"If login itself fails, contact whoever administers your Discover deployment — you need an account in its identity realm.