Connect Claude Code
Add AdMassy to Claude Code with one command, log in with /mcp, choose the right scope and make every write tool ask for your approval.
Last updated
On this page
Claude Code connects to AdMassy's remote MCP server with OAuth. You never paste an API key.
Before you start
- You have an AdMassy account and are a member of at least one workspace.
- Meta is connected for your user.
- Claude Code is installed and you are logged in to it.
Add AdMassy to Claude Code
Run this once in a terminal:
claude mcp add --transport http --scope user admassy https://app.admassy.com/api/mcp
Then start Claude Code, type /mcp, select admassy and choose Authenticate. Your browser opens the AdMassy authorization page:
- Sign in to AdMassy (if you are not already).
- Pick the workspace.
- Choose Read only (recommended to start) or Read and write.
- Click Allow and return to the terminal.
Check it works:
> Use AdMassy: who am I, and which ad accounts can I use?
The assistant calls whoami and accounts. get_active_connection shows the workspace, access level and Facebook connection in one call.
Which scope to choose
--scope decides where the server is available:
| Scope | Where it works | Stored in |
|---|---|---|
user (recommended) | Every folder on this computer | Your user Claude Code settings |
local (the default if you omit --scope) | Only the folder where you ran the command | Your local project settings |
project | Everyone who opens this repository | .mcp.json in the repository |
If AdMassy "disappeared" after you changed folders, it was added with the default local scope. Add it again with --scope user.
For a team repository, --scope project writes a .mcp.json like this, which is safe to commit because it contains no secret (each person logs in with their own AdMassy account):
{
"mcpServers": {
"admassy": { "type": "http", "url": "https://app.admassy.com/api/mcp" }
}
}
Useful commands: claude mcp list, claude mcp get admassy, claude mcp remove admassy.
Make write tools always ask
Claude Code asks before it uses an MCP tool unless you allowed that tool. A good setup is: allow common read tools, and never allow write tools, so every launch, edit or delete stops for your approval. In .claude/settings.json (project) or your user settings:
{
"permissions": {
"allow": [
"mcp__admassy__whoami",
"mcp__admassy__accounts",
"mcp__admassy__documentation",
"mcp__admassy__list_campaigns",
"mcp__admassy__list_adsets",
"mcp__admassy__list_ads",
"mcp__admassy__query_reports",
"mcp__admassy__get_batch_status"
],
"ask": [
"mcp__admassy__launch_ads",
"mcp__admassy__update_status",
"mcp__admassy__update_budget",
"mcp__admassy__delete_entities"
]
}
}
Avoid allowing the whole server (mcp__admassy): that would also allow write tools. Even when a write tool runs, AdMassy only stores a review first; the change happens on the second call. See The safety model.
Updating and re-authenticating
- When AdMassy adds tools, restart Claude Code. If old tool descriptions are still shown, remove and add the server again.
- When the login expires or you want another workspace or access level, run
/mcp, select admassy and authenticate again. - To switch workspaces without logging in again, ask the assistant to use
switch_workspace.
Troubleshooting
- "admassy" is not in
/mcp: it was added in another folder with local scope; use--scope user. - "This connection is read-only": switch it to Read and write; see Permissions, scopes and workspaces.
- "Unknown tool": the tool list is out of date; restart Claude Code.
- More in Errors and troubleshooting.
Related
Was this article helpful?