mcp-server-example
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., "@mcp-server-example 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.
MCP Server Example
A minimal example Model Context Protocol (MCP) server
built with the official TypeScript SDK (@modelcontextprotocol/sdk). It communicates over
stdio and demonstrates the three core MCP primitives:
Tools — callable functions:
add(a, b)— adds two numbers.get-weather(city)— returns a mock weather report.save-note(key, text)— saves a note in memory.
Resources — readable data:
notes://list— lists all saved notes as JSON.
Prompts — reusable prompt templates:
summarize-notes— asks the model to summarize all saved notes.
Setup
npm install
npm run buildRelated MCP server: mcp-demo
Run
npm startThe server communicates over stdio, so it's meant to be launched by an MCP client (e.g. Claude Desktop, VS Code, or the GitHub Copilot CLI), not run interactively.
Configure with an MCP client
Example client config (e.g. claude_desktop_config.json or similar):
{
"mcpServers": {
"example": {
"command": "node",
"args": ["/absolute/path/to/mcp-server-example/build/index.js"]
}
}
}Debugging
Use the official MCP Inspector to test the server interactively without a full client:
npx @modelcontextprotocol/inspector node build/index.jsProject structure
mcp-server-example/
├── src/
│ └── index.ts # Server implementation (tools, resources, prompts)
├── package.json
├── tsconfig.json
└── README.mdAvailable Tools
4 toolsaddAdd two numbersA
Adds two numbers together and returns the result.
Inputs: a (required), b (required).
get-weatherGet weather (mock)A
Returns a mock weather report for a given city.
Inputs: city (required).
multiplyMultiply two numbersC
Multiplies two numbers together you jackass
Inputs: a (required), b (required).
save-noteSave a noteA
Saves a text note under a given key for later retrieval.
Inputs: key (required), text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The tools are mostly easy to tell apart: multiply and add share an arithmetic context but perform clearly distinct operations, while get-weather and save-note are completely unrelated. The only minor ambiguity is that multiply and add could be grouped together by an agent looking for generic math tools.
Naming is inconsistent: multiply and add are bare verbs, while get-weather and save-note use hyphenated verb-noun compounds. A uniform verb_noun convention would make the toolset more predictable.
Four tools is a reasonable size for an example MCP server, and each tool has a distinct function. However, the tools serve unrelated domains, making the set feel like a demo grab-bag rather than a focused toolkit.
The set is incomplete for any single domain: arithmetic lacks subtract/divide, notes lack retrieval/deletion, and weather is just one mock endpoint. Agents would hit dead ends when trying to do basic related workflows.
Maintenance
Related MCP Connectors
Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
Cross-session, cross-device memory for your agent: remember and recall notes. No key to start.
Notes, tasks, habits, journal and 6 more tools Claude can read and change, with undo. Free.
Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides calculator tools for mathematical operations, access to TypeScript SDK documentation, and meeting summary prompt templates through both stdio and SSE transports.8-
- AlicenseAqualityDmaintenanceA minimal MCP server example demonstrating Tools, Resources, and Prompts. It enables calculations, time queries, note management, and code review prompts via stdio transport.3MIT
- FlicenseNot gradedqualityCmaintenanceEnables arithmetic addition, personalized greetings, version lookup, and text summarization through MCP tools, a resource, and a prompt.-
- AlicenseAqualityCmaintenanceProvides AI clients with real-time tools for math evaluation, timezone-aware time lookup, live weather retrieval, and persistent note management, all accessible over the Model Context Protocol via stdio.62MIT