User Management MCP Server
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., "@User Management MCP Servercreate a new user named Ajith with email ajith@example.com"
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.
User Management MCP Server
A simple Model Context Protocol (MCP) server for managing users through AI-compatible MCP clients.
This project is built with Node.js, Express, and the official MCP SDK. It demonstrates how to expose backend functionality through MCP Tools, Resources, and Prompts, with Zod-based input validation and Streamable HTTP transport.
Features
Create users
Get a user by ID
Get all users
Update users
Delete users
MCP Tools
MCP Resource
MCP Prompt
Zod input validation
Streamable HTTP transport
JSON file-based data storage
Express HTTP server
CORS support
Compatible with MCP clients such as Cursor
Related MCP server: Test MCP Server
Tech Stack
Node.js
Express.js
Model Context Protocol (MCP) SDK
Zod
Streamable HTTP
JavaScript (ES Modules)
JSON
Project Architecture
┌─────────────────────┐
│ MCP Client │
│ Cursor / AI Client │
└──────────┬──────────┘
│
│ Streamable HTTP
▼
┌─────────────────────┐
│ MCP Server │
│ Express + MCP SDK │
└──────────┬──────────┘
│
┌─────┴─────┐
│ │
▼ ▼
MCP Tools MCP Resource
│ │
└─────┬─────┘
│
▼
User Management
│
▼
users.jsonMCP Components
This project demonstrates the three main MCP capabilities:
1. Tools
The server exposes the following tools:
Tool | Description |
| Creates a new user |
| Retrieves a user by ID |
| Retrieves all users |
| Updates an existing user |
| Deletes an existing user |
create_user
Creates a new user.
Required fields:
name
email
address
phoneExample:
{
"name": "Ajith Kumar",
"email": "ajith@example.com",
"address": "Chennai, Tamil Nadu",
"phone": "9876543210"
}get_user
Retrieves a specific user using their ID.
Example:
{
"id": 1
}get_all_users
Returns all users stored in the user database.
No input is required.
update_user
Updates an existing user.
Required:
idOptional:
name
email
address
phoneExample:
{
"id": 1,
"name": "Ajith Kumar",
"phone": "9876500000"
}delete_user
Deletes a user using their ID.
Example:
{
"id": 1
}MCP Resource
The server also exposes an MCP Resource named:
user-api-guideResource URI:
http://localhost:5001/mcp/guideThe resource provides information about the available user-management tools and their required parameters.
Example information provided by the resource:
User Management MCP API
Available tools:
create_user
- Creates a new user
- Required: name, email, address, phone
get_user
- Gets a user by ID
- Required: id
get_all_users
- Returns all users
update_user
- Updates an existing user
- Required: id
- Optional: name, email, address, phone
delete_user
- Deletes a user
- Required: idMCP Prompt
The server provides an MCP Prompt:
create-userThe prompt instructs the MCP client to generate a random user and call the create_user tool automatically.
Example workflow:
MCP Client
↓
create-user Prompt
↓
Generate random user information
↓
create_user Tool
↓
User saved to users.jsonThis demonstrates how MCP Prompts can be used to provide reusable instructions to an AI client.
Input Validation
The project uses Zod to validate tool inputs.
Example:
inputSchema: {
name: z.string(),
email: z.string(),
address: z.string(),
phone: z.string(),
}For update operations, the fields are optional except for the user ID:
inputSchema: {
id: z.number(),
name: z.string().optional(),
email: z.string().optional(),
address: z.string().optional(),
phone: z.string().optional(),
}This helps ensure that MCP tool calls receive the expected input structure.
Data Storage
For simplicity, this project uses a JSON file as the data store:
model/
└── users.jsonUser operations read and write directly to this file.
Example:
[
{
"id": 1,
"name": "Ajith Kumar",
"email": "ajith@example.com",
"address": "Chennai",
"phone": "9876543210"
}
]This JSON-based storage is intended for learning and demonstration purposes. A production application should use a database such as PostgreSQL, MongoDB, or MySQL.
Project Structure
mcp-server/
│
├── model/
│ └── users.json
│
├── .gitignore
├── package.json
├── package-lock.json
├── server.js
└── README.mdInstallation
Clone the repository:
git clone https://github.com/ajith-fullstack/mcp-server.gitNavigate into the project:
cd mcp-serverInstall dependencies:
npm installRun the Server
Start the server:
npm startThe MCP server will start on:
http://localhost:5001MCP endpoint:
http://localhost:5001/mcpThe project currently uses port 5001 for the Express/MCP server.
Development Mode
The project also includes a development script using Nodemon.
Run:
npm run devThis automatically restarts the server when source files are changed.
Connecting with Cursor
This MCP server can be connected to MCP-compatible clients such as Cursor.
Example MCP configuration:
{
"mcpServers": {
"user-management": {
"url": "http://localhost:5001/mcp"
}
}
}After connecting the server, the MCP client can discover and use the available tools.
For example:
User:
Create a new user named Ajith Kumar.
↓
MCP Client
↓
create_user
↓
MCP Server
↓
users.jsonThe server can therefore expose existing backend functionality to an AI client through the MCP protocol.
Example MCP Workflow
Create User
AI Client
↓
create_user
↓
MCP Server
↓
User Service
↓
users.jsonGet User
AI Client
↓
get_user
↓
MCP Server
↓
users.json
↓
User informationUpdate User
AI Client
↓
update_user
↓
MCP Server
↓
users.jsonDelete User
AI Client
↓
delete_user
↓
MCP Server
↓
users.jsonAPI Endpoint
MCP Endpoint
POST /mcpThe MCP server uses Streamable HTTP transport to handle MCP requests.
Health / GET Endpoint
GET /mcpResponse:
MCP GET endpoint reachedDependencies
Main dependencies:
@modelcontextprotocol/sdk
express
zodDevelopment dependency:
nodemonThe current project uses the MCP SDK, Express 5, Zod 4, CORS, and Nodemon.
What I Learned
This project was built to understand how Model Context Protocol (MCP) can be used to expose backend functionality to AI applications.
Key concepts implemented:
MCP Server setup
MCP Tool registration
MCP Resource registration
MCP Prompt registration
Tool input validation using Zod
Streamable HTTP transport
Express integration
CRUD operations
AI client integration
Tool discovery
Tool invocation
Backend execution through MCP
License
This project is open source and available for learning and development purposes.
Author
Ajithkumar
GitHub:
https://github.com/ajith-fullstack
Repository:
https://github.com/ajith-fullstack/mcp-server
This version matches the implementation in your repository, including the **five tools, `user-api-guide` resource, `create-user` prompt, Zod schemas, and Streamable HTTP endpoint**.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
Build, validate, deploy — HTTP APIs, cron jobs, webhooks and MCP tools — from your AI client.
Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA simple Model Context Protocol (MCP) server that allows LLMs to create and manage user entries in a JSON file system database.681 npmMIT
- AlicenseBqualityDmaintenanceManages user data with resources, tools, and prompts for CRUD operations on a JSON file.21MIT
- FlicenseNot gradedqualityCmaintenanceA 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.1-
- FlicenseNot gradedqualityBmaintenanceMCP server demonstrating Streamable HTTP with Tools, Resources, and Prompts for user registration, login, and profile management via a REST API.-