Docs for agents

canhelpto is a help desk an agent can use directly. Three REST calls open, read and answer a ticket in a vendor's workspace; an MCP server wraps them as three tools. New to this? Start with the guide to adding support to an MCP server. Machine-readable: openapi.json and llms.txt. Short version for vendors: support for a Claude connector.

Install with one prompt

Tell your coding agent (Claude Code, Cursor, Codex):

Add canhelpto support to this MCP server, following https://canhelpto.com/install.md

It reads your server, adds @canhelpto-com/mcp-support, wires your user lookup and opens a test ticket. The steps it follows are in install.md; everything below is the same contract by hand.

The contract

Step by step

  1. 1. Get a key

    Sign in at canhelpto.com/login, create a workspace for your product. The public API key is the widget id printed in your pages; generate a service key (Settings, Service key) for server-side calls: it is the one that opens service mode and the team connector.

  2. 2. Open a ticket

    One POST. Put the customer's words in message, then the context your server has under them. The same data goes in metadata.mcp so it comes back on read. Send X-Service-Mode: true because a server is posting on the customer's behalf.

  3. 3. Read it back

    GET the ticket without service mode. The reply array holds your team's public answers (userId set) and the customer's own (userId null). Before showing it, check that the ticket is the caller's: metadata.mcp.account.userId, or customerEmail.

  4. 4. Answer from rules first

    support_ask should not call a model. Match the question against the rules you already know (credits, connection, rate limit, permissions, sample sizes) and answer with the tool the agent should call next. An unmatched question points at support_open_ticket; never invent.

  5. 5. Tell the agent when to call

    Add one sentence to your server's instructions (MCP initialize) and a support hint to every error body: 'If this keeps failing, call support_ask; support_open_ticket puts it to the team with this error attached.'

Open a ticket

curl -X POST https://canhelpto.com/api/v1/tickets \
  -H "X-API-Key: $CANHELPTO_API_KEY" \
  -H "X-Service-Mode: true" \
  -H "Content-Type: application/json" \
  -d '{
    "summary": "approve_drafts fails with FORBIDDEN",
    "message": "Claude cannot approve my drafts.\n\n- Connector context -\nAccount: [email protected] · user 7f3e…\nClient: claude-user/1.0 · catalogue 1.8.0\nLast calls:\n- 16:05:00 approve_drafts · 120 ms · FORBIDDEN: managed account",
    "customerName": "Ana Pop",
    "customerEmail": "[email protected]",
    "priority": "HIGH",
    "category": "bug",
    "tags": ["mcp", "claude-connector", "bug"],
    "page": "mcp://your-server",
    "metadata": { "mcp": { "account": { "userId": "7f3e…" }, "client": { "userAgent": "claude-user/1.0" }, "recentCalls": [] } }
  }'
# 201 {"success":true,"ticket":{"id":"cmg5…","status":"OPEN","priority":"HIGH","source":"API"}}

Read it back

curl https://canhelpto.com/api/v1/tickets/cmg5… -H "X-API-Key: $CANHELPTO_API_KEY"
# no X-Service-Mode: internal notes stay out.
# Check metadata.mcp.account.userId (or customerEmail) against the caller before showing it.
curl "https://canhelpto.com/api/v1/tickets?email=ana%40example.com&limit=10" -H "X-API-Key: $CANHELPTO_API_KEY"

The package (TypeScript)

One call on the official SDK adds the three tools. Python (FastMCP) or any other framework: the same three HTTP calls, listed in install.md.

npm install @canhelpto-com/mcp-support

import { withSupport } from "@canhelpto-com/mcp-support";

const server = new McpServer({ name: "acme", version: "1.0.0" });
withSupport(server, {
  apiKey: process.env.CANHELPTO_API_KEY!,      // Settings -> Service key (chs_...)
  product: "Acme",
  user: (extra) => lookupUser(extra),           // { id, name?, email?, ... }
  rules: [{ match: ["rate limit"], answer: "It resets after 60 seconds." }],
});
// register your own tools after this line: their calls are recorded,
// and their errors tell the agent to call support_ask.

Your team's Claude: the inbox as an MCP server

The other side of the desk. Your support team connects Claude, Cursor or any MCP client to https://canhelpto.com/api/mcp with the workspace service key as a bearer token, and works the inbox from there: list and read tickets (the connector context included), reply to the customer, add internal notes, set the status, search the knowledge base. A reply reaches the customer by email and through their own connector.

// Claude Code
claude mcp add --transport http canhelpto https://canhelpto.com/api/mcp \
  --header "Authorization: Bearer chs_…"

// Cursor / VS Code (mcp.json)
{ "mcpServers": { "canhelpto": { "url": "https://canhelpto.com/api/mcp",
    "headers": { "Authorization": "Bearer chs_…" } } } }

// Tools: list_tickets · get_ticket · reply_to_ticket · add_internal_note · set_ticket_status · update_ticket · search_knowledge

Two keys per workspace: the public API key is the widget id printed in your pages and opens only what the widget can do; the service key (Dashboard, Settings, Service key) is for server-side callers and the team connector. Once a service key exists, the public key no longer opens service mode. Registry manifest: server.json.

Rules for a good ticket

New to the idea? What is an MCP support desk? Related guide: handle MCP tool errors so the user gets help. And answer your FAQ inside the MCP server with support_ask. To read the calls back: which MCP tools fail for which clients. A worked example: registry teardown of the Stripe MCP server.

Questions: [email protected].