| Crates.io | mcp-execution-introspector |
| lib.rs | mcp-execution-introspector |
| version | 0.6.4 |
| created_at | 2026-01-04 00:19:02.012447+00 |
| updated_at | 2026-01-04 01:01:05.771867+00 |
| description | MCP server introspection and tool discovery using rmcp SDK |
| homepage | https://github.com/bug-ops/mcp-execution |
| repository | https://github.com/bug-ops/mcp-execution |
| max_upload_size | |
| id | 2021013 |
| size | 90,792 |
MCP server introspection using the official rmcp SDK.
[dependencies]
mcp-execution-introspector = "0.6"
Or with cargo-add:
cargo add mcp-execution-introspector
[!IMPORTANT] Requires Rust 1.89 or later.
use mcp_execution_introspector::Introspector;
use mcp_execution_core::{ServerId, ServerConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut introspector = Introspector::new();
let server_id = ServerId::new("github");
let config = ServerConfig::builder()
.command("npx".to_string())
.arg("-y".to_string())
.arg("@modelcontextprotocol/server-github".to_string())
.env("GITHUB_TOKEN".to_string(), "ghp_xxx".to_string())
.build();
let info = introspector.discover_server(server_id, &config).await?;
println!("Server: {} v{}", info.name, info.version);
println!("Tools found: {}", info.tools.len());
for tool in &info.tools {
println!(" - {}: {}", tool.name, tool.description);
}
Ok(())
}
let info = introspector.discover_server(server_id, &config).await?;
for tool in &info.tools {
println!("Tool: {}", tool.name);
println!("Schema: {}", serde_json::to_string_pretty(&tool.input_schema)?);
}
[!TIP] Tool schemas are JSON Schema objects that can be used for TypeScript type generation.
// npx-based servers
let config = ServerConfig::builder()
.command("npx".to_string())
.arg("-y".to_string())
.arg("@modelcontextprotocol/server-github".to_string())
.build();
// Docker-based servers
let config = ServerConfig::builder()
.command("docker".to_string())
.arg("run".to_string())
.arg("-i".to_string())
.arg("--rm".to_string())
.arg("ghcr.io/org/mcp-execution-server".to_string())
.build();
[!NOTE] Currently supports stdio transport, which is the most common for MCP servers.
| Type | Description |
|---|---|
Introspector |
Main introspection service with caching |
ServerInfo |
Discovered server metadata and tools |
ToolInfo |
Tool name, description, and JSON schema |
ServerCapabilities |
Flags for tools, resources, prompts support |
ServiceExt::list_all_tools() to get toolsThis crate is part of the mcp-execution workspace:
mcp-execution-core - Foundation types (ServerId, ServerConfig)mcp-execution-codegen - Uses introspection results for code generationrmcp - Official Rust MCP SDKMinimum Supported Rust Version: 1.89
MSRV increases are considered minor version bumps.
Licensed under either of Apache License 2.0 or MIT license at your option.