Documentation menu

Connecting AI assistants

Connecting other MCP clients

Any client that supports the streamable HTTP transport of the Model Context Protocol with OAuth works the same way as the clients documented one by one: give it the address, approve on the consent screen.

The endpoint

https://<host>/mcp
  • Transport: MCP streamable HTTP. The client sends JSON-RPC in POST requests.
  • Authentication: OAuth 2.1 bearer tokens. Clients discover the authorisation server by themselves: an unauthenticated request gets a 401 whose WWW-Authenticate header points to https://<host>/.well-known/oauth-protected-resource.
  • Use the URL without a trailing slash.

Clients limited to stdio servers

A client that can only start local stdio servers can go through a bridge such as mcp-remote, which speaks stdio on one side and HTTP with OAuth on the other. Follow the bridge’s own documentation for the exact configuration; Memex only needs the address above.

Wire details

  • The endpoint is stateless: there is no Mcp-Session-Id, every request stands alone, and a tool call works without a prior initialize on the same connection. The server can restart without clients noticing.
  • Every POST is answered with one plain application/json body. The server never opens an SSE stream, and a GET on the endpoint answers 405 Method Not Allowed.
  • This is what lets the endpoint work behind proxies that buffer or cut event streams, Cloudflare quick tunnels in particular.

With a quick tunnel

In quick-tunnel mode the public address changes every time the server restarts, and the connection configured in the client then points to an address that no longer exists. Remove the connector, add it again with the new address and approve the consent screen again. For a stable setup, use a permanent tunnel or your own domain: see Access modes.

Next

Reference: mcp.md.