Developer guide

How to connect Claude or ChatGPT to Coolie with MCP

Add https://trycoolie.ai/api/mcp as a custom connector in Claude, or as a connector in ChatGPT's developer mode, keep the sign-in, log in to Coolie and click Allow. The connection signs in with OAuth 2.1 and appears in Settings → API keys, where you can revoke it. Then ask in plain words: set up an agent for a market, show today's leads, find this person's email, pause an agent. In Claude Code it takes one command: claude mcp add --transport http coolie https://trycoolie.ai/api/mcp.

Updated

Before you start

  • A Coolie account with its 7-day free trial started: the API answers 402 trial_required before that. A call costs what the same action costs in the app, and nothing more.
  • Claude (web, desktop or mobile), ChatGPT with developer mode, Claude Code, Cursor, VS Code or another client of the Model Context Protocol.

Claude (web, desktop and mobile)

  1. Open Claude's connectors

    In Claude's settings, open Connectors and click Add custom connector. On a Team or Enterprise plan, an Owner adds it in Organization settings → Connectors.

  2. Paste Coolie's address

    Enter https://trycoolie.ai/api/mcp, keep Sign in now, click Add, then Connect.

  3. Allow the connection

    Log in to Coolie and click Allow. The connection gets a key of its own, listed in Settings → API keys, where you can revoke it.

ChatGPT

  1. Turn on developer mode

    In ChatGPT's settings, open Connectors, with developer mode on.

  2. Create the connector

    Create a connector, paste https://trycoolie.ai/api/mcp and choose OAuth.

  3. Allow the connection

    Log in to Coolie when ChatGPT asks, and click Allow.

Claude Code

One command adds the server; then type /mcp in Claude Code to sign in.

Shell
claude mcp add --transport http coolie https://trycoolie.ai/api/mcp
With an API key instead of the sign-in
claude mcp add --transport http coolie https://trycoolie.ai/api/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Cursor, VS Code and other clients

In Coolie, Settings → MCP has a button for each: Cursor and VS Code open with Coolie added, and sign in on first use. Any other client takes the address as a remote MCP server over Streamable HTTP, with the OAuth sign-in, or an API key in an Authorization: Bearer header or an x-api-key header.

Call the server without an assistant

The server speaks JSON-RPC 2.0 over HTTP POST, without a session: one request, one JSON answer. tools/list lists the tools, tools/call runs one. A check with curl, then in Python:

curl
curl https://trycoolie.ai/api/mcp \
  -H "Authorization: Bearer $COOLIE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_leads","arguments":{"limit":5}}}'
Python
import os

import requests

response = requests.post(
    "https://trycoolie.ai/api/mcp",
    headers={
        "Authorization": f"Bearer {os.environ['COOLIE_API_KEY']}",
        "Accept": "application/json, text/event-stream",
    },
    json={"jsonrpc": "2.0", "id": 1, "method": "tools/list"},
    timeout=60,
)
for tool in response.json()["result"]["tools"]:
    print(tool["name"], "-", tool["description"])

What the assistant can do

Each tool is one call of the API, with its rules and its costs:

  • Account and catalogs: get_account, list_signals, get_icp_options, search_catalog.
  • Agents: list_agents, get_agent, create_agent, update_agent, start_agent, pause_agent, stop_agent, delete_agent.
  • Leads: list_leads, find_contact, research_leads, delete_leads, rate_lead, add_lead_insight, remove_lead_insight, write_lead_sequence.
  • Campaigns: get_campaign, update_campaign, launch_campaign, pause_campaign, write_step, list_queue, add_to_queue, update_queue, get_queue_item, edit_queue_messages, regenerate_message.
  • Settings: get_settings, update_settings.

The server tells the assistant to confirm with you before it deletes an agent, which deletes its leads, and before it launches a campaign, which sends real messages from your accounts.

Limits and costs

  • Each message counts as one request of your account's 60 a minute.
  • A tool costs what the same action costs in the app: reading is free; an email found costs 0.1 credit, a phone 1, a lead researched 1.
  • The connection acts as you: it sees your agents and leads, and nobody else's.

What a tool call answers

The tool's result is the API's JSON, as text for the model; isError is true when the call failed, with the API's error code and message in the text. The values are examples.

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"leads\":[{\"runId\":\"ui-5b9e2c41\",\"prospectId\":\"p-41b7c2d9e0aa\", …}],\"nextCursor\":null}"
      }
    ],
    "isError": false
  }
}

Errors

An error answers with its HTTP status and a body { "error": code, "message": sentence }: branch on the code, show or log the message.

StatusCodeWhat to do
401missing_api_keyNo key in the request: send Authorization: Bearer coolie_sk_… or an x-api-key header.
401invalid_api_keyNot a Coolie key, or a key that is unknown or revoked: copy it again from Settings → API keys.
402trial_requiredStart the free trial in the app first.
429rate_limitedMore than 60 requests in the minute for your account: wait the seconds Retry-After gives, then try again.

Frequently asked questions

Which assistants work with Coolie's MCP server?

Claude on the web, desktop and mobile, Claude Code, ChatGPT in developer mode, Cursor, VS Code, and any MCP client that connects to remote servers over Streamable HTTP.

Do I need an API key to connect Claude or ChatGPT?

No: they sign in with OAuth, and the connection gets a key of its own. Other clients can send an API key from Settings → API keys.

How do I disconnect an assistant?

Revoke its connection in Settings → API keys: the assistant then has to connect again.

Can the assistant send emails or delete data?

It can do what the API does, as you: create and edit agents, read leads, find emails, research leads, edit and launch campaigns. The server asks it to confirm with you before it deletes an agent or launches a campaign.

Does it cost more than the app?

No: each tool costs what the same action costs in the app, and each message counts as one API request.

Every endpoint, field and error is in the API reference, and more guides are in the developer hub.

Your next conversation is already happening somewhere.

Set up an agent in five minutes. The first leads arrive with their reason to write.