examples/MCP-tools Public
---id: connecting-a-clienttype: guideowner: justinreviewed: 2026-10-13---# Connecting a clientThe endpoint is `https://<your worker>.workers.dev/mcp` once deployed, or `http://localhost:8787/mcp` under `npm run dev`. It speaks Streamable HTTP without sessions (see [[0001-stateless-streamable-http]]) and needs no auth.## MCP Inspector```shnpx @modelcontextprotocol/inspector```Pick the **Streamable HTTP** transport, enter the URL and connect. Direct connections work because `/mcp` allows any origin. The Tools tab lists all three tools; run `time_in_zone` with `zone` set to `tokyo` to check the round trip.## Claude DesktopClaude Desktop launches local servers over stdio, so bridge to the HTTP endpoint with `mcp-remote` in `claude_desktop_config.json`:```json{ "mcpServers": { "mcp-tools": { "command": "npx", "args": ["-y", "mcp-remote", "http://localhost:8787/mcp"] } }}```Restart Claude Desktop and the tools appear under the tools menu. On plans that support custom connectors you can instead add the deployed URL directly as a remote connector.## Claude Code```shclaude mcp add --transport http mcp-tools http://localhost:8787/mcp```## curlEvery message is a POST with both content types in `Accept`:```shcurl -s http://localhost:8787/mcp \ -H 'content-type: application/json' \ -H 'accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'```## When it does not work- **406 Not Acceptable**: the client did not send both `application/json` and `text/event-stream` in `Accept`.- **415 Unsupported Media Type**: the body was not sent as `application/json`.- **405 on GET**: the client is trying to open a standalone SSE stream or resume a session. Pick a Streamable HTTP client mode that does not need one; older SSE-only clients are not supported.- **Tools missing**: check `GET /` answers, then run `tools/list` with curl to see what the server sends.