Contact Book MCP Server
Enables an in-memory contact book to be managed by adding, retrieving, searching, and updating contacts through MCP tools.
README
Contact Book MCP Server
A simple Model Context Protocol (MCP) server that manages an in-memory contact book. Built with FastMCP from the mcp Python SDK.
Features
This server exposes four tools:
| Tool | Description |
|---|---|
add_contact(name, phone, email) |
Adds a new contact to the contact book. |
get_contact(name) |
Retrieves a contact by exact name match. |
search_contacts(query) |
Searches contacts by partial (case-insensitive) name match. |
update_contact(name, phone, email) |
Updates an existing contact's phone and email. |
Contacts are stored in memory as:
contacts: dict[str, dict] # name -> {"phone": ..., "email": ...}
Note: Data is stored in memory only. All contacts are lost when the server restarts.
Requirements
- Python 3.10+
uv(recommended for running the server)
Installation
-
Clone this repository:
git clone <your-repo-url> cd contact_book_server_mcp -
Install dependencies:
pip install -r requirements.txtOr, if using
uv(recommended, no manual install needed — see below).
Running the Server
With MCP Inspector (for testing/development)
uv run --with mcp mcp dev server.py
This starts the server and opens the MCP Inspector in your browser, where you can test each tool interactively.
Standalone
python server.py
Example Usage
-
Add a contact
add_contact(name="Humna Fahad", phone="03001234567", email="humna@test.com") → "Contact 'Humna Fahad' added successfully." -
Get a contact
get_contact(name="Humna Fahad") → {"name": "Humna Fahad", "phone": "03001234567", "email": "humna@test.com"} -
Search contacts
search_contacts(query="Hum") → [{"name": "Humna Fahad", "phone": "03001234567", "email": "humna@test.com"}] -
Update a contact
update_contact(name="Humna Fahad", phone="03009998888", email="humna@updated.com") → "Contact 'Humna Fahad' updated successfully."
Project Status
✅ All four tools implemented and tested via MCP Inspector.
Possible Improvements
- Add a
delete_contacttool. - Add a
list_all_contactstool. - Persist contacts to a JSON file or database instead of in-memory storage.
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.
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.
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.
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.
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.
E2B
Using MCP to run code via e2b.