mcp-server-template
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.
mcp-server-template
LLM-agnostic MCP Server- node
This is a lightweight, generic Model Context Protocol (MCP) server implementation written in Node.js. It defines a few simple tools and can be used with any LLM that supports the MCP tool calling interface โ including Claude, ChatGPT (via wrappers), OpenDevin, or open-source LLMs.
๐ Features
- Supports MCP over stdio
- Defines two example tools:
about
โ returns information about the serverhello
โ returns a friendly greeting
- Built with the official @modelcontextprotocol/sdk
๐ฆ Installation
git clone https://github.com/yourusername/mcp-generic-server.git
cd mcp-generic-server
npm install
๐ Running the Server
node index.js
This will start the server and connect it via stdio (e.g., for use in Claude Desktop or similar tool-calling environments).
๐ง Tool Definitions
- about Description: Returns information about the MCP server.
Input Schema: {}
- hello Description: Returns a greeting.
Input Schema:
json
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name to greet (optional)"
}
},
"required": []
}
๐ก Customization
To add your own tools, modify the TOOLS array in index.js and extend the "tools/call" logic to handle them.
๐งช Testing
You can test the server using:
Claude Desktop (via stdio plugin)
A custom LLM tool-caller that supports MCP over stdio
Manual calls using tools like ncat, jq, or a test harness
๐ MCP Methods Supported
initialize
tools/list
tools/call
resources/list (returns empty array)
prompts/list (returns empty array)
๐ก License
This project is licensed under the MIT License. Please retain attribution in derivative works.
๐ Credits
Built using the Model Context Protocol SDK.