Contact Book MCP Server
Contact Book MCP Server
mcp Python SDK の FastMCP を使用して構築された、インメモリの連絡先を管理するシンプルな Model Context Protocol(MCP) サーバーです。
機能
このサーバーは次の4つのツールを提供します:
ツール | 説明 |
| 連絡先鼓に新しい連絡先を追加します。 |
| 名前の完全一致で連絡先を取得します。 |
| 名前の部分一致(大文字・小文字を区別しない)で連絡先を検索します。 |
| 既存の連絡先の電話番号とメールアドレスを更新します。 |
連絡先はメモリ上に次のように保存されます:
contacts: dict[str, dict] # name -> {"phone": ..., "email": ...}注記: データはメモリ上にのみ保存されます。サーバーを再起動すると、すべての連絡先は失われます。
Related MCP server: notes-box
要件
Python 3.10+
uv(サーバーの実行に推奨)
インストール
このリポジトリをクローンします:
git clone <your-repo-url> cd contact_book_server_mcp依存関係をインストールします:
pip install -r requirements.txtまたは、
uvを使用する場合(推奨。手動インストールは不要 — 下記参照)。
サーバーの実行
MCP Inspector を使用する(テスト・開発用)
uv run --with mcp mcp dev server.pyこれによりサーバーが起動し、ブラウザーで MCP Inspector が開きます。ここで各ツールを対話的にテストできます。
単独実行
python server.py使用例
連絡先を追加
add_contact(name="Humna Fahad", phone="03001234567", email="humna@test.com") → "Contact 'Humna Fahad' added successfully."連絡先を取得
get_contact(name="Humna Fahad") → {"name": "Humna Fahad", "phone": "03001234567", "email": "humna@test.com"}連絡先を検索
search_contacts(query="Hum") → [{"name": "Humna Fahad", "phone": "03001234567", "email": "humna@test.com"}]連絡先を更新
update_contact(name="Humna Fahad", phone="03009998888", email="humna@updated.com") → "Contact 'Humna Fahad' updated successfully."
プロジェクトの状態
✅ 4つのツールはすべて実装済みで、MCP Inspector でテスト済みです。
考えられる改善案
delete_contactツールを追加する。list_all_contactsツールを追加する。メモリ上に保存するのではなく、JSONファイルやデータベースに連絡先を永続化する。
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Hosted MCP memory and agent control plane for durable conversations, jobs, and operations.
MCP server for OnceAsk, the AI-native current-address layer for people and agents.
MCP server for SuperPhone — contacts, conversations, tags and consent-based text messages.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables creating, retrieving, updating, deleting, and listing notes through a simple MCP interface, with configurable note storage.MIT
- FlicenseNot gradedqualityCmaintenanceEnables managing notes through add, get, update, delete, and list tools via MCP.-
- AlicenseNot gradedqualityCmaintenanceEnables managing a local notes file through add, get, update, delete, and list operations via MCP.MIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to add, retrieve, update, delete, and list notes stored in a configurable local JSON file, with atomic saves behind a write lock.-