mcp-server

vagpp/mcp-server

3.2

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`.

Tools
2
Resources
0
Prompts
0

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:

  1. 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"],
        },
      },
    ],
  };
});
  1. 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