Skip to main content

mcp

Rust AI Agent SDK MCP (Model Context Protocol) Integration Module This module provides MCP integration for agents:
  • MCP - Main MCP client
  • MCPConfig - Configuration for MCP connections
  • MCPCall - MCP tool call
  • MCPServer - MCP server for exposing tools

Example

use praisonai::mcp::{MCP, MCPConfig};

let mcp = MCP::new()
.server("npx", &["-y", "@anthropic/mcp-server-memory"])
.build()?;

let tools = mcp.list_tools().await?;

Import

use praisonai::mcp::*;

Classes

TransportConfig

Transport configuration for MCP.

SecurityConfig

Security configuration for MCP.

MCPConfig

Configuration for MCP client.

MCPTool

An MCP tool definition.

MCPCall

An MCP tool call request.

MCPCallResult

Result of an MCP tool call.

MCPResource

An MCP resource.

MCPPrompt

An MCP prompt template.

MCPPromptArgument

An MCP prompt argument.

MCP

Main MCP client.

MCPBuilder

Builder for MCP

MCPServer

MCP server for exposing tools.

TransportType

Transport type for MCP connections.

MCPContent

MCP content types.

ConnectionStatus

Connection status for MCP.

Rust MCP

Rust Resources