mcp-framework
by koki7o
Overview
A Rust framework for building AI agents with built-in Model Context Protocol (MCP) support, multi-LLM integration, and a web-based inspector for debugging.
Installation
cargo run --example server_with_toolsEnvironment Variables
- ANTHROPIC_API_KEY
- OPENAI_API_KEY
Security Notes
The server's design allows AI agents to dynamically call registered tools, which inherently introduces risks if tools are not carefully implemented and sandboxed. The `StdioConnector` enables spawning arbitrary external commands via a 'stdio://command args' URL scheme; if an attacker can control this URL or the tool arguments, it could lead to arbitrary code execution (e.g., command injection). The Web Inspector UI (`inspector.rs`) exposes internal server state and allows direct execution of tools without authentication, making it a critical vulnerability if exposed publicly. While API keys are loaded from environment variables, the powerful dynamic execution capabilities require rigorous input sanitization and strict access controls, especially in production environments.
Similar Servers
mcp-use
A comprehensive framework for building full-stack Model Context Protocol (MCP) applications, including AI agents, MCP servers with UI widgets, and integrated debugging tools in both Python and TypeScript.
rust-mcp-sdk
A high-performance, asynchronous Rust SDK for building Model Context Protocol (MCP) servers and clients, supporting various transports and authentication methods.
rust-mcp-schema
Provides a type-safe Rust implementation of the Model Context Protocol (MCP) schema, enabling developers to build robust MCP servers and clients.
Ops-Tools
A Rust-based command-line interface (CLI) toolset designed for DevOps workflows, offering features like infrastructure-as-code cache cleanup, AI code assistant management, system package installation, security scanning, LLM prompt generation, container image building, and Kubernetes configuration management.