Connecting clients
The MCP server URL is always https://api.mety.ai/mcp. Chat apps connect with OAuth (nothing to paste);
coding tools and unattended agents use an API key as a Bearer header.
Chat apps: OAuth (Connect → Allow)
Section titled “Chat apps: OAuth (Connect → Allow)”Works with any client that supports OAuth for remote MCP servers: Claude.ai, Claude Desktop, ChatGPT, Grok.
- In the app’s connector or integration settings, add a custom connector (remote MCP server) with the URL
https://api.mety.ai/mcp. Leave any client id or secret fields empty: the client registers itself. - Press Connect. A browser window opens on
app.mety.ai(sign in if asked). - Tick one, several or all of the accounts to connect. Only accounts where you are an owner or admin can be ticked. Untick scopes you do not want to grant (reading is always granted).
- Click Allow. You are sent back to the app, which is now connected.
In each account you chose, the app appears in Settings → Agents as an agent named after the app, titled
via <your name>. Everything it writes is signed with that agent and audited with surface mcp. To disconnect an
account, archive that agent. Connecting again replaces the set of accounts.
The menus differ between apps and change often. Look for “connectors”, “custom connector”, “integrations” or “MCP servers”. If your plan or workspace does not offer custom remote connectors, use an API key instead.
Coding tools and agents: an API key
Section titled “Coding tools and agents: an API key”Create a key in Settings → Agents (quickstart), then:
claude mcp add --transport http mety https://api.mety.ai/mcp \ --header "Authorization: Bearer mety_live_XXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"Or in a project .mcp.json, reading the key from the environment:
{ "mcpServers": { "mety": { "type": "http", "url": "https://api.mety.ai/mcp", "headers": { "Authorization": "Bearer ${METY_KEY}" } } }}import { query } from "@anthropic-ai/claude-agent-sdk";
for await (const message of query({ prompt: "Which leads have not been contacted in 48 hours?", options: { mcpServers: { mety: { type: "http", url: "https://api.mety.ai/mcp", headers: { Authorization: `Bearer ${process.env.METY_KEY}`, "Mety-Agent-Run": "stale-leads-2026-11-15", }, }, }, allowedTools: ["mcp__mety__whoami", "mcp__mety__describe_crm", "mcp__mety__query_records"], },})) { if (message.type === "result" && message.subtype === "success") console.log(message.result);}import asyncio, osfrom claude_agent_sdk import query, ClaudeAgentOptions, ResultMessage
options = ClaudeAgentOptions( mcp_servers={ "mety": { "type": "http", "url": "https://api.mety.ai/mcp", "headers": {"Authorization": f"Bearer {os.environ['METY_KEY']}"}, } }, allowed_tools=["mcp__mety__whoami", "mcp__mety__describe_crm", "mcp__mety__query_records"],)
async def main(): async for message in query(prompt="Which leads have not been contacted in 48 hours?", options=options): if isinstance(message, ResultMessage): print(message.result)
asyncio.run(main()){ "type": "http", "url": "https://api.mety.ai/mcp", "headers": { "Authorization": "Bearer mety_live_XXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" }}The transport is Streamable HTTP, stateless, with JSON responses. See connecting to MCP.
For the Agent SDK’s full options (permissions, hooks, sessions), see its
documentation. Tool names there are mcp__<server>__<tool>, so
mcp__mety__query_records above.
Scheduled and unattended agents (a nightly 48-hour check, a mailbox import) should always use a key: OAuth access tokens expire after an hour and need a person to connect.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause |
|---|---|
401 UNAUTHENTICATED |
No Authorization header reached Mety. Check the header name and the Bearer prefix |
401 INVALID_API_KEY |
The key is wrong, revoked or expired, or its agent was archived |
401 INVALID_TOKEN |
OAuth: the access token expired (the client should refresh) or the connection was revoked (connect again) |
403 FORBIDDEN on a browser call |
/mcp refuses browser requests whose Origin is not app.mety.ai. Call it from a server or a native client |
405 on GET /mcp |
The server is stateless: no SSE stream. POST JSON-RPC only |
| A tool is missing | It needs a scope the key or connection lacks; see scopes |