Confidential guide on numerology and astrology, based of GG33 Public information

MCP-Rust-Sdk
SDK Rust pour le protocole de contexte du modèle (MCP)
3 years
Works with Finder
4
Github Watches
14
Github Forks
124
Github Stars
Model Context Protocol (MCP) Rust SDK
⚠️ Warning: This SDK is currently a work in progress and is not ready for production use.
A Rust implementation of the Model Context Protocol (MCP), designed for seamless communication between AI models and their runtime environments.
Features
- 🚀 Full implementation of MCP protocol specification
- 🔄 Multiple transport layers (WebSocket, stdio)
- ⚡ Async/await support using Tokio
- 🛡️ Type-safe message handling
- 🔍 Comprehensive error handling
- 📦 Zero-copy serialization/deserialization
Installation
Add this to your Cargo.toml
:
[dependencies]
mcp_rust_sdk = "0.1.0"
Quick Start
Client Example
use mcp_rust_sdk::{Client, transport::WebSocketTransport};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a WebSocket transport
let transport = WebSocketTransport::new("ws://localhost:8080").await?;
// Create and connect the client
let client = Client::new(transport);
client.connect().await?;
// Make requests
let response = client.request("method_name", Some(params)).await?;
Ok(())
}
Server Example
use mcp_rust_sdk::{Server, transport::StdioTransport};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a stdio transport
let (transport, _) = StdioTransport::new();
// Create and start the server
let server = Server::new(transport);
server.start().await?;
Ok(())
}
Transport Layers
The SDK supports multiple transport layers:
WebSocket Transport
- Ideal for network-based communication
- Supports both secure (WSS) and standard (WS) connections
- Built-in reconnection handling
stdio Transport
- Perfect for local process communication
- Lightweight and efficient
- Great for command-line tools and local development
Error Handling
The SDK provides comprehensive error handling through the Error
type:
use mcp_rust_sdk::Error;
match result {
Ok(value) => println!("Success: {:?}", value),
Err(Error::Protocol(code, msg)) => println!("Protocol error {}: {}", code, msg),
Err(Error::Transport(e)) => println!("Transport error: {}", e),
Err(e) => println!("Other error: {}", e),
}
License
This project is licensed under the MIT License - see the LICENSE file for details.
相关推荐
Advanced software engineer GPT that excels through nailing the basics.
I find academic articles and books for research and literature reviews.
Take an adjectivised noun, and create images making it progressively more adjective!
Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.
Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.
Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX
La communauté du curseur et de la planche à voile, recherchez des règles et des MCP
MCP Server pour récupérer le contenu de la page Web à l'aide du navigateur sans tête du dramwright.
Un puissant plugin Neovim pour gérer les serveurs MCP (Protocole de contexte modèle)
Pont entre les serveurs Olllama et MCP, permettant aux LLM locaux d'utiliser des outils de protocole de contexte de modèle
🔥 1Panel fournit une interface Web intuitive et un serveur MCP pour gérer des sites Web, des fichiers, des conteneurs, des bases de données et des LLM sur un serveur Linux.
L'application tout-en-un desktop et Docker AI avec chiffon intégré, agents AI, constructeur d'agent sans code, compatibilité MCP, etc.
Reviews

user_IAkHrdkO
As a dedicated user of the mcp-rust-sdk, I can confidently say it's a must-have for developers working with Rust. Derek-X-Wang has done a fantastic job with this SDK, providing a seamless and efficient way to integrate MCP functionalities. The clear documentation and ease of use make it a top choice for any project. Check it out at https://github.com/Derek-X-Wang/mcp-rust-sdk - you won't be disappointed!