CPN 한국어 자습서 · 외부 문서 한국어 미러
MCP 문서 · Registry
Quickstart: Publish an MCP Server to the MCP Registry · 원문: modelcontextprotocol.io/registry/quickstart
아래는 원문을 한국어로 옮긴 미러입니다. 코드·명령은 원문 그대로이며, 가장 최신 정보는 하단 원문 링크에서 확인하세요.
참고: MCP 레지스트리는 현재 프리뷰 중입니다. 일반 제공 전에 호환성을 깨는 변경이나 데이터 초기화가 발생할 수 있습니다. 문제가 발생하면 GitHub에 보고해 주세요.
이 튜토리얼은 공식 mcp-publisher CLI 도구를 사용하여 TypeScript로 작성된 MCP 서버를 MCP 레지스트리에 게시하는 방법을 보여줍니다.
TypeScript로 작성된 MCP 서버가 없다면 다음 명령으로 예제를 복사하세요:
git clone --depth 1 git@github.com:modelcontextprotocol/quickstart-resources.git cp -r quickstart-resources/weather-server-typescript . rm -rf quickstart-resources cd weather-server-typescript
package.json을 편집합니다:
- "name": "mcp-quickstart-ts", - "version": "1.0.0", + "name": "@my-username/mcp-weather-server", + "version": "1.0.1",
"license": "ISC",
- "description": "",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/my-username/mcp-weather-server.git"
+ },
+ "description": "An MCP server for weather information.",
package.json에 mcpName 속성을 추가합니다:
"name": "@my-username/mcp-weather-server", "version": "1.0.1", + "mcpName": "io.github.my-username/weather",
GitHub 기반 인증을 사용하면 mcpName은 반드시 io.github.my-username/으로 시작해야 합니다.
배포 파일을 빌드합니다:
cd weather-server-typescript npm install npm run build
npm에 게시합니다:
npm adduser # 필요한 경우 npm 인증 npm publish --access public
mcp-publisher 설치# macOS/Linux
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher && sudo mv mcp-publisher /usr/local/bin/
# Windows
$arch = if ([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture -eq "Arm64") { "arm64" } else { "amd64" }; Invoke-WebRequest -Uri "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_windows_$arch.tar.gz" -OutFile "mcp-publisher.tar.gz"; tar xf mcp-publisher.tar.gz mcp-publisher.exe; rm mcp-publisher.tar.gz
# Homebrew
brew install mcp-publisher
설치 확인:
mcp-publisher --help
server.json 생성서버 프로젝트 디렉터리에서 mcp-publisher init 명령을 실행합니다:
mcp-publisher init
생성된 server.json 파일을 편집합니다:
- "version": "1.0.0",
+ "version": "1.0.1",
"packages": [
{
"registryType": "npm",
"identifier": "@my-username/mcp-weather-server",
- "version": "1.0.0",
+ "version": "1.0.1",
"transport": {
"type": "stdio"
- },
- "environmentVariables": [...]
+ }
}
]
server.json의 name 속성은 package.json의 mcpName 속성과 반드시 일치해야 합니다.
mcp-publisher login github
터미널에 출력된 코드를 입력하고 GitHub 기기 흐름을 통해 인가합니다.
mcp-publisher publish
서버가 게시되었는지 확인합니다:
curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.my-username/weather"
| 오류 메시지 | 조치 |
|---|---|
| "Registry validation failed for package" | package.json에 필요한 검증 정보(예: mcpName 속성)가 포함되어 있는지 확인합니다. |
| "Invalid or expired Registry JWT token" | mcp-publisher login github를 실행하여 재인증합니다. |
| "You do not have permission to publish this server" | GitHub 인증을 사용하면 서버 이름은 반드시 io.github.your-username/으로 시작해야 합니다. |
원문(영어): https://modelcontextprotocol.io/registry/quickstart · 본 문서는 학습용 한국어 번역이며 원본의 권리는 원저작자(Model Context Protocol)에게 있습니다.