Skip to content
LA CRYPTADOCS / 01

MCP Server

Connect agents to the CRM via Model Context Protocol.

MCP Server

La Crypta CRM exposes a remote MCP server at https://crm.lacrypta.ar/api/mcp so agents (Grok Bot, Cursor, Claude Code, MCP Inspector, or other Streamable HTTP clients) can query events, orders, attendance, and contacts from your organization.

Authentication

The server requires an organization API key with read permission. Authentication is API-key-only — no OAuth flows.

Create an API key

  1. Open your organization's Dashboard
  2. Go to Settings → API Keys
  3. Create a new key with read permission
  4. Copy the secret (lcr_live_<prefix>_<secret>) — it's only shown once

Accepted headers

The server accepts the secret in either of these headers (but not both at once):

Authorization: Bearer lcr_live_<prefix>_<secret>
X-API-Key: lcr_live_<prefix>_<secret>

The Bearer scheme is case-insensitive per RFC 7235.

Client configuration

Generic configuration (JSON)

{
  "mcpServers": {
    "la-crypta-crm": {
      "url": "https://crm.lacrypta.ar/api/mcp",
      "headers": {
        "Authorization": "Bearer lcr_live_<prefix>_<secret>"
      }
    }
  }
}

Grok Bot

  1. Open Settings → Connectors in Grok Bot
  2. Add a Custom MCP connector
  3. URL: https://crm.lacrypta.ar/api/mcp
  4. Add a static header: Authorization: Bearer lcr_live_<prefix>_<secret>
  5. Save the secret in the bot's vault — never paste it in group chats

Cursor

Add the configuration to your MCP settings file (~/.cursor/mcp.json or project-level):

{
  "mcpServers": {
    "la-crypta-crm": {
      "url": "https://crm.lacrypta.ar/api/mcp",
      "headers": {
        "Authorization": "Bearer lcr_live_<prefix>_<secret>"
      }
    }
  }
}

Claude Code

Use the --header flag:

claude mcp add la-crypta-crm \
  --transport http \
  --url https://crm.lacrypta.ar/api/mcp \
  --header "Authorization: Bearer lcr_live_<prefix>_<secret>"

mcp-remote bridge

For clients that only support stdio (local) transports:

npx mcp-remote --header "Authorization: Bearer lcr_live_..." https://crm.lacrypta.ar/api/mcp

MCP Inspector

npx @modelcontextprotocol/inspector \
  --cli https://crm.lacrypta.ar/api/mcp \
  --transport http \
  --header "Authorization: Bearer lcr_live_<prefix>_<secret>" \
  --method tools/list

Available tools

All tools are read-only and return JSON.

ToolDescription
whoamiAuthenticated organization and API key info
list_eventsList events (filter by status: draft/published/cancelled/completed, search by name)
get_eventEvent details by ID
get_event_overviewEvent + first attendees
get_attendance_statsStats: approved, waitlist, checked-in, paid, pending, expired, free
list_ordersEvent orders (search by buyer/coupon, filter by payment status: paid/pending/none/expired)
get_orderOrder details with tickets
search_contactsSearch contacts by name, email, or phone

Usage example

Once connected, try:

→ whoami

The agent should respond with your organization's slug and name.

→ list_events

Returns your organization's events sorted by date.

Discoverability

The server is self-discoverable:

  • Server card: /.well-known/mcp.json
  • LLMs.txt: /llms.txt

Security

  • API keys are organization-scoped: they only see that org's data
  • The read permission enables the mcp:read scope
  • No secrets (LN preimages, ticket bearer tokens, etc.) are exposed
  • Sensitive fields like ticket_code are stripped from order items

Data disclosure

Tool responses are sent to the agent's LLM provider (e.g., Anthropic, OpenAI, xAI) for processing. Contact emails and phone numbers visible in the dashboard are included in tool responses. Only grant API keys to agents/providers you trust with this data.

Rate limits

The server enforces a rate limit of 120 requests per minute per API key. Exceeding the limit returns 429 Too Many Requests with a Retry-After header indicating when to retry.

Common errors

401 Unauthorized

  • The API key is invalid, expired, or revoked
  • Missing authentication header
  • Incorrect secret format
  • Both Authorization and X-API-Key headers provided (ambiguous)

403 Forbidden

  • The API key lacks read permission

429 Too Many Requests

  • Rate limit exceeded — wait and retry (see Retry-After header)

Event/Order not found

  • The ID doesn't exist or belongs to another organization