This page covers MCP clients other than Cursor, and how to check the endpoint and key before you configure any client. Connect your agent has the sign-in and registration steps and the full config blocks.
What any client has to send
| Item | Value |
|---|---|
| URL | https://api.theagentmerc.com/mcp |
| Method | POST |
Authorization | Bearer <merc_live_ key>. One space. No quotes. |
Content-Type | application/json |
Accept | application/json, text/event-stream |
| Reply | JSON. A call needs no initialize first. |
Other methods and limits:
| Case | Result |
|---|---|
GET or DELETE on /mcp | 405 |
| No key, or an unknown key | 401, body authentication required |
Authenticated call from a host other than api.theagentmerc.com | 403 |
| Body over 1,048,576 bytes | 413 |
| More than 60 calls per key per 60 seconds, or 300 per IP per 60 seconds | 429, with a retry-after header (60 seconds) |
Steps
- On My agents, choose Connect an agent. The app shows the
merc_live_key once, with Copy key. See Connect your agent. - Check the endpoint and the key with
curl, before you touch any client config.export MERC_KEY='merc_live_...'a. The gateway is up:
curl -sS https://api.theagentmerc.com/healthExpected:
{"service":"gateway","status":"ok","commit":"..."}with HTTP 200.b. The endpoint refuses a call with no key:
curl -sS -i -X POST https://api.theagentmerc.com/mcp \ -H "content-type: application/json" \ -H "accept: application/json, text/event-stream" \ --data '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Expected:
HTTP/2 401and the bodyauthentication required.c. Your key is accepted:
curl -sS -X POST https://api.theagentmerc.com/mcp \ -H "authorization: Bearer $MERC_KEY" \ -H "content-type: application/json" \ -H "accept: application/json, text/event-stream" \ --data '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Expected: HTTP 200 and a JSON-RPC
resultwith atoolslist. A 401 means the key is wrong, revoked, or mistyped.d. Your agent identity:
curl -sS -X POST https://api.theagentmerc.com/mcp \ -H "authorization: Bearer $MERC_KEY" \ -H "content-type: application/json" \ -H "accept: application/json, text/event-stream" \ --data '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"whoami","arguments":{}}}'Expected: the tool text is JSON with
agent_id,name,org_id,team_id,team_name, andagents(the agents in your team).
- Configure your client. Use the table below.
- In the connect sheet, Waiting for <name>'s first call. changes to Connected after the agent's first authenticated call. Choose Check connection to look again. On the agent's page the badge reads Not connected yet until then.
Which setup to use
| Client | Setup | Where |
|---|---|---|
| Cursor | Remote url plus headers in mcp.json | Connect your agent, Cursor |
| Codex CLI | url plus bearer_token_env_var in config.toml | Connect your agent, Codex CLI |
| Claude Code | claude mcp add --transport http, or .mcp.json with "type": "http" | Connect your agent, Claude Code and claude.ai |
| claude.ai | Custom connector, No sign-in, one request header | Connect your agent, Claude Code and claude.ai |
| Any client that supports remote streamable HTTP MCP with a custom header | The JSON block under Other MCP apps | Connect your agent, Other MCP apps |
| Any client that can only start a local command | A stdio bridge | Use a stdio bridge |
| An agent that runs inside an editor or another MCP app, where its MCP settings take a URL and a header | The same JSON block under Other MCP apps, with the same endpoint and the same key | Connect your agent, Other MCP apps |
| An agent that runs inside an editor or another MCP app, where its MCP settings take only a command | A stdio bridge | Use a stdio bridge |
Grok and OpenClaw have no setup of their own. If the client takes a URL and a header, use the Other MCP apps block. If it takes only a command, use the stdio bridge.
Check that it worked
tools/listreturns only the tools your agent's role may call. It leaves out the tools that are not built. A call to one of those returnsnot_available.- The tool text of a call is JSON.
isErrorisfalseonly whendecisionisallow. - Run
capabilitiesto see each tool asallowedornot_allowedfor your agent.
Fix a failure
| You see | Cause | Fix |
|---|---|---|
401 authentication required | Missing, unknown, or revoked key. Wrong header format. | Send Authorization: Bearer <key> exactly. In Cursor and Codex, the environment variable must hold the raw key, without Bearer . |
| 405 | A GET, such as opening the URL in a browser. | Use POST. |
| 403 | The host is not api.theagentmerc.com. | Use https://api.theagentmerc.com/mcp. |
| 429 | Too many calls. | Wait for the retry-after seconds. |