Expand description
MCP server library for progressive loading generation.
This crate provides an MCP server that helps generate progressive loading TypeScript files for other MCP servers. It leverages Claude’s natural language understanding for tool categorization - no separate LLM API needed.
§Architecture
The server implements three main tools:
introspect_server- Connect to a target MCP server and discover its toolssave_categorized_tools- Generate TypeScript files with Claude’s categorizationlist_generated_servers- List all servers with generated files
§Workflow
- User asks Claude to generate progressive loading for an MCP server
- Claude calls
introspect_serverto discover tools - Claude analyzes tool metadata and assigns categories, keywords, descriptions
- Claude calls
save_categorized_toolswith categorization - Server generates TypeScript files with discovery headers
§Examples
use mcp_execution_server::service::GeneratorService;
use rmcp::transport::stdio;
use rmcp::ServiceExt;
// Create and run the service
let service = GeneratorService::new().serve(stdio()).await?;
service.waiting().await?;§State Management
The server maintains temporary session state between introspect_server and
save_categorized_tools calls. Sessions expire after 30 minutes and are
cleaned up lazily.
§Key Benefits
- No LLM API: Claude (the conversation LLM) does categorization
- Human-in-the-loop: User can review and adjust categories
- Progressive loading: 98% token savings (30,000 → 500-1,500 tokens)
- Type-safe: Full TypeScript types from MCP schemas
- Discoverable: grep-friendly headers for tool discovery
Re-exports§
pub use service::GeneratorService;pub use state::StateManager;pub use types::CategorizedTool;pub use types::GeneratedServerInfo;pub use types::IntrospectServerParams;pub use types::IntrospectServerResult;pub use types::ListGeneratedServersParams;pub use types::ListGeneratedServersResult;pub use types::PendingGeneration;pub use types::SaveCategorizedToolsParams;pub use types::SaveCategorizedToolsResult;pub use types::ToolGenerationError;pub use types::ToolMetadata;
Modules§
- service
- MCP server implementation for progressive loading generation.
- state
- State management for pending generation sessions.
- types
- Type definitions for MCP server tools.
Structs§
- Generate
Skill Params - Parameters for generating a skill.
- Generate
Skill Result - Result from
generate_skilltool. - Save
Skill Params - Parameters for saving a skill.
- Save
Skill Result - Result from saving a skill.
- Skill
Category - A category of tools for the skill.
- Skill
Metadata - Metadata extracted from saved skill.
- Skill
Tool - Tool information for skill generation.
- Tool
Example - Example tool usage for documentation.