Skip to content

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

  1. Run the installer in your computer's terminal:

    curl -fsSL https://mercator.sh/install.sh | sh
  2. Select the installed agents you want to connect.

  3. 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 agentSetup path
Claude Code, Codex, Cursor, or another installed clientLocal agents
Claude Desktop chat, Claude web, or CoworkClaude connectors
ChatGPT on the webDeveloper-mode app
Cloud agent, team-managed host, or remote machineManaged and remote environments
Another MCP clientManual installation

Local agents

Run the installer in the terminal where your agent runs:

curl -fsSL https://mercator.sh/install.sh | sh

To configure just one client during installation, pass its ID after sh -s --:

curl -fsSL https://mercator.sh/install.sh | sh -s -- --client cursor

Activate after installation

  1. Load the installed configuration using your client's action below.
  2. Complete the client's OAuth flow. Mercator requests mercator:tools for /mcp/auth.
  3. Call search_services and get_connection_status in 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 refresh updates managed files but does not restart clients.
  • mercator doctor verifies the separate CLI connection.
Client / changeNext step
Claude Code terminal pluginRun /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 terminalStart a new session to load plugin MCP changes.
Codex pluginCheck 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 pluginRestart Grok after a plugin refresh when setup requests it.
Standalone MCP configurationIf Mercator is missing, restart the client, then authorize. Plugin reload may not load standalone registrations.
Codex AGENTS.md guidanceStart 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 claude

In 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 codex

Run codex mcp login mercator to authorize. See Codex MCP configuration.

Cursor

User MCP configuration in ~/.cursor/mcp.json.

mercator setup --client cursor

Open 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 vscode

Run 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 gemini

In 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 cline

Run 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 continue

Use 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 windsurf

Open MCPs in the Cascade panel, select Mercator, and complete OAuth authorization. See Cascade MCP.

Grok

User MCP registration and Mercator plugin.

mercator setup --client grok

Open /mcps, select Mercator, and press i to authorize. See Grok MCP.

Hermes

Native MPP integration at /mcp, not hosted OAuth.

mercator setup --client hermes

The 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 kiro

Connect 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 lmstudio

Enable 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 muse

Run muse mcp login mercator to authorize.

OpenClaw

Native MCP configuration with OAuth enabled.

mercator setup --client openclaw

Interactive setup starts login; otherwise run openclaw mcp login mercator. See OpenClaw OAuth.

Zed

context_servers in Zed user settings.

mercator setup --client zed

Open 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
  1. Open Customize > Connectors, click +, then Add custom connector in Claude Desktop or claude.ai.
  2. Name it Mercator and enter https://mercator.sh/mcp/auth.
  3. Complete Claude's connection and authorization flow, then check the free search_services and get_connection_status tools 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:

  1. Enable Developer mode in Settings > Security and login.
  2. Open Plugins, use the + button, and create a developer-mode app named Mercator.
  3. Enter https://mercator.sh/mcp/auth, choose OAuth, and complete authorization. If prompted for a registration method, use dynamic client registration (DCR).
  4. 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/auth using 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_services and get_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/status with its /mcp/auth OAuth bearer token. Missing, invalid, or revoked tokens return 401; 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_status reports mcp_challenge without 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 doctor cannot 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 CODE fallback.
  • 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/plugins marketplace 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 --manual for other MCP clients.
  • Cloud/team marketplaces: Managed by the host.

CLI commands

CommandPurpose
mercator loginAuthorize the CLI through browser OAuth.
mercator logoutRemove local CLI credentials.
mercator toolsList live MCP tools and schemas.
mercator call <tool> --input '{…}'Invoke an MCP tool.
mercator setupConnect Mercator to installed agent clients.
mercator statusShow client registrations and connection status.
mercator accountManage hosted wallet access, limits, funding, and revocation.
mercator refreshUpdate and refresh existing managed integrations using saved setup choices.
mercator doctorCheck MCP transport, discovery, and local integrations.
mercator uninstallRemove MCP registrations, the plugin, and managed guidance.
mercator localUse a separate local wallet and submit REST jobs.

Use the CLI as an MCP client

  1. Run mercator login and complete browser authorization.
  2. Inspect live tools with mercator tools.
  3. Call a tool with mercator call:
mercator login
mercator tools
mercator call get_connection_status
mercator call search_services \
  --input '{
  "query": "web research"
}'
mercator doctor
  • mercator setup reuses existing CLI credentials to check discovery and spending capacity. Interactive mercator setup --login signs 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, and mercator refresh never 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 login prompt. The CLI also accepts the code from that link.
  • tools returns current tool descriptions and input schemas. call accepts 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 logout removes local CLI credentials. Revoke mercator cli in Account to revoke its wallet access.

Setup options

OptionBehavior
--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-runPreview configuration changes without writing them.
--yesSelect every detected client unless --client is specified, and apply without setup prompts or installer-initiated login. Existing CLI credentials are reused.
--loginAlso 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.
--verboseKeep progress output and append detailed setup diagnostics.
--manualPrint MCP/OAuth connection instructions without configuring integrations. Incompatible with --client, --force, and --remove-agents.
--forceRecreate MCP registrations; complete native OAuth in the client.
--plugin / --no-pluginEnable or disable the local desktop plugin. Enabled by default.
--skill / --no-skillInclude or omit the Mercator skill inside the plugin. Included by default.
--agents / --no-agentsEnable or disable managed Codex AGENTS.md guidance. Enabled by default.
--remove-agentsRemove only managed Codex guidance and stop; incompatible with --force and --no-agents.

The bootstrap installer accepts these environment overrides:

VariableBehavior
MERCATOR_BIN_DIRSet the executable directory; highest precedence. Relative paths are resolved before installation.
MERCATOR_INSTALL_DIRSet the executable directory when MERCATOR_BIN_DIR is unset.
INSTALL_DIRGeneric fallback when neither Mercator-specific directory is set.
MERCATOR_INSTALLER_URLDownload a specific trusted HTTPS release installer.
MERCATOR_NO_MODIFY_PATH=trueLeave shell profiles unchanged and print the PATH command instead.
MERCATOR_SKIP_SETUP=trueInstall 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@tempo
Claude Code
claude plugin marketplace add tempoxyz/plugins
claude plugin install mercator@tempo --scope user
Grok
grok plugin marketplace add tempoxyz/plugins
grok plugin install mercator@tempo

Manual installation

Merge configuration examples into the existing file; preserve other servers and settings.

  1. Run mercator setup --manual.
  2. Add https://mercator.sh/mcp/auth using Streamable HTTP.
  3. Complete OAuth in the client; use the registration instructions if it requires a client ID.
  4. Verify with search_services and get_connection_status there.
  • Registration or a 401 challenge does not prove payment readiness.
  • mercator doctor cannot 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=all to 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 dcr
Claude Code
claude mcp add --scope user --transport http mercator https://mercator.sh/mcp/auth
Gemini CLI
gemini mcp add mercator https://mercator.sh/mcp/auth --transport http --scope user
VS 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 mercator

If 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/mcp

This 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 mercator

Setup 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.