Guide for connecting to your MCP server from various clients.
If your client supports Streamable HTTP, connect directly:
{
"remote-example": {
"url": "http://localhost:3000/api/mcp"
}
}For clients that only support stdio, use mcp-remote to proxy Streamable HTTP:
{
"remote-example": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://localhost:3000/api/mcp"
]
}
}Edit the configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
If the file doesn't exist, enable it under Settings > Developer.
{
"remote-example": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://localhost:3000/api/mcp"
]
}
}Restart Claude Desktop to pick up changes. You should see a hammer icon in the bottom right corner of the input box.
Edit ~/.cursor/mcp.json.
As of version 0.48.0, Cursor supports unauthed SSE servers directly. If your MCP server uses OAuth authorization, you still need mcp-remote.
Edit ~/.codeium/windsurf/mcp_config.json.
Use the MCP client directly in your application:
import { McpClient } from "@modelcontextprotocol/sdk/client";
const client = new McpClient({
transport: new SSEClientTransport("/api/mcp/mcp"),
});
const result = await client.request("yourMethod", { param: "value" });