vagpp/mcp-server
If you are the rightful owner of mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A clean, extensible Model Context Protocol (MCP) server implementation using the official `@modelcontextprotocol/sdk`.
MCP Server
A clean, extensible Model Context Protocol (MCP) server implementation using the official @modelcontextprotocol/sdk.
Features
- 🚀 Built with official MCP SDK (v1.18.2)
- 📦 TypeScript support
- 🔧 Easy to extend with new tools
- 💬 Stdio transport for Claude Desktop integration
- ✨ Clean, minimal codebase
Built-in Tools
echo
Echoes back any message you send to it.
Parameters:
message(string, required): Message to echo back
time
Returns the current server time in ISO 8601 format.
Parameters: None
Quick Start
Installation
npm install
Development
npm run dev
Build
npm run build
Run
npm start
Usage with Claude Desktop
Add to your Claude Desktop config (~/AppData/Roaming/Claude/claude_desktop_config.json on Windows):
{
"mcpServers": {
"mcp-server": {
"command": "node",
"args": ["/path/to/mcp-server-clean/dist/index.js"]
}
}
}
Adding New Tools
To add a new tool, edit src/index.ts:
- Add the tool to the list:
server.setRequestHandler(ListToolsRequestSchema, async () => {
return {
tools: [
// ... existing tools
{
name: "your-tool-name",
description: "Description of what your tool does",
inputSchema: {
type: "object",
properties: {
param1: {
type: "string",
description: "Description of param1",
},
},
required: ["param1"],
},
},
],
};
});
- Handle the tool call:
server.setRequestHandler(CallToolRequestSchema, async (request) => {
const { name, arguments: args } = request.params;
// ... existing tool handlers
if (name === "your-tool-name") {
const param1 = args?.param1 as string;
// Your tool logic here
return {
content: [
{
type: "text",
text: "Your response",
},
],
};
}
throw new Error(`Unknown tool: ${name}`);
});
Project Structure
mcp-server-clean/
├── src/
│ └── index.ts # Main server implementation
├── dist/ # Compiled JavaScript (generated)
├── package.json
├── tsconfig.json
└── README.md
Protocol
This server implements the Model Context Protocol (MCP) specification version 2025-06-18.
License
MIT