Prepare the server locally
Run this once before adding it to Claude Code.
npm install
npm startRegister it in Claude Code
claude mcp add mcp-calculator-demo -- node /path/to/server.mjsReplace any placeholder paths in the command with the real path on your machine.
Make your agent remember this setup
mcp-calculator-demo's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- Provides basic arithmetic operations
- Implements the Model Context Protocol
- Supports addition, subtraction, multiplication, and division
- Demonstrates client-server communication
Tools 4
addAdds two numbers togethersubtractSubtracts the second number from the firstmultiplyMultiplies two numbersdivideDivides the first number by the secondTry it
Original README from FisherSkyi/mcp-demo
MCP Demo
This repository contains demo projects showcasing the use of the Message Communication Protocol (MCP) in different scenarios.
Projects
1. Calculator
A simple calculator service with a client and server implementation.
- Files:
demo-client.mjs: Example client for the calculator serviceserver.mjs: Calculator serverpackage.json,README.md
2. MCP Client (TypeScript)
Offical demo from MCP documentation
A TypeScript-based client for interacting with MCP services.
- Files:
index.ts: Main client codebuild/index.js: Compiled output.env: Environment configurationlog/session1.txt: Example session logpackage.json,tsconfig.json
[!NOTE] Need to set
ANTHROPIC_API_KEYin.envto run the client. The credit from Anthropic is NOT free.
3. Weather
Offical demo from MCP documentation
A weather information service using MCP.
- Files:
src/index.ts: Main source codebuild/index.js: Compiled outputpackage.json,tsconfig.json
Getting Started
Each project contains its own dependencies and setup.
Navigate into a project folder and run:
npm install
npm start
or for TypeScript projects:
npm install
npm run build
npm start
License
MIT