MCP Server Template

local-only server

The server can only run on the client’s local machine because it depends on local resources.

MCP 서버 템플릿 🛠️

자체 모델 컨텍스트 프로토콜(MCP) 서버를 구축하기 위한 시작 템플릿입니다. 이 템플릿은 Cursor 또는 Claude Desktop과 함께 사용할 수 있는 사용자 지정 MCP를 만드는 데 필요한 기본 구조와 설정을 제공합니다.

특징

  • TypeScript를 사용한 기본 MCP 서버 설정
  • 샘플 도구 구현
  • 바로 사용 가능한 프로젝트 구조
  • @modelcontextprotocol/sdk 로 빌드됨

프로젝트 구조

지엑스피1

시작하기

  1. 이 템플릿을 복제하세요:
git clone [your-repo-url] my-mcp-server cd my-mcp-server
  1. 종속성 설치:
pnpm install
  1. 프로젝트를 빌드하세요:
pnpm run build

이렇게 하면 /build/index.js 파일, 즉 컴파일된 MCP 서버 스크립트가 생성됩니다.

커서와 함께 사용

  1. 커서 설정 -> MCP -> 새 MCP 서버 추가로 이동하세요.
  2. MCP를 구성하세요:
    • 이름: [본인의 이름을 선택하세요]
    • 유형: 명령
    • 명령어: node ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js

Claude Desktop과 함께 사용

다음 MCP 구성을 Claude Desktop 구성에 추가하세요.

{ "mcpServers": { "your-mcp-name": { "command": "node", "args": ["ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js"] } } }

개발

템플릿에는 index.ts 에 샘플 도구 구현이 포함되어 있습니다. 나만의 MCP를 만들려면 다음을 수행하세요.

  1. index.ts 에서 서버 구성을 수정하세요:
const server = new McpServer({ name: "your-mcp-name", version: "0.0.1", });
  1. server.tool() 메서드를 사용하여 사용자 정의 도구를 정의합니다.
server.tool( "your-tool-name", "Your tool description", { // Define your tool's parameters using Zod schema parameter: z.string().describe("Parameter description"), }, async ({ parameter }) => { // Implement your tool's logic here return { content: [ { type: "text", text: "Your tool's response", }, ], }; } );
  1. 구현을 빌드하고 테스트하세요.
npm run build

기여하다

문제점과 개선 요청을 자유롭게 제출하세요!

특허

MIT

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

커서 또는 클로드 데스크톱과 통합할 수 있는 모델 컨텍스트 프로토콜 서버를 구축하기 위한 시작 템플릿으로, 개발자가 AI 어시스턴트를 위한 사용자 정의 도구와 확장 기능을 만들 수 있습니다.

  1. Features
    1. Project Structure
      1. Getting Started
        1. Using with Cursor
          1. Using with Claude Desktop
            1. Development
              1. Contributing
                1. License
                  ID: vnt96edg3a