HTTP MCP Servers
AllAgents acts as the MCP client for HTTP servers it manages. One command connects to the server, handles OAuth when required, saves the selected project, user, or profile declaration, and syncs every selected AI client:
allagents mcp add tradingview https://mcp.tradingview.com/mcpYou do not need to run a separate proxy or authentication command.
Add a Server
Section titled “Add a Server”Use a stable name and the server’s HTTP endpoint:
allagents mcp add deepwiki https://mcp.deepwiki.com/mcpallagents mcp add tradingview https://mcp.tradingview.com/mcpFor an HTTP server, mcp add:
- Connects as the AllAgents MCP client
- Opens a browser if the server requires OAuth
- Verifies the MCP connection before changing the selected declaration
- Stores the server under that destination’s
mcpServers - Routes the selected AI clients through AllAgents and syncs their configs
Public servers such as DeepWiki complete without a browser. OAuth servers such as TradingView prompt for login on the first connection.
Local and Remote Browsers
Section titled “Local and Remote Browsers”The same command supports both environments:
- Local browser: approve access and let the browser return to the loopback callback. The terminal continues automatically.
- Remote or headless host: open the printed authorization URL on another device. After approval, copy the complete loopback callback URL from the browser address bar and paste it into the waiting terminal prompt.
AllAgents accepts only the registered loopback address with the exact OAuth state.
In a non-interactive shell, AllAgents still verifies the connection without opening a browser. Public servers and servers with valid cached credentials succeed. If fresh OAuth consent is required, the command fails before changing the workspace; rerun it in an interactive terminal.
Client Filters and Headers
Section titled “Client Filters and Headers”allagents mcp add internal https://mcp.internal.corp \ --header Authorization=Bearer-token \ --client claude \ --client codex,copilot--client is repeatable and comma-compatible. It limits both server sync and
AllAgents routing; duplicate values are ignored in first-seen order. Without
--client, routing stays dynamic so clients added to the destination later
receive the same AllAgents-managed connection.
--header values are sent only to the MCP server origin, not to OAuth
discovery or identity-provider origins.
Profile declarations accept only exact environment references for header values:
allagents mcp add tradingview https://mcp.tradingview.com/mcp \ --profile markets \ --header 'Authorization=${TRADINGVIEW_TOKEN}'Generated profile bridge arguments store the header-to-variable binding, not the resolved secret. AllAgents resolves the variable immediately before the MCP connection and fails clearly when it is missing.
Reauthenticate
Section titled “Reauthenticate”Use the configured server name, not its URL:
allagents mcp reauth tradingviewallagents mcp reauth tradingview --scope userallagents mcp reauth tradingview --profile marketsreauth clears only the selected destination’s cached OAuth registration and
tokens, then runs a fresh connection and login. It does not revoke the grant at
the remote provider. Reconnect the AI client afterward if it already had an MCP
session open.
Use a Server from the CLI
Section titled “Use a Server from the CLI”Runtime discovery and calls reuse the same project, ordinary user, or named
profile declarations managed by mcp add:
allagents mcp tools tradingviewallagents mcp call tradingview quote --symbol AAPLallagents mcp tools tradingview --scope userallagents mcp call tradingview quote --profile markets --symbol AAPLUnlike an external AI client, mcp tools, fully qualified mcp call ... --help,
and mcp call connect directly to the configured HTTP endpoint. They do not go
through the generated client bridge. They still use the same credential
ownership: project and ordinary user declarations use the ordinary URL-keyed
cache, while each profile has its own isolated cache. Valid cached credentials
are reused and expired access tokens are refreshed when possible.
Runtime commands do not open a browser or request fresh OAuth consent. If the
cached grant cannot authorize the connection, the error prints the exact
destination-specific mcp reauth command to run interactively. After that
succeeds, rerun the discovery, help, or call command.
For a stdio declaration, runtime discovery, live help, and calls start the configured process directly with its configured arguments and environment. Treat a configured stdio command as executable code you trust.
Stdio Servers
Section titled “Stdio Servers”Stdio servers use the same add command and run directly rather than through
the HTTP client:
allagents mcp add gh-server npx \ --arg=-y \ --arg=@modelcontextprotocol/server-github \ -e GH_TOKEN=ghp_xxxHow AI Client Routing Works
Section titled “How AI Client Routing Works”AI clients have different MCP transport support. AllAgents normalizes that
difference: HTTP servers added with mcp add are synced as stdio commands that
launch AllAgents’ internal HTTP bridge. OAuth registration and tokens are
therefore shared instead of being configured independently in every client.
Generated AI-client configs invoke a version-pinned internal bridge. That bridge looks up the same destination declaration and credential cache, which lets clients in one destination share OAuth state instead of configuring credentials independently. A named profile’s generated bridge remains bound to that profile-owned cache and cannot share credentials with another profile.
The bridge is generated plumbing, not a user-facing command. AllAgents pins the
package version that created the config, and npx reuses npm’s package cache on
later launches. Use mcp tools or mcp call for direct CLI runtime access and
mcp reauth when fresh consent is required.
Plugin-Provided Servers
Section titled “Plugin-Provided Servers”Servers declared by plugins are not added through mcp add. To route those
through AllAgents, use the advanced destination-local mcpProxy setting:
mcpProxy: clients: - codex servers: plugin-server: proxy: - claude - copilotThe optional clients list applies to every HTTP server in that destination.
Per-server lists add clients for only the named server, and * selects every
eligible client. Profiles place the same shape beside their own mcpServers
under profiles.<name>.mcpProxy; profile policy never uses qualified global
client IDs. Stdio servers are never transformed.
OAuth Cache
Section titled “OAuth Cache”AllAgents caches OAuth client registration, tokens, PKCE verifier, and discovery metadata per server URL. Project and ordinary user declarations share the ordinary cache:
~/.allagents/oauth-proxy/<hash-of-server-url>/Each named profile owns an isolated cache:
~/.allagents/profiles/<profile>/oauth-proxy/<hash-of-server-url>/Both contain client-info.json, tokens.json, code-verifier.txt, and
discovery.json. Clients inside one profile share those files; different
profiles do not. Later connections reuse valid tokens and refresh expired access
tokens when possible. mcp reauth --profile <name> resets only that profile.
Removing an installed or declared-only profile removes its OAuth subtree with
its other profile-owned runtime state. Cleanup rejects symbolic-link or
non-directory OAuth roots and retains retryable state on failure.
Prerequisites
Section titled “Prerequisites”The generated bridge requires Node.js with npx available. A global AllAgents
installation is not required: both setup and the generated MCP connection can
use the npm cache.
The first bridge launch downloads the pinned AllAgents package if that version is not already cached. Later launches reuse the cached package. Environments that must work offline should prime the cache before disconnecting.
Destinations
Section titled “Destinations”HTTP MCP routing supports project, ordinary user, and named profile
destinations. Omit destination flags for project scope, use --scope user for
ordinary user configuration, or --profile <name> for a profile. --scope and
--profile cannot be combined. From the home directory, the project path
aliases the user workspace, so an unflagged command resolves to user scope and
explicit --scope project is rejected.
| Destination | Codex | Copilot |
|---|---|---|
| Project | .codex/config.toml |
.github/mcp.json |
| User | ~/.codex/config.toml |
~/.copilot/mcp-config.json |
| Profile | ~/.allagents/profiles/<name>/clients/codex/home/<name>.config.toml |
~/.allagents/profiles/<name>/clients/copilot/home/mcp-config.json |
Project and ordinary user updates are MCP-only. Updating an installed profile uses the ownership-aware profile reconciler because some clients combine MCP and settings in one file. Editing a declared but uninstalled profile does not implicitly install it.