praxis-mcp
Model Context Protocol (MCP) client for AI agent tool execution.
Overview
This crate provides a high-level interface for connecting to MCP servers and executing tools within AI agent workflows.
Features
- Connect to multiple MCP servers simultaneously
- Execute tools with structured arguments
- Full async/await support
- Error handling and timeouts
- Built on
rmcp(Rust MCP SDK)
Installation
[]
= "0.1"
Usage
Basic Tool Execution
use ;
// Create executor with multiple servers
let executor = new.await?;
// Execute tool
let result = executor.execute_tool.await?;
println!;
Multi-Server Setup
use ;
let executor = new.await?;
// Executor automatically routes to the correct server
let weather = executor.execute_tool.await?;
let search = executor.execute_tool.await?;
List Available Tools
let tools = executor.list_tools.await?;
for tool in tools
MCP Protocol
The Model Context Protocol (MCP) is a standard for connecting AI agents to external tools and data sources. This crate implements the client side of the protocol.
Key concepts:
- Server: Hosts one or more tools
- Tool: A function that can be called with structured arguments
- Resource: Data that can be read (future support)
Examples
See the examples/ directory for complete examples:
# Run the simple MCP agent example
Part of Praxis Framework
This crate is part of the Praxis AI Agent Framework:
- praxis-graph - React agent orchestrator
- praxis-llm - LLM client (OpenAI, Azure)
- praxis-types - Core types and event model
- praxis-persist - MongoDB persistence
License
MIT