How to Connect Claude Code to 500+ MCP Tools Through One Gateway
Connect Claude Code to 500+ MCP tools through Bifrost's single gateway endpoint. Centralize tool access, governance, and observability without config sprawl.
Claude Code has become the default terminal agent for AI-assisted engineering, and the Model Context Protocol (MCP) ecosystem now exposes hundreds of tools across filesystem, database, web search, GitHub, AWS, Slack, Notion, and internal API servers. Teams that want to connect Claude Code to MCP tools at that scale quickly discover the default approach breaks: each server lives in its own config block, each one holds its own credentials, and none of them know about each other. Fifteen servers means fifteen configurations, fifteen credential surfaces, and zero cost visibility. Bifrost, the open-source AI gateway by Maxim AI, solves this by acting as a single MCP endpoint that aggregates every connected server into one connection Claude Code can discover and call through. This guide walks through the architecture, setup, and governance model for connecting Claude Code to 500+ MCP tools through a single gateway.
Why Claude Code Needs an MCP Gateway When You Scale Past a Few Servers
Claude Code supports MCP servers natively through its .mcp.json configuration or the claude mcp add command. This works fine with one or two servers. It stops working the moment a team connects filesystem, GitHub, internal databases, Slack, Jira, observability platforms, and a dozen other tool servers to the same agent session.
The failure modes are consistent:
- Tool sprawl in context: Each MCP server typically exposes 10 to 30 tools. Sixteen servers means roughly 500 tool definitions loaded into every single LLM request, consuming tokens on every turn regardless of which tools the model actually uses.
- Credential fragmentation: Every server manages its own authentication, leaving secrets spread across developer machines, CI pipelines, and config files.
- No access control: Every developer with the config gets every tool, with no way to scope access by team, project, or seniority.
- Zero cost visibility: There is no central place to see which tools are being called, by which agent, at what rate, or at what cost.
- No failure isolation: When one MCP server goes down, Claude Code's agent loop can stall without a clear signal as to which tool failed.
A gateway layer solves these problems by sitting between Claude Code and every upstream MCP server, presenting one connection surface to the agent and one governance surface to the platform team.
How Bifrost Acts as a Single MCP Gateway for Claude Code
Bifrost is both an MCP client and an MCP server. It connects to your upstream tool servers (filesystem, web search, GitHub, databases, internal APIs, Slack, Notion, and any other MCP-compatible server) and exposes every tool from every server through a single endpoint at /mcp. Claude Code sees Bifrost as one MCP server. Bifrost sees the underlying tool servers as individual clients.
The Bifrost MCP gateway supports three connection protocols for upstream servers:
- STDIO: Spawns a subprocess and communicates over stdin/stdout. Ideal for local tools like the filesystem server or Python-based MCP servers.
- HTTP: Sends JSON-RPC requests to a remote MCP endpoint. Ideal for cloud-hosted tool servers and internal microservices.
- SSE: Persistent Server-Sent Events connection for real-time and streaming tool workloads.
Each upstream connection can authenticate with static headers, OAuth 2.0 with automatic token refresh, or per-user OAuth so that individual developers connect to their own Notion, GitHub, or Google Drive accounts under isolated identities. Bifrost's own overhead on the request path is 11 microseconds at 5,000 requests per second in sustained benchmarks, so the gateway layer does not become a bottleneck.
How to Connect Claude Code to Bifrost's MCP Gateway
Setting up Claude Code to reach 500+ MCP tools through Bifrost takes four steps and usually finishes in under ten minutes.
Step 1: Install Bifrost
Bifrost runs as an HTTP gateway with a built-in web UI. The fastest path is NPX or Docker:
npx -y @maximhq/bifrost
# or
docker run -p 8080:8080 maximhq/bifrost
Once running, open http://localhost:8080 to access the dashboard. The UI has sections for providers, MCP clients, virtual keys, logs, and analytics.
Step 2: Add your MCP servers to Bifrost
Each upstream MCP server is registered once, in Bifrost, instead of in every individual Claude Code config. Use the MCP Gateway section of the UI, the management API, or a config.json entry to register each server. A filesystem server configuration looks like this:
{
"name": "filesystem",
"connection_type": "stdio",
"stdio_config": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-filesystem"],
"envs": ["HOME", "PATH"]
},
"tools_to_execute": ["*"]
}
Repeat the pattern for every server you want available: GitHub, Slack, Jira, internal APIs, vector databases, observability tools, CI systems, and the AWS and cloud tool catalogs shipped by projects like AWS Labs MCP. Bifrost handles connection state, health checks every ten seconds, and exponential-backoff reconnection automatically. When a client hits five consecutive failed pings, Bifrost marks it disconnected and attempts reconnection in the background without blocking other tool calls.
Step 3: Connect Claude Code to Bifrost
Once Bifrost is running with your servers registered, add Bifrost as an MCP server in Claude Code with one command:
claude mcp add --transport http bifrost <http://localhost:8080/mcp>
That is the entire client-side change. Claude Code now discovers every tool from every MCP server connected to Bifrost through a single connection. When you add new MCP servers to Bifrost later, they appear in Claude Code automatically with no additional client-side configuration. The Bifrost Claude Code integration also supports routing Claude Code's model calls through the same gateway, so the same setup gives you multi-provider model switching alongside tool aggregation.
Step 4: Attach a virtual key for governance
For team environments, attach a virtual key so the gateway enforces access control and budget limits. Claude Code supports custom headers on the MCP connection:
{
"mcpServers": {
"bifrost": {
"url": "<http://localhost:8080/mcp>",
"headers": {
"Authorization": "Bearer vk_your_virtual_key"
}
}
}
}
With virtual keys enforced, each developer or team gets a scoped view of the 500+ tool catalog based on their permissions.
Managing 500+ Tools: Code Mode, Filtering, and Virtual Keys
Aggregating tools into one endpoint solves half the problem. The other half is preventing tool definitions from overwhelming every LLM context window. Bifrost addresses this through three mechanisms.
Code Mode is the most impactful. With classic MCP, a single agent turn against 5 servers and 100 tools can spend 600+ tokens on tool definitions alone, on every turn. Code Mode replaces that pattern with four meta-tools (listToolFiles, readToolFile, getToolDocs, executeToolCode) and lets the model write Python in a Starlark sandbox that orchestrates multiple tool calls server-side. The measured impact on realistic e-commerce workflows with 10 servers and 150 tools is roughly a 50% reduction in total tokens per request and 30 to 40% faster execution. The Bifrost MCP gateway deep-dive covers the architecture in detail, along with benchmark results up to 92% lower token costs on agent-heavy workloads.
Tool filtering gives finer control. For any MCP client registered in Bifrost, the tools_to_execute field can be set to ["*"] for all tools, [] to deny by default, or an explicit allowlist. This applies globally and per virtual key.
Virtual keys scope access at the consumer level. Each virtual key can expose a different subset of the tool catalog, with its own budget, rate limits, and observability scope. A production-support virtual key might get read-only filesystem and database tools. An admin virtual key might get the full 500+ tools. The same Bifrost gateway serves both through the same /mcp endpoint, differentiated only by the bearer token on the request.
Bifrost also supports tool-level Code Mode binding, so servers with thirty or more tools (such as GitHub or a large internal API server) organize into one file per tool rather than one file per server. That keeps individual context reads small even when the aggregated catalog is enormous.
Governance and Observability Across 500+ MCP Tools
Connecting Claude Code to hundreds of tools is only responsible when the platform team can see what those tools do in production. Bifrost captures every MCP tool call passing through the gateway and emits:
- Per-execution audit logs with tool name, arguments, virtual key, and result status
- Per-tool and per-virtual-key cost tracking
- Native Prometheus metrics for scraping and Push Gateway
- OpenTelemetry traces over OTLP, compatible with Grafana, Honeycomb, and New Relic
- A native Datadog connector for APM traces and LLM observability
For regulated environments, the MCP Gateway URL enforces virtual-key authentication on every /mcp request, supports HTTPS termination behind a reverse proxy, and advertises OAuth discovery automatically when per-user OAuth is configured. Bifrost Enterprise adds clustering for high availability, in-VPC deployments, HashiCorp Vault and cloud secrets manager integration, and immutable audit logs suitable for SOC 2, GDPR, HIPAA, and ISO 27001 programs.
The net effect is that a security engineer can answer questions the classic Claude Code plus N MCP servers setup cannot: which developer called which tool at which time, how much it cost, whether it hit a guardrail, and whether any tool call should have been blocked under the current policy.
Start Using Bifrost as Your Claude Code MCP Gateway
Connecting Claude Code to 500+ MCP tools through a single gateway is a small configuration change with an outsized operational payoff. Bifrost replaces fragmented per-server configs with one endpoint, adds Code Mode to cut token costs by up to 50% on multi-server workflows, and enforces access control, budgets, and audit logging through virtual keys. The open-source release on GitHub runs in a single command and deploys to Kubernetes, Docker, or bare metal without platform-specific work.
To see how Bifrost can act as the MCP gateway for your Claude Code rollout, including clustering, federated authentication, and dedicated support, book a demo with the Bifrost team.