generic-mcp-server
Enables configuration through environment variables loaded from .env files, supporting easy management of API keys and other configuration settings needed by the MCP server.
Serves as the runtime environment for the MCP server, with support for Node.js 18 or higher, enabling server-side JavaScript execution and API integrations.
Provides full TypeScript support with proper typing throughout the codebase, enabling type safety for tool definitions, service implementations, and handler functions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@generic-mcp-server create a server for the Stripe API using their OpenAPI spec"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: Swagger MCP
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
Available Tools
2 toolscalculate-sumB
Calculates the sum of two numbers
Inputs: a (required), b (required).
get-weatherC
Get weather forecast for a city
Inputs: city (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: calculate-sum performs a mathematical operation on numbers, while get-weather retrieves weather data for a city. There is no overlap or ambiguity between these functions, making it impossible for an agent to confuse them.
The tool names use a verb-noun pattern (calculate-sum, get-weather), which is consistent in structure. However, they use different verb styles (calculate vs. get) and a hyphen delimiter, which is readable but shows minor deviation in convention.
With only 2 tools, the server feels thin and under-scoped for a generic purpose. This minimal set lacks coverage for typical operations in any specific domain, making it inappropriate for most agent workflows.
The tool surface is severely incomplete for a generic server. There are major gaps in functionality, such as missing basic CRUD operations, data processing tools, or domain-specific coverage, which will likely cause agent failures in practical use.
Maintenance
Related MCP Connectors
A full backend your AI coding agent can set up over MCP
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Host any HTTP API as a standard MCP server; auto-distribute to 12+ mainstream agent platforms.
AI-native mock API server with MCP. Create REST/SOAP mocks from Claude, Cursor, or Windsurf.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAutomatically converts any OpenAPI specification or Postman Collection into an MCP server, enabling AI assistants like Claude to directly interact with REST APIs without writing any code.Apache 2.0
- FlicenseNot gradedqualityDmaintenanceAutomatically converts Swagger/OpenAPI specifications into MCP servers, enabling AI agents to interact with any REST API through natural language by exposing endpoints as AI-friendly tools.3-
- AlicenseNot gradedqualityBmaintenanceOne command to turn any codebase into an MCP server. Not just REST APIs. Not just OpenAPI specs.201 PyPI60Apache 2.0
- FlicenseNot gradedqualityDmaintenanceConverts any Swagger/OpenAPI specification into an MCP server, enabling AI assistants to intelligently query API endpoints, schemas, and generate code examples.18-