Skip to content

MCP server

MCP (Model Context Protocol) is a standard that lets AI assistants connect to external services. The JECRM MCP server gives an assistant access to your company’s chats. You can ask it to find a conversation with a customer, summarize it or reply to the customer.

The MCP server runs on top of the Open API. It has the same permissions, key and limits.

  • URL: https://open.jecrm.org/v1/mcp
  • Transport: Streamable HTTP (POST only, no sessions or SSE).
  • Authorization: the company API key in Authorization: Bearer <key> or x-api-key: <key>. Where to get the key.
Terminal window
claude mcp add --transport http jecrm https://open.jecrm.org/v1/mcp \
--header "Authorization: Bearer YOUR_API_KEY"

Add the server to ~/.codex/config.toml (or .codex/config.toml in a project):

[mcp_servers.jecrm]
url = "https://open.jecrm.org/v1/mcp"
bearer_token_env_var = "JECRM_API_KEY"

Store the key in an environment variable, for example in ~/.zshrc:

Terminal window
export JECRM_API_KEY="YOUR_API_KEY"

Codex adds the Authorization: Bearer <key> header itself. To check the connection, run codex mcp list or the /mcp command in Codex.

Not supported directly yet. Custom MCP connectors in ChatGPT (developer mode) only support OAuth or no authentication. There is no way to enter an API key, and the JECRM MCP server doesn’t work without one.

What you can do:

  • use Codex: it works with the same key;
  • put an OAuth proxy in front of the server that injects the key into the header (for example, Key2OAuth). Only use a proxy you trust, because your key will pass through it.

Add the server to your MCP configuration:

{
"mcpServers": {
"jecrm": {
"url": "https://open.jecrm.org/v1/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}

If the client can’t connect to HTTP servers directly, use the mcp-remote bridge:

{
"mcpServers": {
"jecrm": {
"command": "npx",
"args": [
"mcp-remote",
"https://open.jecrm.org/v1/mcp",
"--header",
"Authorization: Bearer YOUR_API_KEY"
]
}
}
}
Tool What it does Read-only
list_chats List chats with pagination and filters: title search, tab_status, external_type, external_id, channel_id, creation and activity dates. yes
get_chat A single chat by chat_id. yes
list_chat_messages Chat messages (newest first), with text search. yes
get_message A single message by chat_id and message_id. yes
search_messages Text search across all company chats. yes
send_message Send a message to a chat: text, attachments or both. wait_result — wait up to 60 s for delivery. no

Pagination: page (from 1) and limit (up to 100). Dates use YYYY-MM-DD or ISO 8601.

A tool returns JSON with the same data as the API responses. On error the tool returns isError: true and an RFC 9457 error body with a code field. See Errors.

  • “Find OLX chats from the last week where the customer asked about delivery.”
  • “Summarize the latest conversation in the chat with Ivan.”
  • “Reply to the customer in this chat that the order shipped today.”
  • Attachments for send_message must first be uploaded through the API: POST /v1/files/temp (see Open API). The MCP server doesn’t upload files itself.
  • send_message really messages the customer. Turn on confirmation in your client before tools that change data are called.
  • The limit is 200 requests per second per company, shared with the API.
  • Webhooks can’t be configured through MCP. Use the API.
  • 405 Method not allowed — the client is trying GET/SSE. Make sure the HTTP (Streamable HTTP) transport is selected, not SSE.
  • API_KEY_NOT_FOUND / API_KEY_INVALID (401) — the key header is missing or the key is wrong.
  • The assistant doesn’t see the tools. Restart the client after changing the configuration and check that the server is enabled.