MCP Server (Claude Desktop)
If you use Claude Desktop or another MCP-aware client, our Model Context Protocol server lets Claude call our APIs as native tools — no glue code, no curl.
Under the hood it's a thin wrapper around the same REST API documented under Agent API Keys. You still need an API key.
What you get
Once installed, Claude sees ten tools alongside its built-in ones:
| Tool | What it does |
|---|---|
send_message | Send a message via any connected channel. Supports text, template, image, document, button_template, generic_template, sender_action, reaction, interactive_buttons, interactive_list. |
list_inbox_contacts | Inbox contacts grouped by user across all channels. |
get_conversation_history | Message history for a specific user on a channel. |
get_social_summary | Cross-platform social analytics summary (reach, engagement, followers). |
list_instagram_posts | Recent Instagram posts with engagement metrics. |
list_facebook_posts | Recent Facebook Page posts with engagement metrics. |
list_ad_accounts | All connected Meta ad accounts. |
get_ad_account_summary | Spend, impressions, clicks, CTR, CPC for an ad account. |
list_whatsapp_templates | WhatsApp message templates (filterable by status). |
list_messenger_templates | Messenger utility templates (filterable by status). |
Each tool is governed by the scopes on the API key you provide — for example, if your key doesn't have messages:send, Claude can still load the send_message tool but calling it will fail with a 403.
Get an API key first
Follow the steps in the API Keys guide. For Claude Desktop, the typical scope set is:
messages:sendandmessages:readif you want Claude to chat with your contactsanalytics:readif you want Claude to pull KPIstemplates:readif you want Claude to suggest pre-approved templates
Copy the key shown in the one-time reveal dialog.
Option A — Hosted connector (recommended)
Add one URL in Claude Desktop. No Node, no local config edits, no global install.
Requirements:
- Claude Desktop Pro / Max / Teams / Enterprise (Custom Connectors are gated behind paid plans).
- An API key from the dashboard (Settings → API Keys).
In Claude Desktop:
- Settings → Connectors → Add custom connector.
- Remote MCP server URL:
https://api-meta.agenticlabs.site/mcp/ - Authentication: choose Bearer token, paste your
mta_…key. - Save. The
meta-aitools appear under the tool picker in any new chat.
That's it. The server is multi-tenant: every connector instance is scoped to the tenant that owns the API key — there is no cross-tenant data access.
If your Claude Desktop build only allows custom headers instead of Bearer, use
X-API-Keyas the header name andmta_…as the value. Both auth styles are accepted.
Option B — Local stdio (legacy, no paid plan needed)
The package is published on npm. Install globally:
npm install -g @mty-agentic-labs/meta-ai-mcp
This puts a meta-ai-mcp binary on your PATH. Verify with:
meta-ai-mcp --help 2>&1 | head -3 || echo "ok (server expects stdio; that's fine)"
The server is designed to be spawned by an MCP client over stdio — it doesn't have a --help flag and will just wait for input if run standalone. Once installed, configure Claude Desktop (next section).
Configure Claude Desktop
Open your Claude Desktop config file:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Add a meta-ai server entry:
{
"mcpServers": {
"meta-ai": {
"command": "meta-ai-mcp",
"env": {
"META_AI_API_KEY": "mta_your_key_here"
}
}
}
}
If you'd rather not install globally, point command at the absolute path to a built dist/index.js:
{
"mcpServers": {
"meta-ai": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"],
"env": {
"META_AI_API_KEY": "mta_your_key_here"
}
}
}
}
Restart Claude Desktop. Open a new chat — the meta-ai tools appear in the tool picker.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
META_AI_API_KEY | Yes | — | API key starting with mta_… |
META_AI_API_URL | No | https://api-meta.agenticlabs.site | Override the base URL (useful for local dev) |
Verifying it works
In Claude Desktop, ask something that requires a tool call:
"Show me the latest 5 Instagram posts and their engagement."
Claude will call list_instagram_posts (with limit: 5) and show the results inline. If the key is missing or lacks analytics:read, you'll see a clear 401 or 403 from the tool.
Security
- The MCP server runs locally on your machine. Claude Desktop talks to it over stdio (no network). The server then talks to our HTTPS API.
- Your API key is read from
envin the config file. Treat that file like a secret store — set it to mode600on Unix. - The server doesn't cache responses, doesn't log request bodies by default, and doesn't write anything to disk beyond what you configure in Claude Desktop.
- If your key ever leaks, revoke it from Settings → API Keys and update the config. The revoked key stops working on the next request.
Troubleshooting
Tools don't appear: Check the Claude Desktop logs (Help → Show MCP Logs or in the same config directory). The most common issue is an incorrect absolute path to the script, or META_AI_API_KEY not being set in the env block.
401 on every call: Your key is wrong, revoked, or expired. Verify in Settings → API Keys that the key is active and the prefix matches.
403 on a specific tool: Your key lacks the required scope for that endpoint. Create a new key with the right scopes, or update the existing key (currently requires revoke + recreate; granular scope updates are on the roadmap).
Hangs / timeouts: The MCP server has no built-in timeout — Claude Desktop's default applies (~60s). If your tenant has lots of conversations, narrow your tool call with limit or channel_id filters.