simple-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., "@simple-mcp-server What's the weather in Tokyo?"
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.
Simple MCP Server Demo π
A full-featured demonstration project for the Model Context Protocol (MCP) built with TypeScript and @modelcontextprotocol/sdk.
This project showcases all three primary primitives of the MCP standard:
π οΈ Tools β Functions and actions executed by the AI model.
π Resources β Data sources and context attachments read by the AI model via URIs.
π¬ Prompts β Reusable, parameterized prompt templates and workflows.
It is structured to run both locally via Stdio (for Claude Desktop, IDEs, Inspector) and in the cloud on Vercel as a Serverless API (using Web Standards Streamable HTTP transport).
π Features Included
1. Tools
get_greeting: Greets a user by name with a friendly message.calculate: Performs arithmetic operations (add,subtract,multiply,divide,power) with safety checks (e.g. division by zero).fetch_weather: Fetches live, real-time weather forecasts for any city worldwide using the free Open-Meteo REST API (no API key required).add_note: Creates and stores a note in server memory with a custom ID.list_notes: Lists all notes currently stored in server memory.
2. Resources
Static Resource (
system://info): Returns host OS, Node.js version, memory usage, uptime, and timestamp in JSON format.Dynamic Resource Template (
notes://{id}): Reads specific note details and markdown content dynamically by ID.
3. Prompts
code_review: A structured code review prompt template that instructs the LLM to inspect code for security, performance, readability, and recommendations.summarize_notes: A prompt template that pulls all stored server notes and asks the model for an executive summary.
Related MCP server: creating-your-first-mcp-server
π Getting Started
Prerequisites
Node.js (v18 or higher)
npm
Installation
npm installDevelopment
Run the server locally over Stdio:
npm run devRun Local Automated Test Suite
npm testType Checking
npm run typecheckπ Testing Interactively with MCP Inspector
The official MCP Inspector provides an interactive web UI to test and debug your MCP server:
npx @modelcontextprotocol/inspector tsx src/stdio.tsOnce running, open the URL provided in your terminal (usually http://localhost:5173) to test:
Tools tab: Execute
calculate,fetch_weather(e.g. city:"Tokyo"),add_note, andlist_notes.Resources tab: Read
system://infoornotes://welcome.Prompts tab: Test the
code_reviewandsummarize_notestemplates.
π Connecting to Local MCP Clients (Claude Desktop)
Add the following to your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"simple-mcp-server": {
"command": "npx",
"args": [
"-y",
"tsx",
"/Users/saheel-ahmed/Projects/demos/saheel-git-repo/simple-mcp-project/src/stdio.ts"
]
}
}
}βοΈ Deploying to Vercel
This repository includes a serverless endpoint ready for Vercel in api/index.ts using WebStandardStreamableHTTPServerTransport.
Deploy using Vercel CLI
npx vercelFollow the interactive prompts to link and deploy your project.
Or Deploy via GitHub
Push this repository to GitHub.
Go to vercel.com/new and import the repository.
Click Deploy.
Once deployed, your remote MCP server endpoint will be live at:
https://<your-project-name>.vercel.app/apiRemote MCP clients can connect to this URL using the SSE/Streamable HTTP transport!
π Project Structure
simple-mcp-project/
βββ api/
β βββ index.ts # Vercel Serverless Function entrypoint (HTTP / Web Standards)
βββ src/
β βββ index.ts # Local entrypoint (Stdio transport)
β βββ server.ts # MCP Server definition (Tools, Resources, Prompts)
β βββ test-client.ts # Automated integration test suite
βββ tsconfig.json # TypeScript configuration
βββ vercel.json # Vercel routing configuration
βββ package.json # Dependencies, scripts, and build setup
βββ README.md # Project documentationAvailable Tools
5 toolsadd_noteA
Stores a new note in server memory.
Inputs: id (required), title (required), content (required).
calculateA
Performs arithmetic operations (add, subtract, multiply, divide, power).
Inputs: a (required), b (required), operation (required).
fetch_weatherA
Fetches live weather forecast for any city using Open-Meteo.
Inputs: city (required).
get_greetingB
Returns a personalized welcome message.
Inputs: name (required).
list_notesA
Lists all available notes stored in server memory.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
Each tool addresses a distinct function: greeting, arithmetic, weather, and note management. There is no overlap or ambiguity between them.
Tool names follow a consistent snake_case verb pattern, mostly verb_noun (get_greeting, fetch_weather, add_note, list_notes). 'calculate' is a lone verb but still fits the predictable style.
Five tools is a reasonable size for a simple utility server. Each tool has a clear purpose and none feel redundant or excessive.
Core functionality for each utility is present, but note management lacks delete or update operations. This is a minor gap for a simple note-taking feature, not a critical omission.
Maintenance
Related MCP Connectors
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Nifty's MCP server β exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA demonstration MCP server showcasing tools (calculator, file operations, weather, timestamp), resources (server config, system info, documentation), and reusable prompt templates for code review, documentation, and debugging.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables to perform mathematical calculations, retrieve weather information, and manage files through a standardized MCP interface, showcasing best practices for building MCP servers.1MIT
- FlicenseNot gradedqualityDmaintenanceThis MCP server provides tools like weather lookup and follows the Model Context Protocol for tool calling, resource sharing, and prompt templates.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to call weather tools, read resources, and use prompt templates for live weather data integration.2,530 npmMIT