Skip to main content

Module mcp

Module mcp 

Source
Expand description

MCP integration — adapters between oxios-mcp and the kernel.

Re-exports all types from the oxios-mcp crate and provides conversion functions between MCP-native types and Oxios kernel types (ToolDef).

Structs§

ClientInfo
Client info sent during initialize
InitializeParams
Initialize request params
InitializeResult
Initialize response from the server
MappedResource
Resource reference
McpBridge
MCP bridge — connects multiple MCP servers to the tool system.
McpCapabilities
MCP server capabilities
McpClient
Manages a single MCP server process with stdio JSON-RPC communication.
McpError
MCP JSON-RPC error structure
McpRequest
MCP JSON-RPC request structure
McpResponse
MCP JSON-RPC response structure
McpServer
MCP server capability definition
McpTool
MCP tool definition from a server
McpToolCallResult
MCP tools/call result
McpToolsResult
MCP tools/list result
ServerInfo
Server info from initialize response

Enums§

McpContentBlock
Content block in a tool call result

Constants§

BLOCKED_MCP_SHELLS
Shell interpreters that must never be spawned directly as an MCP server — they would allow args = ["-c", "<arbitrary>"] code

Functions§

cached_tool_defs
Get cached MCP tools as Oxios ToolDefs for a specific server.
list_tool_defs
List all MCP tools as Oxios ToolDefs (existing API compatibility).
mcp_tool_to_tool_def
Convert an MCP tool to an Oxios ToolDef.
refresh_tool_defs
Refresh and return MCP tools as Oxios ToolDefs for a specific server.
sanitize_env
Return a copy of env with security-sensitive variables removed.
validate_mcp_command
Validate an MCP server command before spawning it.

Type Aliases§

McpServerConfig
Type alias for backwards compatibility — use McpServer directly.