mcp-server-template
0
This project offers a generic Model Context Protocol (MCP) server written in Node.js, providing tool-calling capabilities for language models. It includes features such as example tools and supports customization.
Overview
This project is a lightweight, generic Model Context Protocol (MCP) server implementation written in Node.js. It supports MCP over stdio and can be used with any LLM supporting the MCP tool calling interface, such as Claude and ChatGPT. Key features include:
- Two example tools:
about
, which returns information about the server, andhello
, which returns a friendly greeting. - Built with the official Model Context Protocol SDK.
- Provides methods such as
initialize
,tools/list
,tools/call
,resources/list
, andprompts/list
.
Installation
- Clone the repository:
git clone https://github.com/yourusername/mcp-generic-server.git
- Navigate into the project directory and install dependencies:
npm install
Running the Server
Start the server using node index.js
, which connects via stdio.
Customization
To add your own tools, modify the TOOLS array in index.js
and extend the "tools/call" logic.