@kerrmoulton/mcp_demo
v1.0.2
Published
This is a demo project showcasing how to create a Model Context Protocol (MCP) server using the FastMCP framework.
Readme
MCP Demo with FastMCP
This is a demo project showcasing how to create a Model Context Protocol (MCP) server using the FastMCP framework.
Prerequisites
- Node.js (version 16 or higher)
- npm (comes with Node.js)
Installation
npm installBuilding the Project
npm run buildRunning the Demo
You can run the MCP server in development mode:
npm run devOr you can build and run the compiled version:
npm run build
npm startUsing the MCP Inspector
FastMCP provides a built-in inspector tool to test your MCP server:
npm run inspectAvailable Tools
This demo server provides the following tools:
- add: Adds two numbers together
- multiply: Multiplies two numbers together
- greet: Greets a person by name
Project Structure
src/server.ts: Main server implementationdist/: Compiled JavaScript filespackage.json: Project configuration and scriptstsconfig.json: TypeScript configuration
