Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.praison.ai/llms.txt

Use this file to discover all available pages before exploring further.

MCPServer

Defined in the MCP module.
Rust AI Agent SDK MCP server for exposing tools.

Fields

NameTypeDescription
nameStringServer name
toolsVec<MCPTool>Registered tools
resourcesVec<MCPResource>Registered resources
runningboolRunning status

Methods

new

fn new(name: impl Into<String>) -> Self
Create a new MCP server Parameters:
NameType
nameimpl Into&lt;String&gt;

register_tool

fn register_tool(&mut self, tool: MCPTool) -> ()
Register a tool Parameters:
NameType
toolMCPTool

register_resource

fn register_resource(&mut self, resource: MCPResource) -> ()
Register a resource Parameters:
NameType
resourceMCPResource

tools

fn tools(&self) -> &[MCPTool]
Get registered tools

resources

fn resources(&self) -> &[MCPResource]
Get registered resources

is_running

fn is_running(&self) -> bool
Check if running

start

async fn start(&mut self) -> Result<()>
Start the server (placeholder)

stop

async fn stop(&mut self) -> Result<()>
Stop the server

Source

View on GitHub

praisonai/src/mcp/mod.rs at line 605

Rust MCP

Rust Resources