easy
Absurdly easy Model Context Protocol Servers in Typescript
claude mcp add --transport stdio zcaceres-easy-mcp node path/to/server.js
How to use
EasyMCP is a TypeScript-based framework for building MCP servers with minimal boilerplate. It provides a high-level API to declare Tools, Prompts, Resources, Resource Templates, and Roots in a way that feels similar to defining routes in Express. The library also offers an experimental decorators API that can autoguess input arguments and wiring, as well as a Context object that tools can use to log progress, read resources, and report status. Use it to rapidly create server endpoints that expose your prompts, tools, and resources for client usage, while benefiting from improved type safety and developer experience.
To use EasyMCP, install the package in your project, write your MCP class by extending EasyMCP or by using the Express-like API, and then start the server. The Quick Start demonstrates both the decorator-based approach (experimental) and the traditional Express-like API for defining resources, templates, tools, and prompts. The decorators API can infer parameter types and inputs automatically, while the Express-like API provides a more explicit, stable surface for defining your MCP surface. When running, clients can call your defined tools and prompts, fetch resources, and interact with resource templates as part of the MCP service.
How to install
Prerequisites:
- Node.js or bun-enabled environment (as recommended by the project)
- A modern shell (bash/zsh/powershell)
- Create a new project (if you donβt have one):
- mkdir my-mcp-server
- cd my-mcp-server
- npm init -y
- Install EasyMCP (and any runtime you prefer, e.g., bun or node):
- npm install easy-mcp
- Create your MCP server file (e.g., server.ts or server.js) and implement your MCP class using the library. Example structure:
import EasyMCP from "easy-mcp";
class MyMCP extends EasyMCP {
// Define resources, templates, tools, prompts here using the API or decorators
}
const mcp = new MyMCP({ version: "1.0.0" });
mcp.serve?.(); // or mcp.serve() depending on your setup
- Start the server (adjust to your runtime):
- If using bun: bun start
- If using node with built output: node dist/server.js
- Verify the MCP server is running by hitting its endpoints/tools/prompts as defined in your code.
Optional: Add a package.json script for convenience, e.g.:
"scripts": {
"start": "bun start:express" // or "node dist/server.js" depending on setup
}
Additional notes
Tips and common notes:
- The project is in beta; expect API changes and potential issues. Report any bugs you encounter.
- Beta limitations include no MCP sampling, no SSE support, no resource update notifications, and some prompts may have incomplete input serialization.
- Decorators API is experimental and aims to reduce boilerplate by inferring tool, prompt, and resource arguments. If you rely on stable inputs, prefer the Express-like API defined in the Quick Start section.
- Environment variables: define any required API keys, database URLs, or logging configurations in your deployment environment or via a .env file. The mcp_config env map can be used to supply per-server environment variables as needed.
- When upgrading, review changes to input inference and optional parameter handling to ensure compatibility with existing tools and prompts.
Related MCP Servers
MCP-Bridge
A middleware to provide an openAI compatible endpoint that can call MCP tools
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
mcp-tasks
A comprehensive and efficient MCP server for task management with multi-format support (Markdown, JSON, YAML)
unity-api
Instant, accurate Unity API lookups instead of expensive source file reads, saving your agent tokens, context, and hallucinations
mcp-claude-spotify
An integration that allows Claude Desktop to interact with Spotify using the Model Context Protocol (MCP).
mcp -amazon
ππ¦ Unofficial Amazon Model Context Protocol Server (MCP) - Search products and purchase directly from Claude AI! β¨