
matthewdailey/mcp-starter
Productivity workflow이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Typescript mcp 서버의 시작 템플릿
개요
AI Assistant 도구를 구축하기위한 최소 ModelContextProtocol 서버 템플릿. 이 스타터는 Claude와 같은 AI 조수와 함께 사용할 수있는 MCP 도구를 만드는 기본 구조를 제공합니다. - 간단한 "hello world" 도구 예제 - TypeScript + esbuild 설정 - 개발 도구 사전 설정 1. claude.ai/download에서 Claude 데스크탑 앱 다운로드 및 설치 2. repo를 복제, 의존성을 설치하고 빌드 : 3. 이 MCP 서버를 사용하는 Claude를 구성하십시오. 이 프로젝트의 루트에서 첫 번째 MCP 서버인 경우: claude desktop config.json 에서 입력해야 합니다. 기존 MCP 서버가 있는 경우, 기존 설정에 mcp-starter 블록을 추가합니다. args는 /mcp-starter/dist/index.cjs의 경로입니다. 5. Claude의 인터페이스에서 사용할 수 있는 도구의 수를 가진 hammer 아이콘을 찾아서 서버가 실행되는 것을 확인합니다.
개요(AI 번역)
AI Assistant 도구를 구축하기위한 최소 ModelContextProtocol 서버 템플릿. 이 스타터는 Claude와 같은 AI 조수와 함께 사용할 수있는 MCP 도구를 만드는 기본 구조를 제공합니다.
특징
- 간단한 “hello world” 도구 예
- TypeScript + esbuild 설정
- 개발 도구 preconfigured
Claude와 빌드 및 실행 설정
-
claude.ai/download에서 Claude 데스크탑 앱 다운로드 및 설치
-
repo를 복제, 의존성을 설치하고 빌드 :
-
이 MCP 서버를 사용하는 Claude를 구성하십시오. 이 프로젝트의 루트에서 첫 번째 MCP 서버인 경우:
이것은 당신의 claude_desktop_config.json]에 있는 입장에서 결과야 합니다:
기존 MCP 서버가 있는 경우, 기존 설정에 mcp-starter 블록을 추가합니다. args]는 /mcp-starter/dist/index.cjs]의 경로입니다.
-
나머지 Claude 데스크탑.
-
Claude의 인터페이스에서 사용할 수 있는 도구의 수를 가진 hammer 아이콘을 찾아서 서버가 실행되는 것을 확인합니다.
-
이 모든 작업이라면 MCP 서버를 사용하여 개발할 수 있어야 합니다.
npm run dev] MCP 서버를 다시 시작할 때마다 Claude를 다시 시작합니다.
Inspector 개발
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
MCP Starter Server
A minimal ModelContextProtocol server template for building AI assistant tools. This starter provides a basic structure for creating MCP tools that can be used with AI assistants like Claude.
Features
- Simple “hello world” tool example
- TypeScript + esbuild setup
- Development tools preconfigured
Setup to build and run with Claude
-
Download and install Claude desktop app from claude.ai/download
-
Clone the repo, install dependencies and build:
npm install
npm run build
- Configure Claude to use this MCP server. If this is your first MCP server, in the root of this project run:
echo '{
"mcpServers": {
"mcp-starter": {
"command": "node",
"args": ["'$PWD'/dist/index.cjs"]
}
}
}' > ~/Library/Application\ Support/Claude/claude_desktop_config.json
This should result in an entry in your claude_desktop_config.json like:
"mcpServers": {
"mcp-starter": {
"command": "node",
"args": ["/Users/matt/code/mcp-starter/dist/index.cjs"]
}
}
If you have existing MCP servers, add the mcp-starter block to your existing config. It’s an important detail that the args is the path to /mcp-starter/dist/index.cjs.
-
Restart Claude Desktop.
-
Look for the hammer icon with the number of available tools in Claude’s interface to confirm the server is running.
-
If this is all working, you should be able to develop your MCP server using
npm run devand test it in Claude. You’ll need to restart Claude each time to restart the MCP server.
Developing with Inspector
For development and debugging purposes, you can use the MCP Inspector tool. The Inspector provides a visual interface for testing and monitoring MCP server interactions.
Visit the Inspector documentation for detailed setup instructions.
To test locally with Inspector:
npm run inspect
To build on file changes run:
npm run watch
Or run both the watcher and inspector:
npm run dev
Publishing
Once you’re ready to distribute your server, it’s simple!
-
Set up an NPM account.
-
Run
npm publish. This will publish a package using the project name inpackage.json -
Once published, others can install the server with a config entry like:
"mcpServers": {
"": {
"command": "npx",
"args": [""]
}
}
Available Tools
The server provides:
hello_tool: A simple example tool that takes a name parameter and returns a greeting
Creating New Tools
To add new tools:
- Define the tool schema in
index.ts - Add it to the tools array in the
ListToolsRequestSchemahandler - Add the implementation in the
CallToolRequestSchemahandler
See the hello_tool implementation as an example.
설치
npx <your-package-name>설정
echo '{
"mcpServers": {
"mcp-starter": {
"command": "node",
"args": ["'$PWD'/dist/index.cjs"]
}
}
}' > ~/Library/Application\ Support/Claude/claude_desktop_config.json