M
MCP Server
by @GiftBanda
A simple MCP server with a create user tool
Created 5/11/2026
Updated about 4 hours ago
README
Repository documentation and setup instructions
MCP Server (TypeScript)
A simple Model Context Protocol (MCP) server built with TypeScript.
It currently exposes one MCP tool:
createUser: Creates a new user and appends it tosrc/data/users.json.
Features
- MCP server over stdio transport
- Input validation with Zod
- JSON-based data persistence for users
Project Structure
src/
server.ts # MCP server entrypoint and tool registration
data/
users.json # Local user datastore
types/
user.types.ts # User input type
Prerequisites
- Node.js 18+
- npm
Install
npm install
Run (Development)
npm run server:dev
Build
npm run server:build
Compiled output goes to build/.
Build Watch Mode
npm run server:build:watch
Inspect with MCP Inspector
Use the MCP Inspector to test tool calls interactively:
npm run server:inspect
Then call the createUser tool with this shape:
{
"name": "Jane Doe",
"email": "jane.doe@example.com",
"address": "123 Main St, Springfield, IL",
"phone": "+1-555-555-5555"
}
Successful calls append a new user record to src/data/users.json and return the created ID.
Available Scripts
server:dev- Run server from TypeScript source withtsxserver:build- Compile TypeScript tobuild/server:build:watch- Compile in watch modeserver:inspect- Launch MCP Inspector against the serverclient:dev- Reserved script inpackage.json(nosrc/client.tsfile currently in this workspace)
Notes
- Data is persisted by writing directly to
src/data/users.json. - User IDs are assigned as
users.length + 1. - If you manually edit
users.json, keep it valid JSON.
Quick Setup
Installation guide for this server
Install Package (if required)
npx @modelcontextprotocol/server-mcp-server
Cursor configuration (mcp.json)
{
"mcpServers": {
"giftbanda-mcp-server": {
"command": "npx",
"args": [
"giftbanda-mcp-server"
]
}
}
}