Developer docs

Connect your tools

Add a claimed link as an MCP tool in your assistant, or call the Share Link API directly from your own app.

Get the link URL and key

  1. The host creates a Claimable link with Allow API access enabled on a Pro account. The recipient signs in to ShareMyTokens and claims it.
  2. In the claimed chat, open API access. Generate a key if needed, then click Copy MCP URL and Copy key.
  3. Use the smt_… key from that same link. Keep it in the app’s credential field or an environment variable. Keep it out of chats and shared config files.

In the examples, replace YOUR_LINK_ID by pasting the full MCP URL from your link. When an example contains YOUR_LINK_KEY, enter your key in the app’s private header setting where available. Keep any personal config containing the key out of shared projects and version control.

MCP tool
MCP server URL
Claude and compatible assistants. The assistant can check the balance or ask the link’s model.
Share Link API
API endpoint or OpenAI base URL
Apps and scripts using the host’s link allowance. The endpoint depends on the provider attached to the link.
Account API
Base URL in Settings → Account API
Apps and scripts using your own connected provider keys. Call /models to see the model IDs you can try.
Set the key for a config file

Run the snippet for your shell, then launch your client from that same terminal so it inherits SMT_LINK_KEY.

PowerShell
$smtKey = Read-Host 'Paste your ShareMyTokens link key' -AsSecureString
$env:SMT_LINK_KEY = [System.Net.NetworkCredential]::new('', $smtKey).Password
Remove-Variable smtKey
Bash
read -rs -p 'Paste your ShareMyTokens link key: ' SMT_LINK_KEY
printf '\n'
export SMT_LINK_KEY

Claude web

  1. In Claude, open Customize → Connectors → Add and choose the option to add a custom web connector. Some versions list connectors under Plugins.
  2. Name it ShareMyTokens, paste the copied URL ending in /mcp, and select Continue.
  3. Choose No sign-in. Under Request headers, add Authorization and enter Bearer, a space, and the full link key.
  4. Select Add, then Connect if prompted. Open a chat, select +, and enable ShareMyTokens under Connectors or Plugins.

If Claude says it couldn’t reach ShareMyTokens, check that the URL ends in /mcp and that you copied the full key for that link. To fix saved authentication settings, remove the connector and add it again. If your account doesn’t show Request headers, try the Claude Code config. Claude connector settings

Claude Desktop

Sign in to the same Claude account and open the Chat tab. Follow the Claude connector setup in the desktop app, or enable the connector you already added on the web through + → Plugins. A successful connection lists check_allowance and ask_shared_model.

Claude Code

From the desktop Code tab, open your existing session or start a new one. With the same Claude account, Claude Code can use the connector you added in Claude. If it’s missing, reopen the session. In the CLI, run /mcp to check whether ShareMyTokens is listed.

Set up Claude Code with a config file

For a direct setup, merge this entry into .mcp.json in your project root. Replace the example URL with your copied URL and make SMT_LINK_KEY available in the environment that starts Claude Code.

.mcp.json
{
  "mcpServers": {
    "ShareMyTokens": {
      "type": "http",
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer ${SMT_LINK_KEY}"
      }
    }
  }
}

Choose either the account connector or the config file for the same URL. Claude Code uses its own model allowance to run the session. Requests sent through Ask shared model use the share link’s allowance. Claude Code MCP documentation

Cursor

In Cursor, open Settings → Tools & MCP and go to the custom MCP configuration. Merge this entry into your personal ~/.cursor/mcp.json or the project’s .cursor/mcp.json. Replace the example URL and set SMT_LINK_KEY in the environment Cursor starts from. Check the server in the MCP tools list. Cursor MCP documentation

Cursor mcp.json
{
  "mcpServers": {
    "ShareMyTokens": {
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer ${env:SMT_LINK_KEY}"
      }
    }
  }
}

OpenCode

In OpenCode v2, merge this entry into opencode.jsonc in your project or user config. Replace the example URL and set SMT_LINK_KEY before starting OpenCode. Run /mcps inside the app to see the connection status. OpenCode MCP documentation

opencode.jsonc
{
  "mcp": {
    "servers": {
      "ShareMyTokens": {
        "type": "remote",
        "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
        "oauth": false,
        "headers": {
          "Authorization": "Bearer {env:SMT_LINK_KEY}"
        }
      }
    }
  }
}

VS Code with Copilot

  1. Select Copilot in Chat, then run Chat: Open Customizations from the Command Palette. Under MCP Servers, add an HTTP server with your copied MCP URL.
  2. Choose Global → Copilot Global. In the config form, set the Authorization header to Bearer ${SMT_LINK_KEY}. Set the variable in the environment that launches VS Code.
  3. Or merge the example below into your personal ~/.copilot/mcp-config.json. Run MCP: List Servers to inspect the connection.
Copilot mcp-config.json
{
  "mcpServers": {
    "ShareMyTokens": {
      "type": "http",
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer ${SMT_LINK_KEY}"
      },
      "tools": [
        "check_allowance",
        "ask_shared_model"
      ]
    }
  }
}

VS Code MCP configuration reference

Codex

In Codex or its IDE extension, open MCP settings and add a Streamable HTTP server named ShareMyTokens. Set the URL and point the bearer token setting to the SMT_LINK_KEY environment variable where available. The TOML below works in the user config. Restart Codex from the environment with the key and run codex mcp list to check it.

~/.codex/config.toml
[mcp_servers.ShareMyTokens]
url = "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp"
bearer_token_env_var = "SMT_LINK_KEY"

Codex documentation

GitHub Copilot CLI

In an interactive GitHub Copilot CLI session, open /mcp and choose to add a server. Name it ShareMyTokens and select HTTP. Enter the MCP URL, then open HTTP Headers and add the Authorization header. Or use the personal config below with SMT_LINK_KEY set. Open /mcp again to check the server.

~/.copilot/mcp-config.json
{
  "mcpServers": {
    "ShareMyTokens": {
      "type": "http",
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer ${SMT_LINK_KEY}"
      },
      "tools": [
        "check_allowance",
        "ask_shared_model"
      ]
    }
  }
}

GitHub Copilot CLI documentation

Gemini CLI

Merge the example into your personal Gemini CLI settings and enter the header privately. Gemini CLI uses httpUrl for Streamable HTTP. Start Gemini CLI, run /mcp, and check that the two ShareMyTokens tools are listed.

~/.gemini/settings.json
{
  "mcpServers": {
    "ShareMyTokens": {
      "httpUrl": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LINK_KEY"
      }
    }
  }
}

Gemini CLI documentation

Windsurf

In Windsurf’s Cascade, open the MCP settings and choose the raw config option. Add a custom Streamable HTTP server using serverUrl and a bearer header, then refresh the MCP list. If your version presents a form, enter the same URL and Authorization header there.

Windsurf mcp_config.json
{
  "mcpServers": {
    "ShareMyTokens": {
      "serverUrl": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LINK_KEY"
      }
    }
  }
}

Windsurf documentation

Cline

Open Cline’s MCP Servers manager and choose a remote Streamable HTTP server, or open Configure to edit the settings file. Enter the MCP URL and bearer header. In Cline CLI, use cline config mcp to manage the connection.

cline_mcp_settings.json
{
  "mcpServers": {
    "ShareMyTokens": {
      "type": "streamableHttp",
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LINK_KEY"
      }
    }
  }
}

Cline documentation

Amp

In Amp’s MCP server settings, add a personal remote server. Use your MCP URL and set the Authorization header as a secret. In local Amp configuration, add amp.mcpServers and supply SMT_LINK_KEY in Amp’s environment.

Amp settings.json
{
  "amp.mcpServers": {
    "ShareMyTokens": {
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer ${SMT_LINK_KEY}"
      }
    }
  }
}

Amp documentation

Antigravity

Open MCP Servers in Antigravity and choose Manage MCP Servers → View raw config. Merge this server entry, supply the link key in your personal configuration, then refresh the list.

Antigravity mcp_config.json
{
  "mcpServers": {
    "ShareMyTokens": {
      "serverUrl": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LINK_KEY"
      }
    }
  }
}

Antigravity documentation

OpenClaw

Open MCP Servers in the OpenClaw Gateway. Add ShareMyTokens with the Streamable HTTP transport, then use the scoped config editor to set the Authorization header. Keep the value in the Gateway’s protected configuration and restrict who can invoke the tools. Use openclaw mcp doctor ShareMyTokens --probe to check the connection.

OpenClaw Gateway config
{
  "mcp": {
    "servers": {
      "ShareMyTokens": {
        "transport": "streamable-http",
        "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
        "headers": {
          "Authorization": "Bearer YOUR_LINK_KEY"
        }
      }
    }
  }
}

OpenClaw documentation

Droid (Factory)

In Droid, open /mcp and add an HTTP server, or merge this entry into your personal Factory config. Start Droid with SMT_LINK_KEY set and use /mcp to check the connection.

~/.factory/mcp.json
{
  "mcpServers": {
    "ShareMyTokens": {
      "type": "http",
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer ${SMT_LINK_KEY}"
      },
      "oauth": false
    }
  }
}

Droid (Factory) documentation

Goose

In Goose, open Extensions and add a Streamable HTTP extension. Enter the copied MCP URL and set the bearer header. You can also merge the entry into the extensions section of your personal Goose config.

Goose config.yaml
extensions:
  sharemytokens:
    name: ShareMyTokens
    type: streamable_http
    uri: https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp
    enabled: true
    headers:
      Authorization: "Bearer YOUR_LINK_KEY"

Goose documentation

Kilo Code

In the Kilo VS Code extension, open Settings → MCP → Add Server → Remote (HTTP) and enter the URL and bearer header. For the CLI, merge this entry into your personal Kilo config. Verify that the server is enabled in the MCP list.

Kilo kilo.jsonc
{
  "mcp": {
    "ShareMyTokens": {
      "type": "remote",
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LINK_KEY"
      },
      "oauth": false
    }
  }
}

Kilo Code documentation

Kiro CLI

Add this remote server to your personal Kiro MCP configuration. Kiro IDE and Kiro CLI can share the same file. Start a CLI session with access to the server and open /mcp to see whether it connected.

~/.kiro/settings/mcp.json
{
  "mcpServers": {
    "ShareMyTokens": {
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LINK_KEY"
      }
    }
  }
}

Kiro CLI documentation

Hermes Agent

Merge the entry into your Hermes profile config and make SMT_LINK_KEY available to that profile. Reload the MCP servers with /reload-mcp and ask for a balance check.

Hermes config.yaml
mcp_servers:
  sharemytokens:
    url: https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp
    headers:
      Authorization: "Bearer ${SMT_LINK_KEY}"

Hermes Agent documentation

Roo Code

In Roo Code, open the MCP Servers panel and edit your global MCP settings. Use the Streamable HTTP transport and include the Authorization header for your personal connection. Check that Roo lists both tools before using the shared model.

Roo Code MCP settings
{
  "mcpServers": {
    "ShareMyTokens": {
      "type": "streamable-http",
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LINK_KEY"
      }
    }
  }
}

Roo Code documentation

TRAE

In TRAE, open Settings → MCP → Add → Add Manually. With Node.js and npm installed, use the local stdio bridge in this example. Replace the URL with your MCP URL and give the bridge an absolute path to a private text file outside your project. Put one line in that file, Authorization: Bearer followed by a space and your link key. Restrict the file to your account. Save the config, enable the tool for your agent, and run the allowance check.

TRAE MCP config
{
  "mcpServers": {
    "ShareMyTokens": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@0.16.7",
        "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
        "--transport",
        "http-only",
        "--header-file",
        "YOUR_PRIVATE_HEADER_FILE"
      ]
    }
  }
}

TRAE documentation

Zed

In Zed, open Settings → AI → MCP Servers and add a custom server, or edit your personal Zed settings. Add the URL and Authorization header, then check for the active indicator.

Zed settings.json
{
  "context_servers": {
    "ShareMyTokens": {
      "url": "https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LINK_KEY"
      }
    }
  }
}

Zed documentation

Continue

Add an MCP server in Continue’s local config. Use Agent mode with a tool-capable model, then check whether the ShareMyTokens tools appear before making a model request.

Continue config.yaml
mcpServers:
  - name: ShareMyTokens
    type: streamable-http
    url: https://api.sharemytokens.com/v1/share/YOUR_LINK_ID/mcp
    requestOptions:
      headers:
        Authorization: "Bearer YOUR_LINK_KEY"

Continue documentation

Aider

Aider uses the direct API. For an OpenAI, Mistral, or OpenRouter claimed link, copy its OpenAI base URL and make the link key available as OPENAI_API_KEY. Start Aider with streaming disabled. The link selects its primary provider. To use your own provider keys, use your Account API base URL instead and choose an ID listed by its models endpoint. Test with a short text request before relying on editor automation.

Aider CLI example
aider --openai-api-base https://api.sharemytokens.com/v1/share/YOUR_LINK_ID --model openai/gpt-4o-mini --no-stream

Aider documentation

What the MCP tools do

check_allowance
Takes no arguments. Returns the link provider, remaining total and daily tokens, the next UTC daily reset when a daily limit is set, and the link’s expiration. It uses zero model tokens.
ask_shared_model
Takes one plain-text prompt of up to 8,000 characters and returns a text reply. The link’s primary provider handles the request. Each call uses the shared allowance and can request up to 512 output tokens, subject to the remaining budget.

The host’s total budget, daily limit, expiry, and revocation apply across browser chat, API, and MCP. Model prompts go to the provider attached to the link. To continue a conversation, your assistant must include the relevant context in the next tool call.

Protocol, test scripts, and compatibility checks

Test the connection in chat

Check your allowance
Use ShareMyTokens to check my remaining token allowance.

Look for the Check allowance tool call and your balance. This check uses zero tokens from the link.

Ask the shared model
Use ShareMyTokens to ask the shared model to reply only "OK".

This call uses tokens from the link. If you want to use it for follow-ups in an existing conversation, give the assistant an instruction for that session.

Use the tool for this session
For the rest of this session, use ShareMyTokens’ Ask shared model tool for my questions and follow-ups. Include the context the shared model needs, and ask before sending anything private.

The shared model receives the prompt and any context your assistant includes in the tool call. Look for the tool call when you want to confirm which model answered.

For another MCP client, use remote Streamable HTTP with the same bearer header. MCP reference and PowerShell test

Connect your own app

For a direct API request, copy the full API endpoint from the claimed link. If the app supports an OpenAI-compatible provider, open its provider settings, paste the value from Copy base URL into the base URL field, and put your link key in its API key field. That option appears on eligible links. For code-based setup, the API reference covers the provider-specific endpoints and headers, with JavaScript, Python, and curl examples. Share Link API reference

For your own provider accounts, use Settings → Account API. The Account API exposes a single OpenAI-style base URL for the providers you have connected. Account API reference

Brand marks identify the listed tools and belong to their respective owners.