Set up Mercator
Connect Mercator in your agent, authorize it, and verify with a free search.
- Setup does not require a paid job.
- Report connection and payment readiness separately.
If you are an agent and the user’s app or mode is unclear, ask before choosing a setup path. Installing a CLI in a disposable chat sandbox does not configure the user’s desktop.
Read as Markdown · Full documentation
Installation
-
Run the installer in your computer's terminal:
curl -fsSL https://mercator.sh/install.sh | sh -
Select the installed agents you want to connect.
-
Complete authorization in your agent, then run your first job.
- Claude Desktop, Claude web, or ChatGPT: use Agent setup.
- Updates and installer options: see the CLI reference.
- New wallet session: sign in and approve payment permission in one Tempo Wallet approval.
- Existing wallet session: approve access for the same account wallet.
Agent setup
Choose your app below for its exact registration and authorization steps.
| Where you use your agent | Setup path |
|---|---|
| Claude Code, Codex, Cursor, or another installed client | Local agents |
| Claude Desktop chat, Claude web, or Cowork | Claude connectors |
| ChatGPT on the web | Developer-mode app |
| Cloud agent, team-managed host, or remote machine | Managed and remote environments |
| Another MCP client | Manual installation |
Local agents
Run the installer in the terminal where your agent runs:
curl -fsSL https://mercator.sh/install.sh | shTo configure just one client during installation, pass its ID after sh -s --:
curl -fsSL https://mercator.sh/install.sh | sh -s -- --client cursorActivate after installation
- Load the installed configuration using your client's action below.
- Complete the client's OAuth flow. Mercator requests
mercator:toolsfor/mcp/auth. - Call
search_servicesandget_connection_statusin that client.
- Setup lists each client under Client readiness with its activation and authorization steps. A written registration stays "authorization pending" until you authorize in the client.
mercator refreshupdates managed files but does not restart clients.mercator doctorverifies the separate CLI connection.
| Client / change | Next step |
|---|---|
| Claude Code terminal plugin | Run /reload-plugins in the current session. If it warns about the prompt cache, run /reload-plugins --force. Restart Claude Code if unsupported. |
| Claude Code without an interactive terminal | Start a new session to load plugin MCP changes. |
| Codex plugin | Check plugin/MCP status first: recent versions support live refresh. If tools remain missing, fully quit and reopen the desktop app, or exit and resume the CLI. |
| Grok plugin | Restart Grok after a plugin refresh when setup requests it. |
| Standalone MCP configuration | If Mercator is missing, restart the client, then authorize. Plugin reload may not load standalone registrations. |
Codex AGENTS.md guidance | Start a new session to load changed instructions. |
For immediate terminal access, use the CLI MCP client.
Claude Code
User MCP registration and Mercator plugin.
mercator setup --client claudeIn Claude Code, run /mcp, select Mercator, and complete browser authorization.
See Claude Code MCP.
Codex
Local Codex MCP registration. Setup picks the newest Codex 0.151.0 or newer from PATH and the
ChatGPT or Codex app bundle, and prints its path and version. Override with --codex-path or
MERCATOR_CODEX_BIN.
mercator setup --client codexRun codex mcp login mercator to authorize. See Codex MCP configuration.
Cursor
User MCP configuration in ~/.cursor/mcp.json.
mercator setup --client cursorOpen Cursor's Customize page, find Mercator under MCP servers, and complete its OAuth sign-in. See Cursor MCP.
Visual Studio Code
MCP registration through the code command, or the CLI bundled in Visual Studio Code on macOS.
Setup reads the user mcp.json to detect an existing registration.
mercator setup --client vscodeRun MCP: List Servers from the Command Palette, select Mercator, and start it. Complete any trust and sign-in prompts, then enable its tools in agent chat. See VS Code MCP.
Gemini CLI
User MCP registration.
mercator setup --client geminiIn Gemini CLI, run /mcp auth mercator and complete browser authorization.
See Gemini MCP authentication.
Cline
Cline CLI settings in ~/.cline/data/settings/cline_mcp_settings.json, or CLINE_MCP_SETTINGS_PATH.
mercator setup --client clineRun cline mcp, select Mercator, and complete browser authorization; use Authorize OAuth to
retry. The IDE extension keeps its own settings: use MCP Servers > Remote Servers there.
See Cline MCP configuration.
Continue
Project .continue/mcpServers/mercator.json.
mercator setup --client continueUse Agent mode in Continue and complete the OAuth sign-in for Mercator. See Continue MCP.
Windsurf
User ~/.codeium/windsurf/mcp_config.json.
mercator setup --client windsurfOpen MCPs in the Cascade panel, select Mercator, and complete OAuth authorization. See Cascade MCP.
Grok
User MCP registration and Mercator plugin.
mercator setup --client grokOpen /mcps, select Mercator, and press i to authorize.
See Grok MCP.
Hermes
Native MPP integration at /mcp, not hosted OAuth.
mercator setup --client hermesThe installer selects /mcp and sets up the hermes-mpp payment plugin. Complete any
remaining plugin and wallet steps it prints before paid use. Native MPP requires quote approval
or an explicit spending budget. See Hermes MCP commands.
Kiro
User ~/.kiro/settings/mcp.json.
mercator setup --client kiroConnect to Mercator from Kiro's MCP controls and complete the browser authorization it opens. See Kiro MCP authentication.
LM Studio
User ~/.lmstudio/mcp.json.
mercator setup --client lmstudioEnable Mercator in LM Studio and complete the browser authorization it opens. See LM Studio MCP authentication.
Muse Code
XDG Muse settings, normally ~/.config/muse/settings.json.
mercator setup --client museRun muse mcp login mercator to authorize.
OpenClaw
Native MCP configuration with OAuth enabled.
mercator setup --client openclawInteractive setup starts login; otherwise run openclaw mcp login mercator.
See OpenClaw OAuth.
Zed
context_servers in Zed user settings.
mercator setup --client zedOpen Settings > AI > MCP Servers and complete Mercator's OAuth prompt. Use it from Zed's Agent Panel. See Zed MCP.
Claude Desktop chat and Claude web
- Open Customize > Connectors, click +, then Add custom connector in Claude Desktop or claude.ai.
- Name it Mercator and enter
https://mercator.sh/mcp/auth. - Complete Claude's connection and authorization flow, then check the free
search_servicesandget_connection_statustools in your conversation.
This uses Claude's remote connector; no terminal installation is required. The user completes authorization and chooses wallet limits. See Claude's connector guide if your organization manages connector access.
Cowork can use the same remote connector. If the connector controls are unavailable, check the host's current account and organization requirements; installing a CLI inside the conversation does not enable them.
ChatGPT web
Where your account and workspace permit custom apps:
- Enable Developer mode in Settings > Security and login.
- Open Plugins, use the + button, and create a developer-mode app named Mercator.
- Enter
https://mercator.sh/mcp/auth, choose OAuth, and complete authorization. If prompted for a registration method, use dynamic client registration (DCR). - Select the app from the conversation's Developer mode tools, then verify the connection.
Follow OpenAI's developer-mode guide
for current availability and controls. A local Codex registration or mercator login does not
authorize this ChatGPT connection. Do not run the installer in ChatGPT's code-execution sandbox.
Managed and remote environments
- Cloud or team-managed agents: use the host's native plugin or connector controls. Where it
supports remote MCP with OAuth, add
https://mercator.sh/mcp/authusing Streamable HTTP and complete authorization. An administrator may need to enable the integration first. - SSH, containers, and remote development: run setup where the intended agent client runs. Configuration written there does not configure a separate desktop app. If the browser cannot reach the client's loopback callback, use Mercator's browser handoff and copy the completion link back to the same client. Use its documented code input or port forwarding if it cannot accept the full link. Hosted and app-link callbacks return normally.
- No connector controls or compatible OAuth support: use a supported client instead. Do not repeatedly run the installer in a disposable sandbox or paste tokens or private keys into chat.
- Unclear app or mode: identify it before choosing a setup path. Claude Code, Claude Desktop chat, local Codex, and ChatGPT web do not share one installation or authorization flow.
Verify the connection
In the client you connected, ask:
Use Mercator to search for web research services, then check my connection status.
Do not create a paid job.- Confirm the agent can call
search_servicesandget_connection_status; both checks are free. The status response includes the wallet address and public access-key address. - For a REST client, call
GET /v1/connection/statuswith its/mcp/authOAuth bearer token. Missing, invalid, or revoked tokens return401; the response is never cached. - Follow any returned authorization or funding steps. Registration, a browser account login, or an HTTP 401 challenge alone does not prove the client's connection is ready.
- Hosted OAuth: choose wallet limits and expiry during authorization. Zero limits allow connecting without spending authority; a successful connection does not imply paid readiness.
- Hermes/native MPP:
get_connection_statusreportsmcp_challengewithout wallet balances. Check the native payment plugin and wallet separately; this response does not verify spending readiness. - Keep each client's authorization in that client. CLI login and
mercator doctorcannot verify credentials owned by another agent host.
Connection and payment readiness
Check the connected client's payment capacity before submitting a paid job. Use the browser handoff steps when authorization opens inside another app or remote machine.
Check spending readiness
Call get_connection_status in your authorized client. Its readiness field separates
OAuth authorization, wallet binding, funding, spend policy, and paid-execution capacity.
Each token reports its balance, remaining allowance, and spendableNow when known.
A grant ceiling is not a balance; unavailable values are not zero. Compare the quoted
amount with that token's capacity before submitting a job.
Hosted OAuth allows paid jobs within your signed limits and explicit budget without
per-job confirmation. Legacy payment challenges require approval or a sufficient budget.
Free discovery and quotes remain available when unfunded. Use Account to fund
or manage access, then repeat the free check. mercator doctor checks the CLI connection;
it cannot verify credentials held by another client.
Browser handoff
If onboarding opens inside an app that cannot use your passkey, expand Continue in another browser and copy the browser sign-in link. Paste it into the browser where you keep your passkeys and GitHub session. Approve the connection there. Keep the link private.
The link starts a fresh browser-bound authorization for the same client request. Copying
an /account?authorization=... URL does not work in another browser because its cookie
stays in the original browser. A website cannot force an external browser to open.
For a localhost callback, Mercator shows a completion page after approval. Select Return to
your client when the browser is on the same device. If you are connecting on another device,
copy the one-time link and return it to the same client connection. With mercator login, paste the link or code at the
terminal prompt. Keep it private. Restart authorization from the client if the link expires or
the page is lost.
Other callback paths:
- Hosted and app-link callbacks, including clients that return to their own browser, continue automatically.
- OpenClaw accepts the code from the completion link with its documented
openclaw mcp login mercator --code CODEfallback. - For a localhost callback over SSH, you can instead forward the exact port printed by
the client:
ssh -L PORT:127.0.0.1:PORT USER@AGENT_HOST. Keep the tunnel open while completing sign-in.
After returning, call the free search_services and get_connection_status tools in the
original client. Opening the link or signing into the website alone does not verify the
client connection. GitHub MACH claims run in the selected browser's Account session.
CLI reference
Install, configure, and call Mercator from your terminal.
- The installer downloads a checksum-verified standalone executable; Node.js and Bun are not required.
- It updates the active shell's PATH profile when needed.
- A failed reinstall keeps the existing executable.
Configuration
Pass setup arguments after sh -s --:
curl -fsSL https://mercator.sh/install.sh | sh -s -- --client codex- Codex/ChatGPT desktop: Installs one local plugin by default. ChatGPT web uses the separate developer-mode app setup.
- Claude Code and Grok CLI: Registers the public
tempoxyz/pluginsmarketplace and installs its Mercator plugin. - No detected client: Installs the local desktop plugin when enabled. Install a supported
client and rerun setup, or use
mercator setup --manualfor other MCP clients. - Cloud/team marketplaces: Managed by the host.
CLI commands
| Command | Purpose |
|---|---|
mercator login | Authorize the CLI through browser OAuth. |
mercator logout | Remove local CLI credentials. |
mercator tools | List live MCP tools and schemas. |
mercator call <tool> --input '{…}' | Invoke an MCP tool. |
mercator setup | Connect Mercator to installed agent clients. |
mercator status | Show client registrations and connection status. |
mercator account | Manage hosted wallet access, limits, funding, and revocation. |
mercator refresh | Update and refresh existing managed integrations using saved setup choices. |
mercator doctor | Check MCP transport, discovery, and local integrations. |
mercator uninstall | Remove MCP registrations, the plugin, and managed guidance. |
mercator local | Use a separate local wallet and submit REST jobs. |
Use the CLI as an MCP client
- Run
mercator loginand complete browser authorization. - Inspect live tools with
mercator tools. - Call a tool with
mercator call:
mercator login
mercator tools
mercator call get_connection_status
mercator call search_services \
--input '{
"query": "web research"
}'
mercator doctormercator setupreuses existing CLI credentials to check discovery and spending capacity. Interactivemercator setup --loginsigns in when needed.- The CLI connection is named mercator cli; agent clients authorize separately.
- Setup authorizes the CLI only with
--login; CLI login creates a separate access key that can spend. --yes, non-interactive setup, andmercator refreshnever launch login.- Cancelled login leaves integrations installed; retry with
mercator setup --login. - Choose wallet limits in the browser authorization flow. Login and doctor create no paid jobs.
- If approval happens on another device, copy the completion link and paste it into the waiting
mercator loginprompt. The CLI also accepts the code from that link. toolsreturns current tool descriptions and input schemas.callaccepts a JSON object and returns the MCP result; tool errors exit nonzero. Paid tools use the connection's approved limits.- Credentials stay in endpoint-scoped, owner-only files under
~/.local/share/mercator/oauth/. Expiring bearers refresh automatically. Other agent clients retain their own authorization. - The Tempo access key remains valid until revoked by default. Revoke the connection in Account to disable OAuth first, then ask Tempo Wallet to revoke the on-chain key. For a key that has not yet been published, Account returns its signed public authorization so Wallet can authorize and revoke it in one transaction.
mercator logoutremoves local CLI credentials. Revoke mercator cli in Account to revoke its wallet access.
Setup options
| Option | Behavior |
|---|---|
--client <name> | Configure one client; repeat for several. IDs: claude, cline, codex, continue, cursor, gemini, grok, hermes, kiro, lmstudio, muse, openclaw, vscode, windsurf, and zed. |
--url <url> | Use another Mercator MCP endpoint, including a local development endpoint. |
--dry-run | Preview configuration changes without writing them. |
--yes | Select every detected client unless --client is specified, and apply without setup prompts or installer-initiated login. Existing CLI credentials are reused. |
--login | Also authorize the Mercator CLI during readiness checks. Creates a separate spending access key; agent clients authorize on their own. |
--codex-path <path> | Use this absolute Codex executable instead of discovery. MERCATOR_<CLIENT>_BIN, such as MERCATOR_CODEX_BIN or MERCATOR_VSCODE_BIN, sets a persistent override. |
--verbose | Keep progress output and append detailed setup diagnostics. |
--manual | Print MCP/OAuth connection instructions without configuring integrations. Incompatible with --client, --force, and --remove-agents. |
--force | Recreate MCP registrations; complete native OAuth in the client. |
--plugin / --no-plugin | Enable or disable the local desktop plugin. Enabled by default. |
--skill / --no-skill | Include or omit the Mercator skill inside the plugin. Included by default. |
--agents / --no-agents | Enable or disable managed Codex AGENTS.md guidance. Enabled by default. |
--remove-agents | Remove only managed Codex guidance and stop; incompatible with --force and --no-agents. |
The bootstrap installer accepts these environment overrides:
| Variable | Behavior |
|---|---|
MERCATOR_BIN_DIR | Set the executable directory; highest precedence. Relative paths are resolved before installation. |
MERCATOR_INSTALL_DIR | Set the executable directory when MERCATOR_BIN_DIR is unset. |
INSTALL_DIR | Generic fallback when neither Mercator-specific directory is set. |
MERCATOR_INSTALLER_URL | Download a specific trusted HTTPS release installer. |
MERCATOR_NO_MODIFY_PATH=true | Leave shell profiles unchanged and print the PATH command instead. |
MERCATOR_SKIP_SETUP=true | Install the CLI without running setup. Run mercator setup later. |
Install the plugin from the Tempo marketplace
The installer bootstraps the Mercator plugin for detected supported clients. To install it directly,
add the public Tempo marketplace and select the mercator@tempo plugin:
Codex
codex plugin marketplace add tempoxyz/plugins --ref main
codex plugin add mercator@tempoClaude Code
claude plugin marketplace add tempoxyz/plugins
claude plugin install mercator@tempo --scope userGrok
grok plugin marketplace add tempoxyz/plugins
grok plugin install mercator@tempoManual installation
Merge configuration examples into the existing file; preserve other servers and settings.
- Run
mercator setup --manual. - Add
https://mercator.sh/mcp/authusing Streamable HTTP. - Complete OAuth in the client; use the registration instructions if it requires a client ID.
- Verify with
search_servicesandget_connection_statusthere.
- Registration or a 401 challenge does not prove payment readiness.
mercator doctorcannot read client-managed credentials.
You can register the remote MCP endpoint directly in a supported harness:
- For harnesses with tool search, such as Claude Code and Codex, append
?tools=allto the URL to list every catalog service as its own tool. Omit it for clients that load every tool into context.
Codex
codex mcp add mercator --url https://mercator.sh/mcp/auth --oauth-client-registration dcrClaude Code
claude mcp add --scope user --transport http mercator https://mercator.sh/mcp/authGemini CLI
gemini mcp add mercator https://mercator.sh/mcp/auth --transport http --scope userVS Code
code --add-mcp '{"name":"mercator","type":"http","url":"https://mercator.sh/mcp/auth"}'OpenClaw
openclaw mcp set mercator '{"url":"https://mercator.sh/mcp/auth","transport":"streamable-http","auth":"oauth"}'
openclaw mcp login mercatorIf the browser cannot reach OpenClaw's loopback callback, use its documented remote-browser fallback. Do not paste authorization codes into chat.
Hermes
hermes mcp add mercator --url https://mercator.sh/mcpThis registers the MCP server only. Paid use also requires the native MPP plugin and wallet;
mercator setup --client hermes checks the plugin and prints any remaining steps.
Kiro
Add to ~/.kiro/settings/mcp.json:
{"mcpServers":{"mercator":{"url":"https://mercator.sh/mcp/auth"}}}LM Studio
Add to ~/.lmstudio/mcp.json:
{"mcpServers":{"mercator":{"url":"https://mercator.sh/mcp/auth"}}}Muse Code
Bootstrap only Muse's MCP configuration, then authorize with Muse:
mercator setup --client muse --no-plugin --no-agents
muse mcp login mercatorSetup preserves other entries in ~/.config/muse/settings.json (or the XDG_CONFIG_HOME
equivalent), initializes schema_version: 1, and adds Mercator using transport: "streamable_http".
It uses an existing mcpServers map when present, otherwise mcp_servers. Start a new Muse session
and check /mcp. Configuration does not complete OAuth; Muse stores and refreshes the credentials.
This integration does not require Muse's experimental plugin commands.
Zed
Add mercator under context_servers in the Zed user settings file:
{"context_servers":{"mercator":{"url":"https://mercator.sh/mcp/auth"}}}Manual registration saves the server configuration. Complete authorization and
verify the connection in that client. OAuth-capable clients open Account
when authorization is required. Run mercator account to manage wallet access, limits, funding, and revocation.