← All connection guides
Scripts & APIs
About 1 minute · MegaMCPs has not checked this client yet
- Create an API key on your dashboard (AI clients → API keys). It is shown once: keep it in a secret store.
- OpenAI Responses API: add this to the tools of every request, follow-ups with previous_response_id included.
{ "type": "mcp", "server_label": "megamcps", "server_url": "https://mcp.megamcps.com/mcp", "headers": { "Authorization": "Bearer mmk_your_key" } } - xAI Responses API (api.x.ai/v1/responses): the same entry. xAI's Python SDK calls the field extra_headers.
{ "type": "mcp", "server_label": "megamcps", "server_url": "https://mcp.megamcps.com/mcp", "headers": { "Authorization": "Bearer mmk_your_key" } } - n8n: in an MCP Client node, use these settings and save the header as a Header Auth credential.
MCP Endpoint URL: https://mcp.megamcps.com/mcp Server Transport: HTTP Streamable Authentication: Header Auth Name: Authorization Value: Bearer mmk_your_key - Check a key with curl. A reply containing "serverInfo":{"name":"megamcps" means it works. X-API-Key: mmk_your_key works as well as Authorization.
curl -sS https://mcp.megamcps.com/mcp \ -H "Authorization: Bearer mmk_your_key" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'
Good to know
- ChatGPT and claude.ai sign in instead; they don't take API keys.
- An account can have 20 live API keys.
If it doesn't work
- 401 means the key is wrong or revoked. A rejected key never falls back to sign-in.
- OpenAI asks before every tool call by default (mcp_approval_request). Answer it, or add "require_approval": "never" once you trust the tools.
New to MegaMCPs?
Create an account and connect a service first. Onboarding then shows this guide beside a live check that turns green at your client's first tool call.