MCP Server
A simple MCP server that exposes a createUser tool to add users to a local JSON file via stdio transport.
README
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.
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.
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.
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.
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.
E2B
Using MCP to run code via e2b.
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.