@kama/mcp-server
MCP server that auto-discovers Kama CRM API endpoints from OpenAPI spec and exposes them as tools for AI agents to perform CRM operations via natural language.
README
@kamacrm/mcp-server
MCP server for Kama CRM — Talk to your AI agent instead of clicking.
Connect Claude Code, OpenCode, Cline, or any MCP-compatible client directly to your Kama instance. The server auto-discovers all your API endpoints via the OpenAPI spec and exposes them as MCP tools.
Quick Start
# One command — no install needed
KAMA_URL=https://your-kama.com KAMA_API_TOKEN=xxx npx @kamacrm/mcp-server
Installation
Via npm (recommended for repeated use)
npm install -g @kamacrm/mcp-server
kama-mcp
# Then configure KAMA_URL and KAMA_API_TOKEN in your environment
Via npx (zero install)
Add to your MCP client config — it auto-installs on first run.
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
KAMA_URL |
✅ | — | Your Kama instance URL (e.g. https://demo.kamacrm.ir) |
KAMA_API_TOKEN |
✅ | — | Bearer token for API authentication |
KAMA_DEBUG |
❌ | false |
Enable debug logging to stderr (true/1) |
KAMA_TIMEOUT |
❌ | 30 |
Request timeout in seconds |
KAMA_SERVER_NAME |
❌ | kama-mcp |
Server name reported to MCP client |
Getting an API Token
- Log into your Kama instance as admin
- Go to Settings → API Keys (or equivalent)
- Create a new API key
- Copy the token — it's your
KAMA_API_TOKEN
💡 The token must belong to a user with sufficient permissions. The MCP server respects all Kama access controls — users can only do what they have permission to do.
Usage with AI Clients
Claude Code (.claude.json)
{
"mcpServers": {
"kama": {
"command": "npx",
"args": ["@kamacrm/mcp-server"],
"env": {
"KAMA_URL": "https://your-kama.com",
"KAMA_API_TOKEN": "your-token-here"
}
}
}
}
OpenCode (opencode.json)
{
"mcpServers": {
"kama": {
"command": "npx",
"args": ["@kamacrm/mcp-server"],
"env": {
"KAMA_URL": "https://your-kama.com",
"KAMA_API_TOKEN": "your-token-here"
}
}
}
}
Cline (cline_mcp_settings.json)
{
"mcpServers": {
"kama": {
"command": "npx",
"args": ["@kamacrm/mcp-server"],
"env": {
"KAMA_URL": "https://your-kama.com",
"KAMA_API_TOKEN": "your-token-here"
}
}
}
}
VS Code (via Continue or Cline extension)
Same config format in the extension's MCP settings file.
How It Works
Your AI Agent (Claude/OpenCode/Cline)
│
│ stdio (JSON-RPC 2.0)
▼
@kamacrm/mcp-server
│
│ 1. Fetches OpenAPI spec from GET /api/docs
│ 2. Auto-generates MCP tools for every endpoint
│ 3. Proxies tool calls as HTTP requests
│
▼
Kama REST API
│
▼
Kama Services / Database
- On startup, the server fetches
GET /api/docsfrom your Kama instance - It parses the OpenAPI 3.0.1 spec and creates one MCP tool per API endpoint
- Your AI agent discovers all 200+ tools via
tools/list - When the agent calls a tool, the server proxies the request to your Kama API
- All requests use your API token — permissions are enforced by Kama
Tool Naming Convention
Tools are automatically named based on the method, tag, and path:
kama_{method}_{category}_{action}
Examples:
kama_get_clients_list → GET /clients
kama_post_clients_create → POST /clients
kama_get_clients_show → GET /clients/{id}
kama_put_clients_update → PUT /clients/{id}
kama_delete_clients_delete → DEL /clients/{id}
kama_get_invoices_list → GET /invoices
kama_post_tickets_store → POST /tickets
kama_get_settings_index → GET /settings
Features
- Zero configuration — auto-discovers your entire API from the OpenAPI spec
- Always up-to-date — tools reflect your actual Kama API, no manual sync
- Permission-aware — respects Kama's access control, users can only do what they're allowed
- Read-only hints — GET endpoints are marked read-only for safe exploration
- Language-agnostic — works with any MCP client (Claude Code, OpenCode, Cline, Continue, etc.)
- Cross-platform — runs anywhere Node.js 18+ runs (Linux, macOS, Windows)
- Lightweight — zero npm dependencies, pure Node.js
Resources
Support
- Phone:
05144228000 - Email: via Kama website
FAQ
Q: Does this require a plugin installed on Kama? No. The MCP server is completely standalone. It only needs HTTP access to the Kama REST API.
Q: Are all endpoints exposed?
Every route in /api/docs becomes an MCP tool. This includes public endpoints (login, docs) and authenticated endpoints.
Q: Is it safe? Yes. The MCP server uses your API token and respects all Kama permissions. Users can only perform actions they already have permission for. Write operations are clearly distinguished from read-only operations.
Q: Does it work with Cloud Kama instances?
Yes. Set KAMA_URL to your cloud instance URL. The server connects over standard HTTPS.
Q: My API token expires, what then? Restart the MCP server with a fresh token. Most Kama API tokens are long-lived.
Q: Too many tools? The auto-discovery includes everything. You can configure your MCP client to only expose specific tools if needed.
Development
git clone https://github.com/AsemanServer/kama-mcp-server.git
cd mcp-server
# Run directly
KAMA_URL=https://your-kama.com KAMA_API_TOKEN=xxx node bin/kama-mcp.js
# Test with a sample input
echo '{"jsonrpc":"2.0","id":1,"method":"list_tools"}' | KAMA_URL=... KAMA_API_TOKEN=... node bin/kama-mcp.js
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。