
zcaceres/easy-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
zcaceres/easy-mcp는 https://github.com/zcaceres/easy-mcp.에서 가져온 MCP 서버 후보입니다.
개요
zcaceres/easy-mcp는 https://github.com/zcaceres/easy-mcp.에서 가져온 MCP 서버 후보입니다.
개요(AI 번역)
EasyMCP는 베타 버전이지만 사용할 수 있습니다. 문제가 발생하면 꼭 신고해 주세요.
EasyMCP는 TypeScript에서 모델 컨텍스트 프로토콜(MCP) 서버를 생성하는 가장 간단한 방법입니다.
배관, 형식 및 기타 표준 정의를 단순한 선언 뒤에 숨깁니다.
Easy MCP는 시작하는 데 필요한 최소한의 것만 정의할 수 있게 해줍니다. 또는 더 복잡한 리소스, 템플릿, 도구, 프롬프트를 정의할 수도 있습니다.
특징
- 간단한 Express와 유사한 API: EasyMCP는 고수준이고 직관적인 API를 제공합니다. ExpressJS에서 엔드포인트를 정의하는 것과 유사한 호출로 도구, 프롬프트, 리소스, 리소스, 리소스 템플릿, 루트를 정의하세요. 선택 가능한 모든 매개변수는 선택 사항이며 필요하지 않으면 숨겨져 있습니다.
- 실험 장식 API: 도구, 프롬프트, 리소스 인자를 자동으로 추론합니다. 입력 스키마 정의가 필요하지 않습니다!
- 컨텍스트 객체: 도구 내 컨텍스트 객체를 통해 로깅 및 진행 상황 보고와 같은 MCP 기능에 접근할 수 있습니다.
- 우수한 타입 안전: 더 나은 DX와 적은 실행 시간 오류.
베타 제한 사항
- MCP 샘플링에 대한 지원은 아직 없습니다
- 아직 SSE 지원 없음
- 아직 자원 업데이트 알림은 없습니다
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
easy-mcp
EasyMCP is usable but in beta. Please report any issues you encounter.
EasyMCP is the simplest way to create Model Context Protocol (MCP) servers in TypeScript.
It hides the plumbing, formatting, and other boilerplate definitions behind simple declarations.
Easy MCP allows you to define the bare minimum of what you need to get started. Or you can define more complex resources, templates, tools, and prompts.
Features
- Simple Express-like API: EasyMCP provides a high-level, intuitive API. Define Tools, Prompts, Resources, Resource Templates, and Roots with calls similar to defining endpoints in ExpressJS. Every possible parameter that could be optional is optional and hidden unless you need it.
- Experimental Decorators API: Automagically infers tool, prompt, and resource arguments. No input schema definition required!
- Context Object: Access MCP capabilities like logging and progress reporting through a context object in your tools.
- Great Type Safety: Better DX and fewer runtime errors.
Beta Limitations
- No support for MCP sampling, yet
- No support for SSE, yet
- No resource update notifications, yet
- Prompts technically accept inputs, but the Typescript SDK suggests they can’t. So this functionality feels unfinished.
Installation
To install EasyMCP, run the following command in your project directory:
bun install
Quick Start with (Experimental) Decorators API
Also see examples/express-decorators.ts or run bun start:decorators
EasyMCP’s decorator API is dead simple and infers types and input configuration automatically.
But it’s experimental and may change or have not-yet-discovered problems.
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" });
Complex Example with Decorators API
See examples/express-express.ts or run 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.
*/
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →