MCP User CRUD Server
A testing server that provides CRUD operations on a JSON user database via MCP tools, enabling AI assistants to list, search, add, update, and delete users.
README
MCP User CRUD Server
A small test server that speaks MCP (Model Context Protocol). MCP is a standard way for AI assistants (like Claude) to call tools and get real data back, instead of just guessing answers.
This server manages a simple list of users (name, email, phone, age) stored in a plain JSON file. It's meant for testing and learning, not for storing real/production data.
What it can do
The server gives an AI assistant 5 tools it can call:
| Tool | What it does |
|---|---|
list_users |
Show every user |
search_user |
Find users by any field (name, email, phone, age, id) |
add_user |
Create a new user |
update_user |
Change one or more fields on an existing user |
delete_user |
Remove a user |
All the data lives in users_db.json, right next to the server script. You can open that file in any text editor to see or edit it directly.
Before you start
You need Python 3.10 or newer installed on your computer.
- Windows: download it from python.org
- Mac: run
brew install python3(or download from python.org) - Linux: usually already installed; if not,
sudo apt install python3 python3-venv(Ubuntu/Debian) or your distro's equivalent
You do not need to install anything else by hand — the launcher scripts below do that for you automatically the first time you run them.
How to run it
Pick the file that matches your computer. Everything else (installing dependencies, etc.) happens automatically.
- Windows → double-click
run_server.bat - Mac → double-click
run_server_mac.command(if macOS blocks it the first time, right-click the file → Open → confirm) - Linux → open a terminal in this folder and run
bash run_server_linux.sh
The first time you run it, it may take a minute to set itself up. After that it starts instantly.
Choosing authentication
Every time you start the server, it asks how you want to protect it:
1. None (no authentication)
2. API Key (client sends X-API-Key header)
3. Bearer Token (client sends Authorization: Bearer <token> header)
- None — anyone who can reach the server can use it. Good for a quick local test.
- API Key — the server makes up a secret key (or you can type your own), and only requests that include that exact key are allowed in.
- Bearer Token — same idea as API Key, just using the
Authorization: Bearer ...header style that a lot of tools expect.
Whichever you pick, the server prints the secret and a ready-to-use connection block right in the console — you don't need to remember or configure anything by hand.
Connecting to it
When the server starts, it prints something like this:
This machine : http://127.0.0.1:8765/mcp
LAN / remote : http://192.168.1.42:8765/mcp
Auth mode : api_key
Secret : Xy82jKf...
Client config (Claude Desktop / Claude Code / Cursor, etc.):
{
"mcpServers": {
"test-user-db": {
"type": "streamable-http",
"url": "http://192.168.1.42:8765/mcp",
"headers": { "X-API-Key": "Xy82jKf..." }
}
}
}
Copy that JSON block into whichever MCP-compatible app you're connecting from (Claude Desktop, Claude Code, Cursor, etc.), and it will be able to see and use the 5 tools listed above.
- Use the
127.0.0.1URL if the app is on the same computer as the server. - Use the
LAN / remoteURL if you're connecting from a different computer on the same network.
Files in this folder
| File | Purpose |
|---|---|
start_server.py |
The actual server code |
users_db.json |
The user data (plain JSON, safe to edit by hand) |
run_server.bat |
One-click launcher for Windows |
run_server_mac.command |
One-click launcher for Mac |
run_server_linux.sh |
Launcher for Linux |
requirements.txt |
List of Python packages the server needs |
test_client.py |
A script to test the server automatically (optional, not required to use the server) |
Good to know
- This is a testing tool, not a production system. There's no encryption of the data file, and the API key / bearer token are simple shared secrets, not full user accounts.
- Stopping the server: just close the console window, or press
Ctrl+Cinside it. - To clear all data, delete everything inside
users_db.jsonand replace it with[]. If the file is missing entirely, the server just starts with zero users and creates the file again as soon as you add one.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。