Expand description
spn-mcp: Dynamic REST-to-MCP wrapper library
This crate provides the core functionality for wrapping REST APIs as MCP tools.
§Architecture
~/.spn/apis/*.yaml → config::load_all_apis() → ApiConfig
↓
server::DynamicHandler
↓
MCP Server (stdio)§Configuration Format
API configurations are YAML files in ~/.spn/apis/:
name: example
base_url: https://api.example.com/v1
auth:
type: bearer
credential: example
tools:
- name: get_data
method: GET
path: /dataRe-exports§
pub use config::ApiConfig;pub use config::AuthConfig;pub use config::AuthType;pub use config::ToolDef;pub use error::Error;pub use error::Result;pub use openapi::parse_openapi;pub use openapi::OpenApiError;pub use openapi::OpenApiSpec;