# Connect your agent to Megido > Connect Claude, Claude Code, Cursor, VS Code, ChatGPT or any MCP client to Megido by signing in or with an API key, or call its HTTP API. Megido is an MCP server with an HTTP API. Sign in from a chat app or an editor, or use an API key from the portal; your own code calls the same tools over the HTTP API with a key. Create an account in the portal, or start from a chat app without registration. Server address: ```text https://api.megido.io/mcp ``` ## Claude ### Sign in (recommended) 1. In claude.ai or Claude Desktop, open Settings, Connectors and choose Add custom connector. On a Team or Enterprise plan an owner of the Claude organization adds it first, in the organization's connector settings. The Free plan allows one custom connector. 2. Name it Megido and paste the address: ```text https://api.megido.io/mcp ``` Leave the advanced OAuth fields empty. 3. Choose Add, then Connect next to the new connector in Claude. The Megido portal opens: continue with Google or with your email, or choose Connect without registration to try Megido without an account. Then pick the organization, allow access and confirm it with a code if the portal asks. You can revoke it later in Keys and apps. 4. In a chat, make sure Megido is on in the tools menu. Check it: ask the agent “What is my Megido balance?” It calls the usage tool and answers with your organization's balance. ### With an API key Replace `` with an API key from the [portal](https://portal.megido.io/), under Keys and apps. 1. Claude Desktop only, and it needs Node.js. Open Settings, Developer, Edit Config: this opens claude_desktop_config.json. 2. Paste this into the file; if it already has mcpServers, add the megido entry to them: ```json { "mcpServers": { "megido": { "command": "npx", "args": [ "-y", "mcp-remote", "https://api.megido.io/mcp", "--header", "Authorization:${MEGIDO_AUTH}" ], "env": { "MEGIDO_AUTH": "Bearer " } } } } ``` 3. Quit Claude Desktop completely and open it again. Check it: ask the agent “What is my Megido balance?” It calls the usage tool and answers with your organization's balance. ## Claude Code ### Sign in (recommended) 1. Run in a terminal; `--scope user` makes it available in every project: ```bash claude mcp add --transport http --scope user megido https://api.megido.io/mcp ``` 2. Start Claude Code, run `/mcp`, choose megido and Authenticate. The Megido portal opens: continue with Google or with your email, or choose Connect without registration to try Megido without an account. Then pick the organization, allow access and confirm it with a code if the portal asks. You can revoke it later in Keys and apps. 3. Check it: ask the agent “What is my Megido balance?” It calls the usage tool and answers with your organization's balance. ### With an API key Replace `` with an API key from the [portal](https://portal.megido.io/), under Keys and apps. 1. Run in a terminal: ```bash claude mcp add --transport http --scope user megido https://api.megido.io/mcp --header "Authorization: Bearer " ``` 2. Start Claude Code; no sign-in is needed. Check it: ask the agent “What is my Megido balance?” It calls the usage tool and answers with your organization's balance. ## Cursor ### Sign in (recommended) 1. [Add to Cursor](https://cursor.com/en/install-mcp?name=megido&config=eyJ1cmwiOiJodHRwczovL2FwaS5tZWdpZG8uaW8vbWNwIn0%3D) Cursor opens and asks to install Megido. Or add it by hand to ~/.cursor/mcp.json: ```json { "mcpServers": { "megido": { "url": "https://api.megido.io/mcp" } } } ``` 2. In Cursor Settings, MCP, Megido asks to sign in: choose it. The Megido portal opens: continue with Google or with your email, or choose Connect without registration to try Megido without an account. Then pick the organization, allow access and confirm it with a code if the portal asks. You can revoke it later in Keys and apps. 3. Check it: ask the agent “What is my Megido balance?” It calls the usage tool and answers with your organization's balance. ### With an API key Replace `` with an API key from the [portal](https://portal.megido.io/), under Keys and apps. 1. Add to ~/.cursor/mcp.json; if it already has mcpServers, add the megido entry to them: ```json { "mcpServers": { "megido": { "url": "https://api.megido.io/mcp", "headers": { "Authorization": "Bearer " } } } } ``` 2. Make sure Megido is on in Cursor Settings, MCP. Check it: ask the agent “What is my Megido balance?” It calls the usage tool and answers with your organization's balance. ## VS Code ### Sign in (recommended) 1. [Add to VS Code](vscode:mcp/install?%7B%22name%22%3A%22megido%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fapi.megido.io%2Fmcp%22%7D) VS Code opens and asks to install Megido. Or add it by hand: run `MCP: Open User Configuration` from the Command Palette; if the file already has servers, add the megido entry to them: ```json { "servers": { "megido": { "type": "http", "url": "https://api.megido.io/mcp" } } } ``` 2. Start the server when VS Code offers it and allow it to sign in. The Megido portal opens: continue with Google or with your email, or choose Connect without registration to try Megido without an account. Then pick the organization, allow access and confirm it with a code if the portal asks. You can revoke it later in Keys and apps. 3. Open Copilot Chat in agent mode. Check it: ask the agent “What is my Megido balance?” It calls the usage tool and answers with your organization's balance. ### With an API key When the server first starts, VS Code asks for an API key from the [portal](https://portal.megido.io/), under Keys and apps, and keeps it itself: the key stays out of files that may go into a repository. 1. Run `MCP: Open User Configuration` from the Command Palette and add this; if the file already has servers or inputs, add the megido entries to them: ```json { "inputs": [ { "type": "promptString", "id": "megido-key", "description": "Megido API key", "password": true } ], "servers": { "megido": { "type": "http", "url": "https://api.megido.io/mcp", "headers": { "Authorization": "Bearer ${input:megido-key}" } } } } ``` 2. Start the server, paste the key when VS Code asks for it and open Copilot Chat in agent mode. Check it: ask the agent “What is my Megido balance?” It calls the usage tool and answers with your organization's balance. ## ChatGPT ### Sign in 1. Custom connectors need a ChatGPT Business, Enterprise or Edu workspace whose admin allows developer mode; personal plans cannot add them. 2. In ChatGPT settings, open Apps (or Connectors), turn on developer mode under the advanced settings and create a new app. 3. Name it Megido, paste the address and choose OAuth: ```text https://api.megido.io/mcp ``` 4. Create it, then connect it in ChatGPT. The Megido portal opens: continue with Google or with your email, or choose Connect without registration to try Megido without an account. Then pick the organization, allow access and confirm it with a code if the portal asks. You can revoke it later in Keys and apps. 5. In a chat, turn Megido on from the tools menu. Check it: ask the agent “What is my Megido balance?” It calls the usage tool and answers with your organization's balance. ## Other apps ### Sign in (recommended) An app that supports MCP sign-in (OAuth) needs the address alone and finds the sign-in itself. ```text URL: https://api.megido.io/mcp Transport: Streamable HTTP Authentication: OAuth (the app opens the Megido portal to sign in) ``` ### With an API key Replace `` with an API key from the [portal](https://portal.megido.io/), under Keys and apps. Any MCP client that can send a header. An app that runs only local servers reaches the address through [mcp-remote](https://www.npmjs.com/package/mcp-remote), as in the Claude Desktop setup. ```text URL: https://api.megido.io/mcp Transport: Streamable HTTP Header: Authorization: Bearer ``` ## HTTP API API address: ```text https://api.megido.io/v1 ``` ### With an API key Replace `` with an API key from the [portal](https://portal.megido.io/), under Keys and apps. 1. Your code calls each tool with a POST to its own address, the tool's arguments in a JSON body. Check the key with the free usage tool; it answers with your organization's balance, coverage and limits: ```bash curl -X POST https://api.megido.io/v1/tools/usage \ -H "Authorization: Bearer " ``` 2. Estimate a paid call before you run it. The estimate is free, and its data holds a quote_token: ```bash curl -X POST https://api.megido.io/v1/tools/search_cohorts \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "text": "invoicing for freelancers", "limit": 5, "estimate": true }' ``` 3. Run what was estimated: the same tool with only that quote_token, for no more than the estimate: ```bash curl -X POST https://api.megido.io/v1/tools/search_cohorts \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "quote_token": "" }' ``` 4. Every tool's arguments, answers and errors are in the [API reference](https://megido.io/docs/api); generate a client from its OpenAPI document: ```text https://api.megido.io/v1/openapi.json ``` Keep the key on your server: the API takes no calls from web pages. [The HTTP API](https://megido.io/guide/the-http-api) chapter of the guide explains calls, errors and limits.