
eas4ai/mcp_daemon
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Complete Rewrite and Re-Release of MCP Daemon under MIT license
概要
This crate provides a standards-compliant implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools. The Model Context Protocol (MCP) is a standardized protocol for communication between LLM applications and external systems. It allows LLM applications to access external data sources, tools, and services in a consistent and standardized way. This implementation includes both client and server components, along with the necessary schema definitions and utilities for working with the protocol. - : Connect to MCP servers and access their resources and tools - : Create an MCP server to expose resources and tools to LLM applications - : Complete schema definitions for the MCP protocol (03.26.2025) - : Comprehensive error handling for all protocol operations - : Built on top of the async ecosystem for efficient operation The full API documentation is available at docs.rs/mcp_daemon.
README
以下は原文 README の抜粋です。原文を見る。
MCP Daemon: A Rust implementation of the Model Context Protocol (MCP)
This crate provides a standards-compliant implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
Overview
The Model Context Protocol (MCP) is a standardized protocol for communication between LLM applications and external systems. It allows LLM applications to access external data sources, tools, and services in a consistent and standardized way.
This implementation includes both client and server components, along with the necessary schema definitions and utilities for working with the protocol.
Features
- Client Implementation: Connect to MCP servers and access their resources and tools
- Server Implementation: Create an MCP server to expose resources and tools to LLM applications
- Schema Definitions: Complete schema definitions for the MCP protocol (03.26.2025)
- Error Handling: Comprehensive error handling for all protocol operations
- Async Support: Built on top of the async ecosystem for efficient operation
Installation
Add this to your Cargo.toml:
[dependencies]
mcp_daemon = "0.3.0"
OR
Run cargo add mcp_daemon
Usage
Client Example
use mcp_daemon::client::Client;
use mcp_daemon::schema::*;
use std::sync::Arc;
#[tokio::main]
async fn main() -> Result> {
// Create a client
let client = Client::new("http://localhost:8080");
// Initialize the client
let init_result = client.initialize().await?;
println!("Connected to server: {}", init_result.server_info.name);
// List available tools
let tools = client.tools_list(ListToolsRequestParams::default()).await?;
println!("Available tools: {}", tools.tools.len());
Ok(())
}
Server Example
use mcp_daemon::server::{Server, DefaultServer};
use mcp_daemon::schema::*;
use std::sync::Arc;
struct MyServer;
impl Server for MyServer {
// Implement required methods
// ...
}
#[tokio::main]
async fn main() -> Result> {
// Create a server
let server = Arc::new(MyServer);
// Start the server
let addr = "127.0.0.1:8080";
println!("Starting server on {}", addr);
// server.listen(addr).await?;
Ok(())
}
Documentation
The full API documentation is available at docs.rs/mcp_daemon.
You can also build the documentation locally:
cargo doc --open
Key Modules
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →