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 henry@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