Documentation

Connect to Constants MCP

Every tool you build on Constants is reachable through one MCP (Model Context Protocol) endpoint. Connect once and your agent can discover and run every Constants tool you have access to. Newly created tools are usable immediately — no reconnect or tool-list refresh on the client side.

Server URL

https://www.constants.io/api/mcp

This URL is the same for every user. Authorization happens via OAuth in your browser — tokens are scoped to the organization you pick on the consent screen.

How the agent talks to Constants

Constants exposes a fixed set of broker tools. Your agent uses two on the happy path:

  1. constants_search_tools — semantic ranker returning the top matches for each query with full input schemas inlined.
  2. constants_execute_tool — run a tool with { tool_name, arguments } taken straight from the search response.

Two helpers round out the surface: constants_upload for file inputs and constants_check_run for long-running executions. The catalog is never baked into the tool list, so you don't need to refresh the connection when you create a new tool.

01

ChatGPT

Web app — any plan

  1. In ChatGPT: Settings → Plugins → enable Developer Mode.
  2. Go to Plugins → Browse Plugins and click the + next to the search box.
  3. Enter the name Constants and the Server URL above as the MCP link, then click Create.
  4. A browser window will open — sign in to Constants and pick a workspace, then click Authorize.
  5. Your tools are now available in any ChatGPT chat. Type @Constants to enable them per-conversation.
02

Claude

Web and desktop

  1. In Claude web or desktop: Settings → Connectors.
  2. Click Add, then Add custom connector.
  3. Enter Constants as the Name, paste the Server URL above into the Remote MCP server URL field, and click Add.
  4. A browser window will open — sign in and pick a workspace.
  5. Back in Claude, your tools appear in the Connectors menu for every new chat.

On Team or Enterprise: an Owner has to add it first under Organization settings → Connectors → Add.

03

Claude Code

Terminal

Run in your terminal:

claude mcp add constants \
  https://www.constants.io/api/mcp \
  --transport sse

Claude Code will open your browser to complete authorization.

04

Cursor

MCP settings

  1. Cursor Settings → MCPAdd MCP server.
  2. Choose transport: Remote (HTTP/SSE).
  3. Paste https://www.constants.io/api/mcp as the Server URL. Name it constants.
  4. Save — a browser window will open to authorize.

Managing access

Every app you authorize is listed under Settings → Connected apps. Revoke access at any time — the app will stop working instantly, no restart required.

Access tokens are short-lived (15 minutes) and automatically refreshed while you use the app. Long-lived refresh tokens expire after 30 days of inactivity.

CLI / server-to-server

For headless agents, CI jobs, and other server-to-server callers, use an API key instead of OAuth. Generate a key on the Install page, then add it as a Bearer token:

# 1) Discover the static six-tool broker surface
curl -X POST https://www.constants.io/api/mcp \
  -H "Authorization: Bearer wk_..." \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# 2) List the Constants tools installed in your workspace
curl -X POST https://www.constants.io/api/mcp \
  -H "Authorization: Bearer wk_..." \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"constants_search_tools","arguments":{}}}'

# 3) Run a specific tool
curl -X POST https://www.constants.io/api/mcp \
  -H "Authorization: Bearer wk_..." \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"constants_execute_tool","arguments":{"tool_name":"<from search>","arguments":{}}}}'

Standards

Constants MCP implements the MCP authorization specification (OAuth 2.1 + PKCE, dynamic client registration per RFC 7591, and resource indicators per RFC 8707). Any MCP client that speaks this spec will work without configuration.