Docs / MCP deep dive

Tools server (Component A)

POSThttps://mcp.tokensaver.fr/mcp

The @tokensaver/mcp-server exposes tokensaver_* tools that run the governed pipeline. Connect over hosted HTTP (recommended) or run it locally over stdio.

POSThttps://mcp.tokensaver.fr/mcp

Add the server to your MCP client config (Cursor: .cursor/mcp.json) with your TokenSaver key as a Bearer header — no install required:

{
  "mcpServers": {
    "tokensaver": {
      "url": "https://mcp.tokensaver.fr/mcp",
      "headers": { "Authorization": "Bearer ts_YOUR_KEY" }
    }
  }
}

Local stdio

Run the package directly (Node ≥ 20). Useful against a local backend or for development:

{
  "mcpServers": {
    "tokensaver-local": {
      "command": "npx",
      "args": ["-y", "@tokensaver/mcp-server"],
      "env": {
        "TOKENSAVER_API_KEY": "ts_YOUR_KEY",
        "TOKENSAVER_OPENAI_BASE_URL": "https://api.tokensaver.fr/openai/v1",
        "TOKENSAVER_API_BASE_URL": "https://api.tokensaver.fr/api/v1"
      }
    }
  }
}

Environment variables (stdio)

Variable Required Default
TOKENSAVER_API_KEY Yes —
TOKENSAVER_OPENAI_BASE_URL No https://api.tokensaver.fr/openai/v1
TOKENSAVER_API_BASE_URL No https://api.tokensaver.fr/api/v1
TOKENSAVER_APPLY_KEY_DEFAULTS No true applies the key’s saved pipeline settings
TOKENSAVER_DEFAULT_OPTIONS No JSON merged as X-Tokensaver-Options
TOKENSAVER_DEFAULT_MODEL No Platform default

See the full tools catalogue.