Token导航 LogoToken导航

MCP Server · 开发工具

easy MCP

Absurdly easy Model Context Protocol Servers in Typescript

未说明官方级别未说明来源级核验工具 5
TypeScript资源管理开发工具

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
zcaceres
提供方
zcaceres

工具数量

5

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

184

仓库热度

收录来源

3 个

MCP.so

选型结论

easy MCP 属于开发工具类 MCP Server,公开资料标注 5 个工具,通过传输方式未标注接入,客户端适配情况以官方文档为准,没有现成的安装命令;接入前先确认权限范围。

分类

开发工具

传输方式

未说明

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 5 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

公开资料仍需确认:安装命令

详细介绍

简易mcp

EasyMCP可用,但处于测试阶段。请报告您遇到的任何问题。

EasyMCP是在TypeScript中创建模型上下文协议(MCP)服务器的最简单方法。

它将管道、格式和其他样板定义隐藏在简单的声明后面。

Easy MCP允许您定义入门所需的最低限度。或者,您可以定义更复杂的资源、模板、工具和提示。

特性

  • 类似简单表达式的API:EasyMCP提供了一个高级、直观的API。使用类似于在ExpressJS中定义端点的调用来定义工具、提示、资源、资源模板和根。每个可能是可选的参数都是可选的,除非你需要,否则都是隐藏的。
  • 实验装饰师API:自动推断工具、提示和资源参数。不需要输入架构定义!
  • 上下文对象:通过工具中的上下文对象访问MCP功能,如日志记录和进度报告。
  • 出色的类型安全性:更好的DX和更少的运行时错误。

Beta限制

  • 尚不支持MCP采样
  • 尚未支持SSE
  • 尚未收到资源更新通知
  • 提示在技术上接受输入,但Typescript SDK建议他们不能。因此,这个功能感觉还没有完成。

安装

要安装EasyMCP,请在项目目录中运行以下命令:

bun install

快速入门(实验)装饰API

另请参阅 examples/express-decorators.ts 或奔跑 bun start:decorators

EasyMCP的decorator API非常简单,可以自动推断类型和输入配置。

但它是 *实验性的* 并且可能改变或尚未发现问题。

import EasyMCP from "./lib/EasyMCP";
import { Tool, Resource, Prompt } from "./lib/experimental/decorators";

class MyMCP extends EasyMCP {

  @Resource("greeting/{name}")
  getGreeting(name: string) {
    return `Hello, ${name}!`;
  }

  @Prompt()
  greetingPrompt(name: string) {
    return `Generate a greeting for ${name}.`;
  }

  @Tool()
  greet(name: string, optionalContextFromServer: Context) {
    optionalContextFromServer.info(`Greeting ${name}`);
    return `Hello, ${name}!`;
  }
}

const mcp = new MyMCP({ version: "1.0.0" });

装饰器API的复杂示例

看 examples/express-express.ts 或奔跑 bun start:express

import EasyMCP from "./lib/EasyMCP";
import { Prompt } from "./lib/decorators/Prompt";
import { Resource } from "./lib/decorators/Resource";
import { Root } from "./lib/decorators/Root";
import { Tool } from "./lib/decorators/Tool";

@Root("/my-sample-dir/photos")
@Root("/my-root-dir", { name: "My laptop's root directory" }) // Optionally you can name the root
class ZachsMCP extends EasyMCP {
  /**
  You can declare a Tool with zero configuration. Relevant types and plumbing will be inferred and handled.

  By default, the name of the Tool will be the name of the method.
  */
  @Tool()
  simpleFunc(nickname: string, height: number) {
    return `${nickname} of ${height} height`;
  }

  /**
   * You can enhance a tool with optional data like a description.

   Due to limitations in Typescript, if you want the Tool to serialize certain inputs as optional to the Client, you need to provide an optionals list.
   */
  @Tool({
    description: "An optional description",
    optionals: ["active", "items", "age"],
  })
  middleFunc(name: string, active?: string, items?: string[], age?: number) {
    return `exampleFunc called: name ${name}, active ${active}, items ${items}, age ${age}`;
  }

  /**
   * You can also provide a schema for the input arguments of a tool, if you want full control.
   */
  @Tool({
    description: "A function with various parameter types",
    parameters: [
      {
        name: "date",
        type: "string",
        optional: false,
      },
      {
        name: "season",
        type: "string",
        optional: false,
      },
      {
        name: "year",
        type: "number",
        optional: true,
      },
    ],
  })
  complexTool(date: string, season: string, year?: number) {
    return `complexTool called: date ${date}, season ${season}, year ${year}`;
  }

  /**
  * Tools can use a context object to access MCP capabilities like logging, progress reporting, and meta data from the request
  */
  @Tool({
    description: "A tool that uses context",
  })
  async processData(dataSource: string, context: Context) {
    context.info(`Starting to process data from ${dataSource}`);

    try {
      const data = await context.readResource(dataSource);
      context.debug("Data loaded");

      for (let i = 0; i  setTimeout(resolve, 1000));
        await context.reportProgress(i * 20, 100);
        context.info(`Processing step ${i + 1} complete`);
      }

      return `Processed ${data.length} bytes of data from ${dataSource}`;
    } catch (error) {
      context.error(`Error processing data: ${(error as Error).message}`);
      throw error;
    }
  }

  /**
   * Resources can be declared with a simple URI.

   By default, the name of the resource will be the name of the method.
   */
  @Resource("simple-resource")
  simpleResource() {
    return "Hello, world!";
  }

  /**
   * Or include handlebars which EasyMCP will treat as a Resource Template.

   Both Resources and Resource Templates can be configured with optional data like a description.
   */
  @Resource("greeting/{name}")
  myResourceTemplate(name: string) {
    return `Hello, ${name}!`;
  }

  /**
   * By default, prompts need no configuration.

   They will be named after the method they decorate.
   */
  @Prompt()
  simplePrompt(name: string) {
    return `Prompting... ${name}`;
  }

  /**
   * Or you can override and configure a Prompt with a name, description, and explicit arguments.
   */
  @Prompt({
    name: "configured-prompt",
    description: "A prompt with a name and description",
    args: [
      {
        name: "name",
        description: "The name of the thing to prompt",
        required: true,
      },
    ],
  })
  configuredPrompt(name: string) {
    return `Prompting... ${name}`;
  }
}

const mcp = new ZachsMCP({ version: "1.0.0" });
console.log(mcp.name, "is now serving!");

使用Express-like API快速入门

另请参阅 examples/example-minimal.ts 或奔跑 bun start:express

这个API更详细,也不那么神奇,但它更稳定,更经过测试。

import EasyMCP from "easy-mcp";

const mcp = EasyMCP.create("my-mcp-server", {
  version: "0.1.0",
});

// Define a resource
mcp.resource({
  uri: "dir://desktop",
  name: "Desktop Directory", // Optional
  description: "Lists files on the desktop", // Optional
  mimeType: "text/plain", // Optional
  fn: async () => {
    return "file://desktop/file1.txt\nfile://desktop/file2.txt";
  },
});

// Define a resource template
mcp.template({
  uriTemplate: "file://{filename}",
  name: "File Template", // Optional
  description: "Template for accessing files", // Optional
  mimeType: "text/plain", // Optional
  fn: async ({ filename }) => {
    return `Contents of ${filename}`;
  },
});

// Define a tool
mcp.tool({
  name: "greet",
  description: "Greets a person", // Optional
  inputs: [ // Optional
    {
      name: "name",
      type: "string",
      description: "The name to greet",
      required: true,
    },
  ],
  fn: async ({ name }) => {
    return `Hello, ${name}!`;
  },
});

// Define a prompt
mcp.prompt({
  name: "introduction",
  description: "Generates an introduction", // Optional
  args: [ // Optional
    {
      name: "name",
      type: "string",
      description: "Your name",
      required: true,
    },
  ],
  fn: async ({ name }) => {
    return `Hi there! My name is ${name}. It's nice to meet you!`;
  },
});

// Start the server
mcp.serve().catch(console.error);

类似Express-Like API

EasyMCP.create(name: string, options: ServerOptions)

创建新的EasyMCP实例。

  • name:您的MCP服务器的名称。
  • options:服务器选项,包括版本。

mcp.resource(config: ResourceConfig)

定义资源。

mcp.template(config: ResourceTemplateConfig)

定义资源模板。

mcp.tool(config: ToolConfig)

定义工具。

mcp.prompt(config: PromptConfig)

定义提示。

mcp.root(config: Root)

定义根。

mcp.serve()

启动MCP服务器。

(实验)装饰师API

EasyMCP提供了一种更简洁和声明性的方式来定义MCP服务器组件的装饰器。以下是可用装饰器的概述:

@Tool(config?: ToolConfig)

将方法定义为工具。该方法将接受您声明的任何参数,并根据TS注释推断类型和输入配置。可选 context 参数可以添加为访问MCP功能的最后一个参数。

  • config:工具的可选配置对象。

- description:工具的可选描述。 - optionals:应标记为可选的参数名称的可选数组。 - parameters:用于完全控制输入架构的可选参数定义数组。

例子:

@Tool({
  description: "Greets a person",
  optionals: ["title"],
})
greet(name: string, title?: string, optionalContext: Context) {
  return `Hello, ${title ? title + " " : ""}${name}!`;
}

@Resource(uri: string, config?: Partial)

将方法定义为资源或资源模板。资源模板是通过在URI中使用handlebars来定义的。

  • uri:资源的URI或URI模板。
  • config:资源的可选配置对象。

- name:资源的可选名称。 - description:资源的可选描述。 - mimeType:资源的可选MIME类型。

例子:

@Resource("greeting/{name}")
getGreeting(name: string) {
  return `Hello, ${name}!`;
}

@Prompt(config?: PromptDefinition)

将方法定义为提示。

  • config:提示的可选配置对象。

- name:提示的可选名称(默认为方法名)。 - description:提示的可选描述。 - args:参数定义的可选数组。

例子:

@Prompt({
  description: "Generates a greeting prompt",
  args: [
    { name: "name", description: "Name to greet", required: true },
  ],
})
greetingPrompt(name: string) {
  return `Generate a friendly greeting for ${name}.`;
}

@Root(uri: string, config?: { name?: string })

定义MCP服务器的根目录。这个装饰器应用于类,而不是方法。

  • uri:根目录的URI。
  • config:可选配置对象。

- name:根的可选名称。

例子:

@Root("/my-sample-dir/photos")
@Root("/my-root-dir", { name: "My laptop's root directory" })
class MyMCP extends EasyMCP {
  // ...
}
使用装饰器时,EasyMCP将自动推断类型,并为您的工具、资源、提示和根创建适当的配置。这可以显著减少样板代码,使您的MCP服务器定义更加简洁。

但是。..装饰器API是实验性的,可能会有错误或意外的更改

贡献

欢迎投稿!只需提交一份PR。

许可证

该项目根据MIT许可证获得许可。

鸣谢

工具与能力

工具数量

5

资源数量

0

提示词数量

0

能力标签

developer-toolsnodejsopen-sourcetypescriptaimcpMCP服务器本地部署

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 只提供 5 个工具,职责集中,接入后不容易误操作。
  • 3 个目录同时收录,信息可以交叉核对。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 公开摘要偏短,具体能力和限制要回到仓库确认。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
easy MCP

MCP.so · 本页

5未说明未标注3 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

easy MCP 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

easy MCP 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

easy MCP 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

easy MCP 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

easy MCP 支持哪些客户端?

公开资料没有标注具体客户端;能配置本地 MCP 命令的客户端都能接,配置方式参照官方文档。

来源信息

继续浏览同类 MCP