agent-crm
Enables AI agents to manage CRM data including companies, contacts, prospects, pipelines, forecasts, and tasks via typed MCP tools, with local SQLite storage and a JSON CLI.
README
Agent CRM
An open-source CRM built for agents, not dashboards.
Agent CRM keeps track of companies, contacts, prospects, opportunities, research, follow-ups, forecasts, and sales-pipeline state. It also points out unsupported forecasts and work that is falling through the cracks. The difference is intentional: there is no graphical interface. Agents work with it directly through a JSON CLI or typed MCP tools.
Data stays local in SQLite, and both interfaces use the same application service.
Learn more at crmemento.com.
Why agent-first?
Most CRMs are designed around humans clicking through screens. Agent CRM is designed around agents reading structured context, taking explicit actions, and leaving an auditable trail.
- No interface: Use the CLI or MCP tools.
- Local by default: SQLite is the source of truth.
- Pipeline-aware: Track prospects from identification through won, lost, or do-not-contact.
- Revenue-aware: Forecast weighted, best-case, commit, and closed-won revenue.
- Constructively skeptical: A critical CRO review challenges weak assumptions with record-level evidence.
- Built for coordination: Project isolation, immutable activity history, and optimistic version checks help multiple agents work safely.
- System of record only: It logs outreach, but never sends messages or contacts anyone.
Quick start
Agent CRM requires Python 3.11 or later.
git clone https://github.com/clayton/agent-crm.git
cd agent-crm
export CRM_ACTOR=codex
./bin/crm init
./bin/crm project create "My Pipeline" --slug pipeline
./bin/crm project list
All CLI output is JSON. Writes require an actor through --actor or CRM_ACTOR.
By default, data is stored at ~/.codex/memories/agent-crm/crm.sqlite3. Set CRM_DB=/path/to/crm.sqlite3 or use the global --db option to choose another location.
What it tracks
- Projects that isolate separate pipelines
- Companies and contacts
- Prospects and pipeline stages
- Forecastable opportunities, amounts, close dates, probabilities, and next steps
- Sourced research notes
- Follow-up tasks and due dates
- Email, call, message, and meeting logs
- Immutable activity history
- Revenue targets and re-runnable project readiness checks
The default pipeline is:
identified → researching → qualified → ready_to_contact
→ contacted → replied → meeting_booked → won
Every non-terminal stage can also exit to lost, not_a_fit, or do_not_contact.
MCP server
Install the optional official MCP Python SDK:
uv sync --extra mcp
uv run crm-mcp
Example MCP client configuration:
{
"mcpServers": {
"agent-crm": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/agent-crm", "run", "crm-mcp"]
}
}
}
The server exposes typed tools for projects, companies, contacts, prospects, pipeline transitions, notes, tasks, inbox queries, search, and timelines.
Two agent-oriented read commands make common reviews direct:
# A ranked queue of 3-5 tasks and follow-ups
./bin/crm next-actions pipeline
# Prospects grouped in configured sales-stage order
./bin/crm pipeline pipeline
./bin/crm pipeline pipeline --include-terminal
The equivalent MCP tools are crm_next_actions and crm_pipeline. They return structured data so the calling agent can format it naturally for the conversation.
Bootstrap and onboarding
Bootstrap configures forecast defaults and returns a readiness checklist. It is deliberately safe to re-run: unchanged settings are not rewritten and no records are duplicated.
./bin/crm bootstrap pipeline \
--target-amount 100000 \
--target-period 2026-Q3 \
--currency USD \
--default-owner codex \
--actor codex
The result identifies missing configuration, unowned prospects, incomplete opportunities, and the next setup steps. The MCP equivalent is crm_bootstrap.
Forecasting and honest revenue reviews
A prospect becomes forecastable only when explicitly qualified with an amount, expected close date, and concrete next step:
./bin/crm opportunity qualify pro_ID \
--amount 25000 \
--expected-close-at 2026-09-15T00:00:00Z \
--next-step "Schedule the decision call" \
--forecast-category commit \
--probability 80 \
--actor codex
./bin/crm forecast pipeline --period 2026-Q3
./bin/crm conversions pipeline
./bin/crm review pipeline --period 2026-Q3
forecast returns open pipeline, weighted forecast, best case, commit, closed-won revenue, target attainment, coverage, and missing forecast data. conversions derives directional stage conversion rates from the immutable activity history.
review is the critical CRO adversary. It flags unsupported commit claims, weak coverage, overdue or expired next steps, incomplete forecast evidence, and other assumptions that deserve scrutiny. Findings include severity, underlying records, and a recommended corrective action.
The MCP equivalents are crm_qualify_opportunity, crm_forecast, crm_conversions, and crm_cro_review.
Staying ahead of dropped work
The v0.3 action engine ranks work across tasks and pipeline risks. Every recommendation carries a score, plain-language reasons, a suggested action, and an effort estimate.
./bin/crm next-actions pipeline
./bin/crm next-actions pipeline --mode close --time-budget 45
./bin/crm next-actions pipeline --mode pipeline_build
./bin/crm risks pipeline
risks finds unowned, unscheduled, stale, overdue, uncontactable, expired, and forecast-incomplete records. It is read-only by default. To explicitly create idempotent repair tasks:
./bin/crm risks pipeline --create-tasks --actor codex
The MCP equivalent is crm_pipeline_risks.
SDR workbench
Agent CRM prepares top-of-funnel work without sending messages:
./bin/crm sdr-queue pipeline
./bin/crm research-brief pro_ID
./bin/crm outreach-brief pro_ID
The SDR queue prioritizes enrichment and outreach preparation using fit, contactability, and research completeness. Research briefs separate sourced facts from unsourced context and missing information. Outreach briefs combine verified context, prior interactions, prerequisites, and a suggested angle while preserving the system-of-record-only boundary.
The MCP equivalents are crm_sdr_queue, crm_research_brief, and crm_outreach_brief.
Agent skill
The reusable agent skill lives in skill/agent-crm. Symlink or copy that directory into your agent’s skills directory, then configure the skill to point to your checkout.
Development
The core test suite has no third-party dependencies:
PYTHONPATH=src python3 -m unittest discover -s tests -v
License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.