skill_mcp/
lib.rs

1//! Skill MCP Server - Model Context Protocol integration
2//!
3//! This crate provides an MCP server that exposes installed skills as MCP tools,
4//! allowing AI agents like Claude to discover and execute skill tools.
5//!
6//! # Features
7//!
8//! - **Dynamic Tool Discovery**: Automatically discovers tools from installed skills
9//! - **SKILL.md Integration**: Uses SKILL.md documentation for rich tool descriptions
10//! - **Manifest Support**: Works with `.skill-engine.toml` declarative manifests
11//! - **Stdio Transport**: Uses stdio for direct Claude Code integration
12//!
13//! # Usage
14//!
15//! ```bash
16//! # Start MCP server
17//! skill serve
18//!
19//! # Or programmatically
20//! use skill_mcp::McpServer;
21//! let server = McpServer::new()?;
22//! server.run().await?;
23//! ```
24
25pub mod server;
26
27pub use server::{DiscoveredTool, McpServer, ToolParameter};
28
29use anyhow::Result;
30use skill_runtime::SkillManifest;
31
32/// Start the MCP server with default configuration
33pub async fn serve() -> Result<()> {
34    let server = McpServer::new()?;
35    server.run().await
36}
37
38/// Start the MCP server with a manifest
39pub async fn serve_with_manifest(manifest: SkillManifest) -> Result<()> {
40    let server = McpServer::with_manifest(manifest)?;
41    server.run().await
42}