{
  "markdown": "# rdstation-crm-mcp\n\n[![CI](https://github.com/fernandoludvig/rdstation-crm-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/fernandoludvig/rdstation-crm-mcp/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/rdstation-crm-mcp.svg)](https://www.npmjs.com/package/rdstation-crm-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nAn open-source **[MCP](https://modelcontextprotocol.io) server for [RD Station CRM](https://crm.rdstation.com)** — the leading CRM in Brazil and Latin America. Manage contacts, deals, tasks and notes, and get pipeline health reports, straight from Claude or any MCP-compatible client.\n\n> \"How's my sales pipeline this month?\" → stage-by-stage totals, win rate, and the deals going stale.\n\n![Demo: connecting to the server and running rdcrm_pipeline_overview against a real RD Station CRM account](docs/demo.gif)\n\n## Why\n\nRD Station CRM is huge in the LatAm market, but had no open-source MCP server. This project connects it to the MCP ecosystem so AI agents can work your pipeline: qualifying leads, moving deals, scheduling follow-ups, and answering questions about your sales data in natural language.\n\n## Quick start\n\n1. Get your **instance token** in RD Station CRM: *Profile → Products and integrations → Instance token*.\n2. Add the server to your MCP client.\n\n**Claude Desktop** (`claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"rdstation-crm\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"rdstation-crm-mcp\"],\n      \"env\": {\n        \"RDSTATION_CRM_TOKEN\": \"your-instance-token\"\n      }\n    }\n  }\n}\n```\n\n**Claude Code:**\n\n```bash\nclaude mcp add rdstation-crm -e RDSTATION_CRM_TOKEN=your-instance-token -- npx -y rdstation-crm-mcp\n```\n\nThat's it. Ask Claude something like *\"list my open deals\"* or *\"give me a pipeline overview\"*.\n\n## Tools\n\n| Tool | Description |\n| --- | --- |\n| `rdcrm_search_contacts` | Search contacts by name, email or phone |\n| `rdcrm_get_contact` | Contact details, including linked deals |\n| `rdcrm_upsert_contact` | Create a contact, or update it if the email already exists |\n| `rdcrm_list_deals` | List deals filtered by status, pipeline, stage, owner, dates |\n| `rdcrm_get_deal` | Deal details: stage, value, owner, contacts, products |\n| `rdcrm_create_deal` | Create a deal — accepts stage by *name*, resolved automatically |\n| `rdcrm_update_deal` | Move stage, change owner, rating, close date, pause/resume |\n| `rdcrm_close_deal` | Mark won or lost (lost reasons resolved by name) |\n| `rdcrm_list_tasks` | List tasks by deal, assignee, status, type, due date |\n| `rdcrm_create_task` | Create a task (call, email, meeting, whatsapp...) on a deal |\n| `rdcrm_add_note` | Add a note to a deal's timeline |\n| `rdcrm_pipeline_overview` | Pipeline health report: totals per stage, win rate, stalled deals |\n\n### Design notes\n\nThese tools are designed for LLMs, not as a 1:1 API wrapper:\n\n- **Names instead of IDs.** Stages, pipelines, users and lost reasons can be passed by name; the server resolves them against the account and lists the valid options when something doesn't match.\n- **Compact responses.** List tools return one line per record with the fields that matter, plus explicit pagination hints. Large responses are truncated with guidance instead of flooding the context window.\n- **Actionable errors.** A 401 tells you which env var to check; an unknown stage lists every stage in every pipeline.\n- **Aggregation where it counts.** `rdcrm_pipeline_overview` answers the questions humans actually ask (\"where are deals stuck?\") with a single tool call.\n\n## Remote deployments (Streamable HTTP)\n\nThe default (`rdstation-crm-mcp`) runs over stdio for a single local user, with the token read once from `RDSTATION_CRM_TOKEN`. For a team-hosted or registry-listed deployment (e.g. Smithery), run the Streamable HTTP variant instead:\n\n```bash\nnpx -y rdstation-crm-mcp-http\n```\n\nThis starts an HTTP server (`http://127.0.0.1:8080/mcp` by default) implementing the [MCP Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http), with proper session lifecycle (`initialize` → `Mcp-Session-Id` → `DELETE` to close).\n\nBecause a hosted server can serve more than one user, there's no single implicit token: each session sends its own `Authorization: Bearer <token>` header on `initialize`. A `RDSTATION_CRM_TOKEN` env var still works as a fallback default for a single-tenant self-hosted setup where every caller shares one CRM account.\n\nEnv vars:\n\n| Var | Default | Purpose |\n| --- | --- | --- |\n| `PORT` | `8080` | Port to listen on |\n| `HOST` | `127.0.0.1` | Bind address — use `0.0.0.0` for containers/cloud |\n| `ALLOWED_HOSTS` | *(unset)* | Comma-separated Host header allow-list (DNS-rebinding guard); recommended when binding to `0.0.0.0` without a reverse proxy in front |\n| `RDSTATION_CRM_TOKEN` | *(unset)* | Default token used when a session sends no Authorization header |\n\n```bash\ncurl http://127.0.0.1:8080/health\n# {\"status\":\"ok\",\"server\":\"rdstation-crm-mcp\",\"sessions\":0}\n```\n\n## Development\n\n```bash\ngit clone https://github.com/fernandoludvig/rdstation-crm-mcp.git\ncd rdstation-crm-mcp\nnpm install\nnpm test              # unit tests (API mocked with msw)\nnpm run typecheck\nnpm run build\nRDSTATION_CRM_TOKEN=xxx npx @modelcontextprotocol/inspector node dist/index.js\n```\n\nThe HTTP layer (`src/client/`) is isolated from the tools, with retry and exponential backoff for 429/5xx built in.\n\n## Roadmap\n\n- [ ] Organizations and products tools\n- [ ] RD Station CRM API v2 support (OAuth) behind the same tool surface\n- [x] Streamable HTTP transport for remote deployments\n- [ ] Publish to MCP registries (Glama, PulseMCP, Smithery)\n\nContributions welcome — open an issue first for anything non-trivial.\n\n## License\n\n[MIT](LICENSE) © Fernando Ludvig\n\n*Not affiliated with or endorsed by RD Station. Uses the public [RD Station CRM API v1](https://developers.rdstation.com/reference/crm-v1-introducao-e-requisitos).*\n",
  "bytes": 6035,
  "sha": "6fff2bd759b17b4446c57bff754b7f1495eeb7c23259e4804e6b327138a037d6",
  "repo_slug": "fernandoludvig/rdstation-crm-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_fernandoludvig_rdstation_crm_m_8a134aa9/readme"
}