mcp-server-template
mcp-server-template
코딩 에이전트가 실제로 잘 사용할 수 있는 읽기 전용 MCP 서버를 구축하기 위한 주관적인 템플릿: 타임아웃이 있는 I/O 경계, 오프라인 테스트, 간결한 텍스트 출력, 최소 권한 문서.
여기서 시작하세요 → BUILDING.md — 아이디어에서 서버 배포까지의 전체 워크플로우(약 반나절).
내용: 작동하는 예제 서버(pypi_project 고정 출처 HTTP 도구 + 스텁된 경계 뒤의 word_stats 순수 도구), 오프라인 테스트 스위트, CI 워크플로우, CLAUDE.md 규칙, 아래의 README 스켈레톤.
네트워크 예제는 의도적으로 임의의 URL을 허용하지 않습니다. "읽기 전용"이 URL 페처를 안전하게 만들지는 않습니다: 제한 없는 대상과 리디렉션 추적은 루프백, 사설 네트워크 또는 클라우드 메타데이터 서비스를 노출할 수 있습니다. pypi_project는 https://pypi.org/... 요청만 구성하고, URL/경로 형태의 입력을 거부하며, 리디렉션을 추적하지 않고, 디코딩된 응답을 2 MiB로 제한하며, 15초의 전체 작업 마감 시간을 적용합니다.
서버용 README 스켈레톤 (이 전체 파일을 교체하세요)
# mcp-<name>+ 한 줄 가치 제안 (굵게)4줄 사용 예시 (You: … / Agent: → 도구 호출 / Agent: 답변)
도구 표 (도구 → 반환 내용)
설치:
claude mcp add <name> -e TOKEN=... -- python -m mcp_<name>+.mcp.json블록토큰 범위 / 보안 (최소 권한, 읽기 전용 명시)
설계 노트 (왜 읽기 전용인지, 왜 간결한 텍스트인지, 왜 타임아웃인지)
라이선스 + 연락처 줄
위 구조를 그대로 사용하고, 파생 서버를 게시하기 전에 모든 템플릿 이름과 예제를 교체하세요.
Related MCP server: MCP Server Template
보안 및 개인정보 보호
예제는 제공된 패키지 이름만 PyPI로 보냅니다. 도구 인수에 비밀 또는 개인 식별자를 넣지 마세요.
PyPI 프로젝트 요약은 업로더가 제어하는 텍스트이므로, 예제는 에이전트가 볼 수 있는 출력에서 의도적으로 이를 생략합니다. 모든 외부 텍스트를 신뢰할 수 없는 데이터로 취급하세요.
자격 증명, 인증 헤더, 원시 개인 응답 또는 사용자 프롬프트를 절대 로그에 기록하지 마세요.
각 인수가 어떤 외부 서비스로 전송되는지 문서화하세요. 도구가 읽기만 하더라도 사설 CI 로그와 내부 URL은 민감합니다.
대상 허용 목록과 리디렉션이나 DNS 리바인딩으로 우회할 수 없는 전송을 구현하지 않는 한, 파생 서버에 임의 URL 가져오기를 포함하지 마세요.
개발
python -m pip install -e ".[dev]"
ruff check . && ruff format --check .
pytest
python -m buildMIT — LICENSE 참조.
This server cannot be deployed
Maintenance
Related MCP Connectors
Primarily to be used as a template repository for developing MCP servers with FastMCP in Python, P…
Public read-only MCP server for Genvernium product and developer resources.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA production-ready Python template for building MCP servers with enterprise features including registry integration, configuration management, structured logging, and extensible patterns for tools, resources, and prompts.MIT
- AlicenseAqualityNot gradedmaintenanceA production-ready TypeScript template for building MCP servers with dual transport support (stdio/HTTP), OAuth 2.1 foundations, SQLite caching, observability, and security features including PII sanitization and rate limiting.48 npm-
- AlicenseNot gradedqualityDmaintenanceA production-ready MCP server scaffold that features built-in authentication, Docker support, and a comprehensive CI/CD release pipeline. It provides a standardized template for deploying servers with multi-transport support and configurable read-only modes.MIT
- AlicenseNot gradedqualityDmaintenanceOpinionated template for building Node.js stdio and HTTP MCP servers.-