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
| Name | Type | Description |
|---|
name | String | Server name |
tools | Vec<MCPTool> | Registered tools |
resources | Vec<MCPResource> | Registered resources |
running | bool | Running status |
Methods
new
fn new(name: impl Into<String>) -> Self
Create a new MCP server
Parameters:
| Name | Type |
|---|
name | impl Into<String> |
fn register_tool(&mut self, tool: MCPTool) -> ()
Register a tool
Parameters:
register_resource
fn register_resource(&mut self, resource: MCPResource) -> ()
Register a resource
Parameters:
| Name | Type |
|---|
resource | MCPResource |
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