Skip to content

Latest commit

 

History

History
167 lines (126 loc) · 9.99 KB

File metadata and controls

167 lines (126 loc) · 9.99 KB

Connecting AI Agents to Pieces MCP

Step-by-step setup guides for connecting 19 popular MCP-compatible tools to your Pieces Long-Term Memory server. These integrations connect to the expanded Pieces MCP server introduced in Pieces 5.0.3, which brought the full suite of 39 LTM tools to every MCP-compatible client. For the complete list of tools available to your agents, see the Pieces MCP and LTM Tools Reference. Each guide covers local (localhost) and remote (ngrok HTTPS) configuration with verified, fact-checked config formats.


Pieces MCP Endpoint URLs

PiecesOS listens on a port in the range 39300–39333. Discover yours by checking PiecesOS Quick Menu > MCP Servers, or probe http://localhost:PORT/.well-known/version for each port. See the ngrok guide for auto-discovery scripts.

Mode Streamable HTTP Endpoint SSE Endpoint (legacy)
Local http://localhost:PORT/model_context_protocol/2025-03-26/mcp http://localhost:PORT/model_context_protocol/2024-11-05/sse
Remote (ngrok) https://YOUR_NGROK.ngrok.app/model_context_protocol/2025-03-26/mcp https://YOUR_NGROK.ngrok.app/model_context_protocol/2024-11-05/sse

Use Streamable HTTP by default. Use SSE only for tools that explicitly require it (noted per guide).


Transport Protocols

stdio — Tool spawns a local process; communicates via stdin/stdout. Works on the same machine only. Cannot connect to a remote URL without a bridge.

SSE (Server-Sent Events) — Legacy HTTP transport. Two endpoints (GET for server→client stream, POST for client→server). Still widely supported but being phased out in favour of Streamable HTTP.

Streamable HTTP — Modern standard (March 2025+). Single HTTP endpoint (/mcp) for all communication. Works over HTTPS for remote access. What Pieces exposes at /model_context_protocol/2025-03-26/mcp.


Transport Support Matrix

Tool Type stdio SSE Streamable HTTP Direct Remote URL Config Key Guide
Cursor IDE Yes Yes Yes Yes mcpServers + url
Claude Desktop Desktop Bridge only Via Connectors UI Via Connectors UI Pro/Max/Team/Ent only mcpServers + command
Claude Code CLI Yes Yes Yes Yes CLI command
Claude Cowork Desktop agent Bridge only Via Connectors UI Via Connectors UI Pro/Max/Team/Ent only Shared with Desktop
VS Code IDE Yes Yes (type: "sse") Yes (type: "http") Yes servers + type
Windsurf IDE Yes Yes Yes Yes mcpServers + serverUrl
Goose CLI / Desktop Yes Yes (type: sse) Yes (type: streamable_http) Yes YAML extensions
Cline VS Code Ext Yes Yes Buggy — use SSE Yes mcpServers + url
Continue.dev VS Code/JetBrains Ext Yes Yes (type: sse) Yes (type: streamable-http) Yes YAML mcpServers array
JetBrains IDEs IDE Yes Limited Yes Yes Settings UI
Zed IDE Yes Bridge only Bridge only Needs bridge context_servers
GitHub Copilot VS Code Ext Yes Yes Yes Yes servers + type (same as VS Code)
OpenAI Codex CLI CLI Yes -- Yes Yes TOML mcp_servers + url
Google Gemini CLI CLI Yes Yes (url) Yes (httpUrl) Yes mcpServers
Amazon Q Developer CLI / IDE Yes -- Yes Yes servers + type
ChatGPT Developer Mode Web -- Yes Yes Yes (HTTPS only) Connectors UI
Raycast macOS launcher Yes Bridge only Bridge only Needs bridge mcpServers (JSON file)
Rovo Dev CLI CLI Yes Yes Yes Yes servers + transport
OpenClaw Self-hosted agent Yes Yes Yes Yes MCPorter mcpServers

"Needs bridge" = tool supports stdio only; use mcp-remote or supergateway to proxy HTTP. "Bridge only" = HTTP is not natively supported but works via a stdio bridge in the config.


stdio-to-HTTP Bridges

For tools that only support stdio (Zed, Raycast, Claude Desktop via JSON config), use a bridge process that proxies stdio calls to the Pieces HTTP endpoint.

mcp-remote (Recommended)

Full guide: Bridging Local MCP Clients to Remote Servers with mcp-remote — covers all CLI flags, OAuth 2.1 flow, transport strategies, bearer token injection, security, and per-client config examples.

The npm package is mcp-remote (not @modelcontextprotocol/mcp-remote).

# No global install needed — use npx
npx -y mcp-remote http://localhost:39300/model_context_protocol/2024-11-05/sse

In any stdio-only tool's config:

{
  "mcpServers": {
    "pieces": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:39300/model_context_protocol/2024-11-05/sse"
      ]
    }
  }
}

For remote (ngrok):

{
  "mcpServers": {
    "pieces": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://YOUR_NGROK.ngrok.app/model_context_protocol/2024-11-05/sse"
      ]
    }
  }
}

Flags: --transport sse-only, --header "Authorization: Bearer token", --host 127.0.0.1 — see the full mcp-remote guide for complete CLI reference.

supergateway

Bidirectional bridge: expose a stdio server as SSE, or connect to a remote SSE server via stdio.

# Connect to remote SSE, expose as stdio:
npx -y supergateway --sse "http://localhost:39300/model_context_protocol/2024-11-05/sse"

# Connect to remote Streamable HTTP, expose as stdio:
npx -y supergateway --streamableHttp "http://localhost:39300/model_context_protocol/2025-03-26/mcp"

mcp-proxy (Python)

pip install mcp-proxy
mcp-proxy http://localhost:39300/model_context_protocol/2024-11-05/sse

Setup Guides

Guide Description
Cursor AI-first IDE with native HTTP support via url key in mcp.json
Claude Desktop stdio in JSON config; remote via Connectors UI (Pro/Max/Team/Enterprise)
Claude Code CLI with claude mcp add --transport http|sse
Claude Cowork Autonomous task agent; shares Claude Desktop MCP config
VS Code servers key with type: "http"|"sse"|"stdio" in .vscode/mcp.json
Windsurf Use serverUrl (not url) in ~/.codeium/windsurf/mcp_config.json
Goose YAML config at ~/.config/goose/config.yaml with extensions key
Cline Separate config at ~/.cline/data/settings/cline_mcp_settings.json; use SSE
Continue.dev YAML in .continue/config.yaml; agent mode only; use streamable-http type
JetBrains IDEs Settings UI > AI Assistant > MCP; 2025.2+ required
Zed context_servers key in settings.json; stdio only; bridge required
GitHub Copilot Uses VS Code's .vscode/mcp.json with servers + type key
OpenAI Codex CLI TOML format at ~/.codex/config.toml with [mcp_servers.pieces]
Google Gemini CLI ~/.gemini/settings.json with mcpServers; use httpUrl for HTTP, url for SSE
Amazon Q Developer ~/.aws/amazonq/default.json with servers + type
ChatGPT Developer Mode Connectors UI only; HTTPS required; Pro/Plus/Business/Enterprise/Education plans
Raycast mcp-config.json file; stdio only; bridge required; macOS only
Rovo Dev CLI ~/.rovodev/mcp.json with servers + transport key
OpenClaw MCPorter config at ~/.openclaw/workspace/config/mcporter.json

Related Guides


  ← Previous: Bridging Local MCP Clients with mcp-remote     Back to Guides Index →