Company Records
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Company RecordsShow me the top 5 companies by revenue."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server Demo — Company Records
A working Model Context Protocol server in Python that exposes a small company CRM database to AI agents as callable tools, plus a command-line chat agent that answers natural-language questions by calling those tools.
Built on the official MCP Python SDK (mcp) and the official Anthropic SDK.
What is MCP?
The Model Context Protocol is an open standard for connecting AI models to external tools and data. Instead of hard-coding a model's integrations, you run an MCP server that advertises a set of tools (each with a name, description, and JSON input schema). Any MCP client — Claude Desktop, an IDE, or your own agent — can connect, discover those tools, and let the model call them. The server and client talk over a simple transport (here, stdio). The result: one server works with any MCP-compatible client, and the model gets live, structured access to your data instead of guessing from its training set.
Related MCP server: ai-crm-engine
What this server does
It serves a fictional B2B CRM dataset (12 companies, 16 contacts, 19 deals, stored in SQLite) through five tools:
Tool | What it does |
| Filter companies by industry, country, and/or minimum headcount |
| Full profile for one company, with its contacts and deals |
| Free-text search over contact name, title, or email |
| Pipeline totals — counts and dollar value, overall or by stage |
| Rank companies by revenue, employees, or total deal value |
The dataset is generated by company_data.py into a local company.db. It's
entirely invented and safe to share; swapping in a real database means pointing
the tools at different SQL.
How it works
stdio (MCP) tool calls
chat.py ─────────────────► server.py ─────────────────► company.db
(client) ◄───────────────── (server) ◄───────────────── (SQLite)
tool results rows
chat.py also calls the Claude API to decide *which* tools to call.server.pydefines each tool with the@mcp.tool()decorator. FastMCP turns the function signature and docstring into the tool's input schema and description automatically, and handles the MCP wire protocol.chat.pylaunches the server as a subprocess over stdio, discovers its tools, and runs an agentic loop: it sends your question to Claude along with the tool list, Claude responds with tool calls,chat.pyexecutes them against the server, feeds the results back, and repeats until Claude has a final answer.
Setup
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtThe database is built automatically on first use. To build (or rebuild) it explicitly:
python company_data.py
# Built .../company.db with {'companies': 12, 'contacts': 16, 'deals': 19}Running the server
The server speaks MCP over stdio, so you normally run it through a client rather than directly. Two easy ways to poke at it:
MCP Inspector (a browser UI for trying tools by hand — no API key needed):
mcp dev server.pyClaude Desktop — add this to your claude_desktop_config.json:
{
"mcpServers": {
"company-records": {
"command": "python",
"args": ["/absolute/path/to/mcp-server-demo/server.py"]
}
}
}Restart Claude Desktop and the five tools appear; ask it about the data.
The chat agent (bonus)
chat.py is a self-contained client + agent so you can run the whole thing from
one terminal. It needs an Anthropic API key:
export ANTHROPIC_API_KEY=sk-ant-... # or copy .env.example to .env
python chat.py # interactive
python chat.py "Who are the CEOs in the database and what are their companies?" # one-shotExample session
$ python chat.py "What's our total closed-won pipeline, and which company has the most deal value?"
Connected to MCP server with 5 tools: search_companies, get_company, find_contacts, deal_summary, top_companies
· calling deal_summary()
· calling top_companies(by='deals', limit=1)
Closed-won deals total $13,075,000 across 7 deals. The company with the most
total deal value is Cobalt Mining Group at $7,700,000.Those figures come straight from the seeded data — deal_summary reports
closed_won at $13,075,000, and top_companies(by="deals") ranks Cobalt
Mining Group first. The · calling … lines show the actual tool calls Claude
chose to make.
Other questions that work well:
"Which software companies are in the database and how big are they?"
"Show me the full record for Pinecrest Health."
"Find every procurement contact."
"Rank the top 5 companies by revenue."
Project layout
mcp-server-demo/
├── server.py # MCP server — five tools over the SQLite DB
├── chat.py # CLI agent: Claude + MCP tool-calling loop
├── company_data.py # fictional dataset + SQLite builder
├── requirements.txt
└── .env.exampleTech
Python · Model Context Protocol (mcp SDK, FastMCP) · Anthropic API · SQLite
This server cannot be deployed
Maintenance
Related MCP Connectors
API-first CRM for LLMs - contacts, companies, deals and activities over a native MCP server.
Let AI agents query data and act across all your business apps via MCP.
Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.
Your agent needs B2B contacts and the pipeline objects around them — find the company, find the person, get the email, then write it back where your team works. **What you can ask for** • "Find heads of engineering at Series-B SaaS companies in the Nordics, with emails." • "Enrich these companies with headcount, industry and funding." • "What roles is this company hiring for right now?" • "Create an account and a contact, then log this opportunity." • "Search our sequences for messages sent to this domain." **How to use it** Point any MCP client at https://mcp.aisa.one/apollo/mcp and sign in with OAuth — there is no key to create or paste. 54 tools: people and organisation search and enrichment, job postings, accounts, contacts, opportunities and their stages, custom fields, labels, notes, users, email accounts, sequence messages and phone-call search — reads and writes. **Why this rather than the source** The full object model, not just a search endpoint, so an agent can finish the job rather than hand you a CSV. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the person here, then ask the same agent what their company's traffic looks like or what they rank for — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/sales/mcp adds Similarweb and creator discovery around it.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables 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.MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP-native CRM backend for AI agents, enabling customer, opportunity, note, follow-up, and pipeline health management through 15 MCP tools.-
- FlicenseNot gradedqualityCmaintenanceA read-only MCP server providing structured access to CRM data (companies, contacts, deals, activities) backed by SQLite. It enables LLMs to search contacts and deals, view full company accounts, find stale deals, and get pipeline summaries.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with multiple CRM systems through a unified set of MCP tools, such as finding contacts, accounts, and deals, while supporting mock, REST, and vendor-specific backends.MIT