Go to App

MCP Server

ExportComments ships an MCP (Model Context Protocol) server that gives AI assistants native access to your account — exports, the comment picker, webhooks, scheduled exports, usage info. Works with Claude Desktop, Claude Code, Claude on the web, Cursor, Windsurf, and any MCP-compatible client.

Two ways to use it:

Hosted (recommended)Self-installed (stdio)
URL / commandhttps://mcp.exportcomments.com/mcpnpx -y exportcomments-cli
AuthOAuth 2.0 (browser sign-in) or API tokenAPI token or OAuth JWT in env var
InstallationNone — paste the URLNode.js 18+ on your machine
Best forClaude on the web, Cursor, hosted clientsClaude Desktop, automation scripts

Both expose the same 23 tools.

💡
Browser visit to mcp.exportcomments.com

Opening https://mcp.exportcomments.com directly in a browser bounces to exportcomments.com — the host is an MCP JSON-RPC endpoint, not a website. Point your MCP client at https://mcp.exportcomments.com/mcp (note the path) for the actual service.

Hosted — Claude Desktop, Cursor, Claude web

Point your MCP client at https://mcp.exportcomments.com/mcp and let the OAuth flow handle credentials. On the first tool call you'll be redirected to exportcomments.com, sign in (same email/password you use today), click Authorize, and you're done. No tokens to copy.

Claude Desktop / Cursor — mcp_servers config

json
{
"mcpServers": {
"exportcomments": {
"url": "https://mcp.exportcomments.com/mcp"
}
}
}

On the first request the client sees a 401 Unauthorized with a WWW-Authenticate header pointing at our OAuth discovery doc, opens your browser to https://exportcomments.com/oauth/authorize, you approve, and the access token is stored in the client.

Claude on the web

Add a remote MCP server in Settings → Connections → Add custom MCP and paste https://mcp.exportcomments.com/mcp. Claude walks the OAuth flow automatically.

Already have an API token? Skip OAuth

If you'd rather use your existing API token instead of OAuth:

json
{
"mcpServers": {
"exportcomments": {
"url": "https://mcp.exportcomments.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN_HERE"
}
}
}
}
💡
OAuth vs API token

OAuth tokens are tied to your user and expire — convenient and revocable. API tokens are tied to your account, don't expire for 1 year, and are best for automation. Either one works with every tool.

Self-installed (stdio) — Claude Desktop

If you'd rather run the MCP server locally (Claude Desktop spawns the binary on your machine and talks to it over stdio), install the CLI:

bash
npm install -g exportcomments-cli

Or use npx for zero-install (auto-updates):

bash
npx -y exportcomments-cli

Then add to claude_desktop_config.json:

json
{
"mcpServers": {
"exportcomments": {
"command": "npx",
"args": ["-y", "exportcomments-cli"],
"env": {
"EXPORTCOMMENTS_API_TOKEN": "your-token-here"
}
}
}
}

Claude Code

bash
claude mcp add exportcomments -- npx -y exportcomments-cli
export EXPORTCOMMENTS_API_TOKEN="your-token-here"

Run directly

bash
EXPORTCOMMENTS_API_TOKEN="your-token" exportcomments-mcp

OAuth flow (hosted)

The hosted MCP server speaks standard OAuth 2.0 with PKCE. Most clients handle this automatically — you'll only see this section if you're building your own MCP client.

  1. Discovery — your client fetches https://exportcomments.com/.well-known/oauth-authorization-server and reads:

    json
    {
    "issuer": "https://exportcomments.com",
    "authorization_endpoint": "https://exportcomments.com/oauth/authorize",
    "token_endpoint": "https://exportcomments.com/oauth/token",
    "scopes_supported": ["read", "write"],
    "code_challenge_methods_supported": ["S256"],
    "token_endpoint_auth_methods_supported": ["none"]
    }
  2. Authorize — open the user's browser at:

    bash
    https://exportcomments.com/oauth/authorize
    ?response_type=code
    &client_id=mcp
    &redirect_uri=<your_callback>
    &scope=read+write
    &state=<random>
    &code_challenge=<base64url(sha256(code_verifier))>
    &code_challenge_method=S256

    If the user isn't signed in, they're redirected to /login?redirect=<this_URL>. After signing in they see the consent screen, click Authorize, and are sent to redirect_uri?code=...&state=....

  3. Token exchange — POST to /oauth/token:

    bash
    grant_type=authorization_code
    code=<from callback>
    client_id=mcp
    redirect_uri=<same as step 2>
    code_verifier=<original verifier>

    Returns:

    json
    {
    "access_token": "eyJ0eXA…",
    "token_type": "Bearer",
    "expires_in": 3600,
    "scope": "read write"
    }
  4. Use — send Authorization: Bearer <access_token> on each MCP request to mcp.exportcomments.com.

💡
Token lifetime

Access tokens are JWTs that expire after 1 hour. When you get a 401, restart the OAuth flow (most clients do this automatically). Refresh tokens are coming in a future release.

Allowed redirect URIs

The mcp OAuth client accepts these redirect_uri values:

  • http://127.0.0.1:* (any port — for native loopback flows per RFC 8252)
  • http://localhost:*
  • https://claude.ai/api/mcp/auth_callback

If you're building a client that needs a different redirect URI, open a ticket and we'll add it to the allow-list.

Tools

The MCP server exposes 23 tools covering the full account surface — exports, the random comment picker, webhooks, scheduled exports, account info. See the tool reference for parameters and examples.

CategoryTools
Exportsexport_comments, check_export, list_exports, download_export
Discoverydetect_platform, list_platforms
Accountget_my_profile, get_my_quota, get_my_limits
Pickerpick_random_winners
Webhookslist_webhooks, create_webhook, update_webhook, delete_webhook, toggle_webhook, test_webhook
Scheduleslist_schedules, create_schedule, update_schedule, delete_schedule, run_schedule, pause_schedule, resume_schedule

Example workflows

Export and download

An AI assistant can chain tools for a full workflow:

  1. detect_platform — check what options the URL supports.
  2. export_comments with wait=true — create the export, return when done.
  3. download_export — retrieve the raw JSON.

Pick giveaway winners

  1. export_comments with wait=true — get every comment on the giveaway post.
  2. pick_random_winners with count=5, require_mention="@brand" — pick 5 random commenters who tagged the brand, deduped by username.

Recurring weekly export to a webhook

  1. create_webhook with event="export.finished", url="https://your-app.com/hook" — set up the delivery channel.
  2. create_schedule with url=…, frequency="weekly", options.replies=true — schedule the export.

Every Monday the export runs, finishes, and your webhook gets the result.

Response format

All MCP tool responses return structured JSON:

json
{
"ok": true,
"data": {
"id": 12345,
"guid": "b4219d47-3138-5efd-9762-2ef9f9495084",
"status": "done",
"url": "https://www.instagram.com/p/ABC123/",
"totalComments": 342,
"exportedComments": 342,
"downloadUrl": "https://exportcomments.com/api/v3/job/b4219d47-.../download"
}
}

On error:

json
{
"ok": false,
"error": "Human-readable error message",
"error_code": "MACHINE_READABLE_CODE",
"detail": "Additional context"
}
💡
AI-optimized output

All tool responses are JSON, making it trivial for AI assistants to parse results and chain operations. Use wait=true on export_comments and check_export to get final results in a single round-trip.

Troubleshooting

"Unauthorized: missing or invalid Bearer token"

You're hitting the hosted MCP without auth. Either complete the OAuth flow or include Authorization: Bearer <token> in your MCP client config.

Hosted MCP responds 503 / connection refused

The hosted service is at mcp.exportcomments.com. Check status: curl -s https://mcp.exportcomments.com/health should return {"ok":true,…}. If not, check the status page or contact support.

npx exportcomments-mcp fails on Claude Desktop

Make sure Node.js 18+ is on your PATH. Claude Desktop sometimes can't see system Node — point command at the absolute path instead (e.g. /usr/local/bin/node + args: ["/path/to/node_modules/exportcomments-cli/dist/mcp.js"]).

Token expired (401 after an hour)

Hosted MCP access tokens currently expire after 1 hour. Most clients re-run the OAuth flow automatically. If yours doesn't, sign in again from your MCP client's settings.