Connect MCP clients
Use this server URL to connect a client manually.
https://gptunnel.ru/mcpIn most clients, the URL is all you need. The client opens a browser to sign in with OAuth on the first request. If the client cannot sign in through a browser or the agent runs on a server, use an MCP key in the Authorization: Bearer gtmcp_… header.
Add the connector once to use it on both claude.ai and Claude Desktop.
- Open Customize → Connectors.
- Click Add, hover over Custom and select Web.
- Enter
GPTunneLas the name andhttps://gptunnel.ru/mcpas the server address. Click Continue. - Keep the sign-in settings Claude discovers and click Continue, then Add.
- Sign in on the GPTunneL page and click Allow.
- In a chat, click + or type
/. Open Connectors and enable GPTunneL.
All Claude plans support custom connectors. The free plan allows one. Administrators on Team and Enterprise plans may restrict who can add them. If your menus differ, see Claude Help.
To sign in through a browser, add the server.
claude mcp add gptunnel --transport http https://gptunnel.ru/mcpThen run /mcp in a Claude Code session, select gptunnel and sign in. To make the server available in all projects, add --scope user when registering it.
For browserless authentication, register the server with an MCP key.
claude mcp add gptunnel --transport http https://gptunnel.ru/mcp \ --header "Authorization: Bearer gtmcp_..."Run claude mcp list to verify the server was added.
Use the ChatGPT web app to add a custom MCP server. Developer mode is optional for this setup.
- Open Plugins (chatgpt.com/plugins).
- Click + and select Add custom MCP server.
- Enter
GPTunneLas the name. Under Connection, usehttps://gptunnel.ru/mcpand select OAuth for authentication. - Select I understand and want to continue and click Create as a plugin.
- Install the plugin, sign in to GPTunneL in the window that opens and click Allow.
- In a new chat, type
@and select GPTunneL. This applies to one message. Mention GPTunneL again in your next request.
Access depends on your plan and role.
- Business, Enterprise and Edu support generation, workflow runs and changes. Business workspace owners and admins can add custom servers. On Enterprise and Edu, admins can grant this permission to members.
- Pro supports read-only use. The agent can view models, workflows and the gallery.
- Other plans are not listed as supporting custom MCP servers in the ChatGPT documentation.
See ChatGPT Help.
Register the server in ~/.cursor/mcp.json for all projects or .cursor/mcp.json in your project root.
{ "mcpServers": { "gptunnel": { "url": "https://gptunnel.ru/mcp" } }}Open Settings → MCP, click Login or Needs login next to the server and sign in through your browser. To authenticate with an MCP key, add "headers": { "Authorization": "Bearer gtmcp_..." } to the server configuration.
Add .vscode/mcp.json to your project or run MCP: Add Server and select HTTP.
{ "servers": { "gptunnel": { "type": "http", "url": "https://gptunnel.ru/mcp" } }}VS Code prompts you to sign in through your browser when you first start the server. Its tools appear in Copilot Chat in Agent mode.
codex mcp add gptunnel --url https://gptunnel.ru/mcpcodex mcp login gptunnelYou can also register the server in ~/.codex/config.toml.
[mcp_servers.gptunnel]url = "https://gptunnel.ru/mcp"To authenticate with an MCP key, set the environment variable containing the token and reference it in the configuration.
[mcp_servers.gptunnel]url = "https://gptunnel.ru/mcp"bearer_token_env_var = "GPTUNNEL_MCP_KEY"Windsurf, Zed, Cline, LibreChat and other clients can connect if they support remote MCP over Streamable HTTP.
- Set the URL to
https://gptunnel.ru/mcp. - Select Streamable HTTP (
http) as the transport. - Use OAuth 2.1 with automatic discovery or set the
Authorization: Bearer gtmcp_...header.
For clients that support only local stdio servers, use the proxy
mcp-remote:
{ "mcpServers": { "gptunnel": { "command": "npx", "args": ["-y", "mcp-remote", "https://gptunnel.ru/mcp"] } }}Connect your own agent
Section titled “Connect your own agent”For a server-side agent, keep an MCP key in an environment variable.
import asyncio, osfrom mcp import ClientSessionfrom mcp.client.streamable_http import streamablehttp_client
async def main(): headers = {"Authorization": f"Bearer {os.environ['GPTUNNEL_MCP_KEY']}"} async with streamablehttp_client("https://gptunnel.ru/mcp", headers=headers) as (read, write, _): async with ClientSession(read, write) as session: await session.initialize() tools = await session.list_tools() me = await session.call_tool("whoami", {}) print(me.content[0].text)
asyncio.run(main())curl -X POST https://gptunnel.ru/mcp \ -H "Authorization: Bearer $GPTUNNEL_MCP_KEY" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "whoami", "arguments": {} } }'The server handles each request independently. You can make this call without sending initialize first. The server sends an SSE event with the JSON-RPC response on its data: line.
import { Client } from '@modelcontextprotocol/sdk/client/index.js'import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'
const transport = new StreamableHTTPClientTransport(new URL('https://gptunnel.ru/mcp'), { requestInit: { headers: { Authorization: `Bearer ${process.env.GPTUNNEL_MCP_KEY}` }, },})
const client = new Client({ name: 'my-agent', version: '1.0.0' })await client.connect(transport)
const { tools } = await client.listTools()const me = await client.callTool({ name: 'whoami', arguments: {} })The Claude catalog’s media library uses /mcp/claude. To use lab_quote and lab_generate, add a connection to https://gptunnel.ru/mcp with the required permissions.
Verify the connection
Section titled “Verify the connection”Ask the agent “Check my GPTunneL connection and tell me which permissions it has.” It will call whoami and show the connection’s permissions. Listing your five latest generations and listing image models are also free.
Use an organization balance
Section titled “Use an organization balance”Tell the agent which organization should pay, for example “Use the Marketing organization’s balance.” The agent finds the organization with list_orgs. By default, GPTunneL charges the personal balance. A connection can use an organization balance only if its spending settings allow it.