
linux-china/mcp-rs-template
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
linux-china/mcp-rs-template는 MCP 서버 후보가 https://github.com/linux-china/mcp-rs-template.에서 가져온 것입니다
개요
linux-china/mcp-rs-template는 MCP 서버 후보가 https://github.com/linux-china/mcp-rs-template.에서 가져온 것입니다
개요(AI 번역)
MCP Rust CLI 서버 템플릿
Model Context Protocol (MCP)는 LLM 애플리케이션 간의 원활한 통합을 가능하게 하는 개방형 프로토콜입니다. 외부 데이터 소스 및 도구. AI-powered IDE 구축 여부, 채팅 인터페이스를 강화, 또는 사용자 정의 AI 워크플로우를 만들려면 MCP가 필요한 컨텍스트와 LLM을 연결하는 표준화된 방법을 제공합니다.
mcp-rs-template은 Rust에서 MCP CLI 서버를 구현하는 방법을 보여주는 간단한 응용 템플릿입니다.
템플릿을 사용하는 방법?
- 저장소를 복제
Cargo.toml및src/mcp/mod.rs에서 프로젝트 정보를 수정- 서버 핸들러를 수정하십시오:
src/mcp/prompts.rs: 퀵 핸들러src/mcp/resources.rs: 자원 핸들러src/mcp/tools.rs: 도구 핸들러
src/mcp/templates/*.json] 프롬프트, 리소스 및 도구에 대한 json 파일을 사용하려면
mcp-rs-template은 JSON-RPC 라우팅의 녹-rpc-router를 기반으로 합니다. Rust를 위한 도서관.
CLI 옵션
--mcp: MCP 서버 활성화--resources: 디스플레이 리소스--prompts: 디스플레이 프롬프트--tools: 디스플레이 도구
Claude 데스크톱에서 MCP CLI 서버를 사용하는 방법?
- `claude desktop config 수정.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
MCP Rust CLI server template
Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you’re building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.
mcp-rs-template is a simple application template that demonstrates how to implement MCP CLI server in Rust.
How to use template?
- Clone the repository
- Modify project information in
Cargo.tomlandsrc/mcp/mod.rs - Modify server handlers:
src/mcp/prompts.rs: prompts handlerssrc/mcp/resources.rs: resources handlerssrc/mcp/tools.rs: tools handlers
- Modify
src/mcp/templates/*.jsonif you prefer to use json files for prompts, resources, and tools
mcp-rs-template is based on rust-rpc-router, a JSON-RPC routing library for Rust.
CLI options
--mcp: Enable MCP server--resources: display resources--prompts: display prompts--tools: display tools
How to use MCP CLI server in Claude Desktop?
- Edit
claude_desktop_config.json: Claude Desktop ->Settings->Developer->Edit Config - Add the following configuration to the
serverssection:
{
"mcpServers": {
"current-time": {
"command": "mcp-rs-template",
"args": [
"--mcp"
],
"env": {
"API_KEY": "xxxx"
}
}
}
}
If you want to check MCP log, please use tail -n 20 -f ~/Library/Logs/Claude/mcp*.log.
References
- MCP Specification: https://spec.modelcontextprotocol.io/
- Model Context Protocol (MCP): https://modelcontextprotocol.io/introduction
- rpc-router: json-rpc routing library - https://github.com/jeremychone/rust-rpc-router/
- Zed context_server: https://github.com/zed-industries/zed/tree/main/crates/context_server
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"current-time": {
"command": "mcp-rs-template",
"args": [
"--mcp"
],
"env": {
"API_KEY": "xxxx"
}
}
}
}