Connect Claude Code to Metorial for your whole team
Add one Magic MCP URL to Claude Code, sign in with company SSO, and roll the same config out to every developer with .mcp.json or managed settings.
To connect Claude Code to Metorial, add your portal's Magic MCP URL as an HTTP MCP server with claude mcp add --transport http metorial <your-magic-mcp-url>, then run /mcp and sign in with your company account. Each developer signs in as themselves, so Claude Code only reaches the integrations and tools that person's groups allow, and every call is logged under their name. To roll it out to the whole team, commit the same URL in a project .mcp.json or push it to every machine with Claude Code's managed settings.
What you'll learn
- How to connect one developer's Claude Code to Metorial
- How to roll the same server out to every developer
- How to restrict Claude Code to approved MCP servers
Before you start
- A portal with SSO and the integrations your developers need
- Groups that grant access to those integrations
- The Claude Code CLI installed on each developer's machine
How the connection works
Claude Code talks to one MCP server: Metorial. Behind that one URL, Metorial serves the integrations the signed-in person is allowed to use, runs each tool call with that person's own connected account, and records the call. Developers never paste API keys into a config file.
Connect one developer
Copy the Magic MCP URL
Open your company's Metorial portal and sign in. Copy the URL from the Magic MCP URL card on the portal home page. The card also lists short setup steps for Claude Code.
Add the server over HTTP
Run this in a terminal. Add --scope user to make Metorial available in every project instead of only the current one.
Sign in
Start Claude Code, run /mcp, select metorial, and sign in with your company account. Metorial then asks which integrations Claude Code may use and, for each one, whether to allow every tool or only the tools you pick.
Check the connection
Ask Claude Code to list the Metorial tools it can see. An admin can confirm the connection in Workforce under Identity, Accounts: open the developer's account and check Connections and Operations.
Roll it out to every developer
Pick the option that matches how much control you need.
Share a project .mcp.json
Commit this file to the root of a repository. Everyone who opens the project gets the server and signs in with their own account.
Claude Code asks each developer to approve project-scoped servers the first time they open the project.
Provide the server through managed settings
To give every developer Metorial without relying on a repository, list it under managedMcpServers in a managed settings source: server-managed settings, an MDM profile or registry policy, or managed-settings.json. This requires Claude Code v2.1.259 or later. The URL must use https://, and you should leave out headers so each developer signs in with OAuth.
Developers keep any servers they add themselves. To take exclusive control instead, deploy a managed-mcp.json file at /Library/Application Support/ClaudeCode/managed-mcp.json on macOS, /etc/claude-code/managed-mcp.json on Linux and WSL, or C:\Program Files\ClaudeCode\managed-mcp.json on Windows. See Anthropic's managed MCP configuration guide for the full rules.
Block servers that bypass Metorial
Set allowedMcpServers with a serverUrl pattern for your Metorial host, and allowManagedMcpServersOnly: true, in a managed settings source. Claude Code then refuses remote servers that do not match. How to control shadow MCP servers covers this alongside the other clients.
Control what Claude Code can do
Set limits in Metorial first, because they apply in every client. Use tool filters to reject write or destructive tools for a team, and use groups to decide which integrations a team sees at all.
Claude Code adds its own layer. Metorial tools appear as mcp__metorial__<tool>, and you can use those names in Claude Code permission rules to allow or deny a tool, or to pre-approve trusted tools so developers are not asked each time.
Organizations can also choose what Metorial stores when members report Claude Code sessions with the Metorial CLI. In organization settings, open Agent Sessions and pick a capture level of Off, Usage only, or Full. Members install the hook with metorial agent-hooks install.
Troubleshooting
claude mcp list shows "Needs authentication"
Run /mcp, select metorial, and sign in. If sign-in keeps failing, choose Clear authentication in the same menu and sign in again.
The browser sign-in fails to return to Claude Code
The portal only accepts OAuth redirects that match its allowed patterns. In the portal's Settings, open Client Settings and check that Allowed OAuth Redirects includes Localhost apps (http://localhost:*/*).
A teammate sees "Pending approval"
Servers shared through a project .mcp.json need approval. Run claude in the project and approve metorial when asked.
Large tool results are cut off
Claude Code warns when a tool result passes 10,000 tokens and caps it at 25,000 by default. Raise the cap with the MAX_MCP_OUTPUT_TOKENS environment variable.
Signed in, but an integration is missing
Metorial only serves integrations that the person's groups allow and that they selected on the consent screen. Check the account's groups under Access, then sign in again from /mcp and select the integration.
FAQ
Do developers need API keys or tokens in their Claude Code config?
No. The config only holds the Magic MCP URL. Each developer signs in with your identity provider, and Metorial uses the account they connected for each integration.
Can we stop developers from adding MCP servers that don't go through Metorial?
Metorial does not manage Claude Code's local config. Claude Code's managed settings can, with allowedMcpServers plus allowManagedMcpServersOnly, or with an exclusive managed-mcp.json.
What happens to a developer's access when they leave?
With SCIM connected, deactivating the person in your identity provider marks them deprovisioned in Metorial and removes their groups. The URL in their Claude Code config then has nothing left to grant.
Can we keep Claude Code read-only for some teams?
Yes. Give those teams integrations whose tool filters allow only Read-Only Tools. The filter applies on the Metorial side, so it holds no matter how Claude Code is configured.
Where do we see what Claude Code did?
Every call appears in the person's Operations in Workforce and in Tool Calls under connection logs. See Audit MCP tool calls for exports.