generic-mcp-server
Generic MCP Server Template
A flexible template for creating Model Context Protocol (MCP) servers using the official TypeScript SDK.
What is MCP?
The Model Context Protocol (MCP) enables communication between AI assistants and locally running servers that provide additional tools and resources.
Features
Official SDK: Built with
@modelcontextprotocol/sdkType Safety: Full TypeScript support with Zod validation
Stdio Transport: Standard transport for local agent integration
Modular Design: Easy to add new tools and resources
Getting Started
Prerequisites
Node.js (v16 or later)
npm or yarn
Installation
Clone the repository:
git clone https://github.com/v4lheru/generic-mcp-template.git cd generic-mcp-serverInstall dependencies:
npm installBuild the project:
npm run build
Usage
To run the server locally (for testing or development):
npm run startNote: This server uses stdio transport, so it expects to communicate via standard input/output. It will not start an HTTP server.
Adding to Claude Desktop
Open Claude Desktop config (e.g.
~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS).Add your server:
{
"mcpServers": {
"my-server": {
"command": "node",
"args": ["/path/to/generic-mcp-server/dist/index.js"]
}
}
}Customization
Tools: Add new tools in
src/tools.ts.Resources: Add new resources in
src/resources.ts.Config: Update
src/config.tsfor environment variables.
License
MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/v4lheru/generic-mcp-template'
If you have feedback or need assistance with the MCP directory API, please join our Discord server