# Connect your agent

How to connect Claude, ChatGPT, Cursor, VS Code, n8n or your own code to Paygynt's MCP server, by signing in or with the agent's key.

Paygynt's MCP server is `https://mcp.paygynt.com/mcp`. Pick your app. Signing in is easiest: there is no key to copy, and you approve the app for one agent in Paygynt. Apps that cannot sign in take the agent's key instead: replace `YOUR_AGENT_KEY` with it.

## Claude Code

Sign in:

```
claude mcp add --transport http paygynt https://mcp.paygynt.com/mcp
# then, in Claude Code, run /mcp, choose paygynt and Authenticate
```

With the agent's key:

```
claude mcp add --transport http paygynt https://mcp.paygynt.com/mcp --header "Authorization: Bearer YOUR_AGENT_KEY"
```

## claude.ai

Sign in:

```
In claude.ai, add a custom connector with this address:
https://mcp.paygynt.com/mcp
Then choose Connect, sign in to Paygynt, and pick the agent.
```

## ChatGPT

Sign in:

```
In ChatGPT, add an app or connector with this address, and OAuth as its sign-in:
https://mcp.paygynt.com/mcp
Then sign in to Paygynt and pick the agent.
```

## Cursor

Sign in:

```
// ~/.cursor/mcp.json: no key; Cursor asks you to sign in
{
  "mcpServers": {
    "paygynt": {
      "url": "https://mcp.paygynt.com/mcp"
    }
  }
}
```

With the agent's key:

```
// ~/.cursor/mcp.json, or .cursor/mcp.json in a project
{
  "mcpServers": {
    "paygynt": {
      "url": "https://mcp.paygynt.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_AGENT_KEY"
      }
    }
  }
}
```

## VS Code

Sign in:

```
// .vscode/mcp.json: no key; VS Code asks you to sign in
{
  "servers": {
    "paygynt": {
      "type": "http",
      "url": "https://mcp.paygynt.com/mcp"
    }
  }
}
```

With the agent's key:

```
// .vscode/mcp.json in your workspace
{
  "servers": {
    "paygynt": {
      "type": "http",
      "url": "https://mcp.paygynt.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_AGENT_KEY"
      }
    }
  }
}
```

## n8n

With the agent's key:

```
In an AI Agent's MCP Client Tool node:
Endpoint: https://mcp.paygynt.com/mcp
Server Transport: HTTP Streamable
Authentication: Header Auth, with a new credential:
  Name: Authorization
  Value: Bearer YOUR_AGENT_KEY
```

## OpenAI API

With the agent's key:

```
from openai import OpenAI

client = OpenAI()
response = client.responses.create(
    model="gpt-5",
    tools=[{
        "type": "mcp",
        "server_label": "paygynt",
        "server_url": "https://mcp.paygynt.com/mcp",
        "headers": {"Authorization": "Bearer YOUR_AGENT_KEY"},
        "require_approval": "never",  # the agent's budget and approvals on Paygynt still apply
    }],
    input="Find a weather API and get tomorrow's forecast for Austin, TX.",
)
print(response.output_text)
```

## Claude API

With the agent's key:

```
import anthropic

client = anthropic.Anthropic()
response = client.beta.messages.create(
    model="claude-opus-5-5",
    max_tokens=16000,
    betas=["mcp-client-2025-11-20", "server-side-fallback-2026-07-01"],
    fallbacks="default",  # if the model declines, another model carries on
    mcp_servers=[{"type": "url", "url": "https://mcp.paygynt.com/mcp", "name": "paygynt", "authorization_token": "YOUR_AGENT_KEY"}],
    tools=[{"type": "mcp_toolset", "mcp_server_name": "paygynt"}],
    messages=[{"role": "user", "content": "Find a weather API and get tomorrow's forecast for Austin, TX."}],
)
print("".join(b.text for b in response.content if b.type == "text"))
```

## Other apps

With the agent's key:

```
{
  "mcpServers": {
    "paygynt": {
      "type": "http",
      "url": "https://mcp.paygynt.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_AGENT_KEY"
      }
    }
  }
}
```

## Disconnect an app

In Paygynt, open the agent, then Keys and connected apps. Remove the app, or revoke the key. Its next request is refused at once.
