Developer Reference

MCP API Reference

Connect AI agents — Claude Desktop, custom scripts, or any MCP-compatible client — to your Closer Mode data. Query calls, transcripts, scores, patterns, and rubrics programmatically.

Claude Desktop ready
Bearer token auth
8 read-only tools

Overview

Closer Mode exposes a hosted Model Context Protocol (MCP) endpoint at POST /api/mcp. Any MCP-compatible client can call it using a Bearer API key.

The endpoint is stateless (no session, no SSE). Each request is a self-contained JSON-RPC call that returns a plain JSON response. This makes it easy to integrate with Claude Desktop, custom scripts, or any HTTP client.

http
POST https://app.closermode.ai/api/mcp
Content-Type: application/json
Authorization: Bearer mcp_your-org_<32-char-key>

Getting a Key

MCP API keys are managed by organization admins in the Closer Mode dashboard.

1Log in to Closer Mode and go to Settings → MCP API
2Click "New key" and enter a descriptive name (e.g. "Claude Desktop")
3Copy the key immediately — it is shown only once and cannot be recovered
4Store the key securely (a password manager or secrets vault)
5To revoke a key, click the trash icon next to it in the key list
Admin only: Only users with the admin role can create or revoke MCP API keys. Managers and reps can view the key list but cannot create new keys.

Authentication

Pass your MCP API key as a Bearer token in every request:

http
Authorization: Bearer mcp_your-org_a1b2c3d4e5f6...

Keys follow the format mcp_<org-slug>_{32-hex-chars}. The plaintext key is never stored — only a SHA-256 hash is kept at rest. If your key is compromised, revoke it from the dashboard and generate a new one.

Never share or commit keys. Treat them like passwords. If a key is exposed in version control, revoke it immediately.

Claude Desktop Setup

Add Closer Mode as an MCP server in your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "closer-mode": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://app.closermode.ai/api/mcp",
        "--header",
        "Authorization:${AUTH_TOKEN}"
      ],
      "env": {
        "AUTH_TOKEN": "Bearer mcp_your-org_<32-char-key>"
      }
    }
  }
}

Why no space after the colon? There is a known bug in Claude Desktop (Windows) and Cursor where npx mangles spaces inside args. Writing Authorization:${AUTH_TOKEN} (no space) and putting the space inside the env variable avoids this on all platforms.

Restart Claude Desktop after saving the config. You should see a hammer icon in the chat input — that confirms MCP tools are connected.

Example Use Cases

Once connected, you can ask Claude natural-language questions about your call data. Here are real examples of what you can do.

Coaching & Performance

Show me my 5 lowest-scoring calls from last week and summarize the common weaknesses.

Which reps scored below 60 on qualification this month? List their names and average scores.

Get the coaching advice from the most recent call by Sarah Johnson.

Find all calls where the overall score was above 85 and tell me what they had in common.

Call Review

Get the transcript for call [ID] and identify the three biggest objections the prospect raised.

Summarize the key moments from the last 10 calls in the Enterprise team.

Find calls from this week that include qualification data and extract the CHAMP scores.

Patterns & Signals

Search for missed motivation signals across the last 50 calls and tell me which reps have the most.

Find all weak close signals from last month — which team has the highest frequency?

Rubric Exploration

List all rubrics in my organization and their criteria counts.

Show me the full rubric named 'Enterprise Discovery' with all criteria and weights.

Direct API Usage

You can call the MCP endpoint directly from any HTTP client — no MCP SDK required. Send a standard MCP JSON-RPC request body with your Bearer token.

Search calls with curl

bash
curl -X POST https://app.closermode.ai/api/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer mcp_your-org_<key>" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "calls_search",
      "arguments": {
        "status": "scored",
        "minScore": 0,
        "maxScore": 60,
        "limit": 10
      }
    }
  }'

Fetch a transcript with Node.js

javascript
const res = await fetch("https://app.closermode.ai/api/mcp", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer mcp_your-org_<key>",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "tools/call",
    params: {
      name: "calls_transcript",
      arguments: { callId: "9db7cebd-e628-4415-948c-11ede6187636" },
    },
  }),
});

const { result } = await res.json();
const { transcript } = JSON.parse(result.content[0].text);

List available tools

bash
curl -X POST https://app.closermode.ai/api/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer mcp_your-org_<key>" \
  -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }'

Available Tools

All tools are read-only. They are scoped to your organization — cross-org access is not possible.

Call tools

ToolDescriptionKey params
calls_searchSearch and filter calls by rep, team, score range, date range, or status. Returns paginated list with basic metadata.repId?, teamId?, status?, minScore?, maxScore?, startDate?, endDate?, limit?
calls_getGet full metadata for a single call: rep, team, duration, status, call date, and summary.callId (UUID)
calls_transcriptGet the plain-text transcript for a call. Returns null if no transcript is available.callId (UUID)
calls_scoresGet the AI scoring result: overall score, per-criterion scores, summary, strengths, and improvements.callId (UUID)
calls_insightsGet coaching advice and qualification data (CHAMP / MEDDIC / BANT) for a call.callId (UUID)

Pattern tools

ToolDescriptionKey params
patterns_searchSearch patterns and signals detected across calls, such as missed motivations or weak closes.repId?, teamId?, signalType?, startDate?, endDate?, limit?

Rubric tools

ToolDescriptionKey params
rubrics_listList all active rubrics in your organization with name, type, and criteria count.limit?
rubrics_getGet a full rubric with all criteria, weights, and scoring guidance.rubricId (UUID)

calls_search — input parameters

FieldTypeStatusDescription
repIdstring (UUID)optionalFilter by sales rep user ID.
teamIdstring (UUID)optionalFilter by team ID.
statusstringoptionalFilter by call status: pending, processing, scored, failed, or skipped.
minScorenumber (0–100)optionalMinimum overall score.
maxScorenumber (0–100)optionalMaximum overall score.
startDatestring (ISO 8601)optionalEarliest call date.
endDatestring (ISO 8601)optionalLatest call date.
limitnumber (1–50)optionalResults per page. Default: 20, max: 50.

Rate Limits

Each API key is limited to 60 requests per minute using a sliding window algorithm. The limit is per-key, not per-org.

HeaderValue
Retry-AfterSeconds until the window resets (present on 429 responses)

When the limit is exceeded, the endpoint returns HTTP 429 with { "error": "Rate limit exceeded. Max 60 requests/minute." }. Back off for the duration indicated by the Retry-After header.

Pagination

List tools return a hasMore boolean. When hasMore: true, there are additional results beyond the current page.

json
{
  "data": [
    { "id": "uuid-1", "title": "Call with Acme Corp", ... },
    { "id": "uuid-2", "title": "Follow-up with Jane", ... }
  ],
  "hasMore": true
}

To fetch the next page, pass a smaller startDateor endDate to narrow the window. Cursor-based pagination is planned for a future release.

Error Codes

401 — Unauthorized
{ "error": "Unauthorized" }

Missing, malformed, or revoked Bearer token. Check your key is active in Settings → MCP API.

429 — Too Many Requests
{ "error": "Rate limit exceeded. Max 60 requests/minute." }

You have exceeded 60 requests in the current 60-second window. Wait for the Retry-After duration.

400 — Bad Request
{ "error": "Invalid request" }

The MCP request body is malformed or a tool received invalid parameters (e.g. non-UUID callId, score out of 0–100 range).

500 — Internal Server Error
{ "error": "Internal server error" }

An unexpected error occurred. Retry with exponential back-off. If persistent, contact support.

Known Limitations

Org-wide key scope

Every MCP API key grants read access to all calls in your organization. There is currently no way to restrict a key to a specific team, rep, or data subset. Role-scoped keys are planned for a future release.

Read-only

All 8 tools are read-only. Write operations (rescoring, creating rubrics, updating settings) are not available via MCP and must be performed through the Closer Mode dashboard.

No cursor-based pagination

List tools use limit + hasMore. Deep pagination requires filtering by date range. Cursor-based pagination is planned.

Stateless sessions

The MCP endpoint is stateless — each request is independent. There is no persistent session or subscription model.

Ready to connect?

Generate your first MCP API key from the Closer Mode dashboard.

Open MCP API Settings