ciallo-mcp

    Zero-extra-code Model Context Protocol (MCP) Server and LLM Function Calling JSON Schema adapter over unmbt/ciallo routes

    mcp
    ai
    llm
    tool-calling
    json-rpc
    ciallo
    Download zip
    Author
    Version
    0.1.1
    License
    MIT
    Last updated
    13 hours ago
    Downloads
    8

    #unmbt/ciallo-mcp

    Zero-extra-code Model Context Protocol (MCP) Server & LLM Tool Calling exporter for unmbt/ciallo. Reads your App's OpenApiDocument (operation_id, SchemaNode, summary) and executes tools/call through app.fetch(...), reusing the full 9-stage lifecycle, Schema validation, RBAC guards, and RFC 9457 error contracts.

    McpFilter

    pub(all) struct McpFilter {
    prefix : String?
    tags : Array[String]
    exclude_paths : Array[String]
    } derive(Eq,
    Debug
    )

    McpFilter::McpFilter

    fn McpFilter::McpFilter(prefix? : String, tags? : Array[String], exclude_paths? : Array[String]) -> McpFilter

    McpServer

    pub struct McpServer {
    app :
    App

    info :
    OpenApiInfo

    protocol_version : String
    tools : Array[McpTool]
    tool_index : Map[String, McpTool]
    }

    Zero-extra-code Model Context Protocol (MCP) Server wrapping a @core.App. Every tools/call executes through app.fetch(...) so the full 9-stage pipeline, Schema validation, RBAC guards, and RFC 9457 error contracts apply identically.

    McpServer::from_app

    McpServer::handle_jsonrpc

    Handles a single MCP JSON-RPC 2.0 message (initialize, ping, tools/list, tools/call). Returns None for JSON-RPC notifications (no id).

    McpServer::mount_http

    Mounts this MCP server onto an HTTP App as a Streamable HTTP JSON-RPC endpoint (default POST /mcp).

    McpServer::tools

    fn McpServer::tools(self : McpServer) -> Array[McpTool]

    McpTool

    pub(all) struct McpTool {
    name : String
    description : String
    input_schema :
    Json

    meth :
    Method

    path : String
    param_names : Array[String]
    query_names : Array[String]
    body_is_wrapped : Bool
    body_fields : Array[String]
    bearer_auth : Bool
    } derive(Eq,
    Debug
    )

    McpTool::to_anthropic_tool_json

    fn McpTool::to_anthropic_tool_json(self : McpTool) ->
    Json

    McpTool::to_mcp_json

    McpTool::to_openai_function_json

    fn McpTool::to_openai_function_json(self : McpTool) ->
    Json

    export_anthropic_tools

    Exports Anthropic-compatible Tool Calling JSON Schema array.

    export_mcp_tools

    Exports MCP tools directly from a ciallo OpenApiDocument.

    export_openai_tools

    Exports OpenAI-compatible Function Calling JSON Schema array.