Skip to content

Latest commit

 

History

History
85 lines (60 loc) · 1.79 KB

File metadata and controls

85 lines (60 loc) · 1.79 KB

Client Integration

Guide for connecting to your MCP server from various clients.

Direct Connection (Recommended)

If your client supports Streamable HTTP, connect directly:

{
  "remote-example": {
    "url": "http://localhost:3000/api/mcp"
  }
}

Using mcp-remote

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"
    ]
  }
}

Claude Desktop

Official Docs

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.

Cursor

Official Docs

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.

Windsurf

Official Docs

Edit ~/.codeium/windsurf/mcp_config.json.

In-App Usage

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" });