mcp-starter-kit-node
0
The MCP Quick Start Server is a basic implementation of a Model Context Protocol server using TypeScript, demonstrating how to define tools and resources for AI interactions. It features tools for arithmetic and humor retrieval and provides a development guide for building and running the server efficiently.
MCP Quick Start Server
This project is a simple example of a Model Context Protocol (MCP) server using TypeScript and the @modelcontextprotocol/sdk
. It showcases the definition of basic tools, resources, and prompts.
Features
- Tool: add: Adds two numbers.
- Tool: fetch-chuck-jokes: Fetches a random Chuck Norris joke.
- Resource: greeting: Provides a personalized greeting.
- Prompt: getGreetingAndJoke: Guides an AI client to greet a user and tell a Chuck Norris joke.
Prerequisites
- Node.js (v18.x or later recommended)
- npm
Setup & Installation
- Clone the repository, install dependencies, build, and run the server.
Development Workflow
- Use
npm run dev
for live-reload experience during development.
How It Works
- The server initializes an
McpServer
instance and connectsStdioServerTransport
for communication. Tools, resources, and prompts are defined for interaction with MCP clients.
Further Development
- Suggestions include adding complex tools, interacting with databases, and exploring new transport layers.