Finch MCP STDIO
一种在STDIO模式下运行MCP(模型上下文协议)服务器的专用工具,使用 芬奇.
特性
- 以STDIO模式运行MCP服务器,通过标准输入/输出进行直接通信
- 支持自定义环境变量和卷装载
- 使用Ctrl+C进行优雅的容器终止
- 采用Rust构建,性能可靠
先决条件
安装
来源
克隆存储库并构建项目:
git clone https://github.com/yourusername/finch-mcp-stdio.git
cd finch-mcp-stdio
cargo build --release编译后的二进制文件将在 target/release/finch-mcp-stdio.
使用货物
cargo install --git https://github.com/yourusername/finch-mcp-stdio.git用法
基本用法
在STDIO模式下运行MCP服务器:
finch-mcp-stdio my-mcp-image:latest使用环境变量
finch-mcp-stdio my-mcp-image:latest -e API_KEY=xyz123 -e DEBUG=true带卷装
finch-mcp-stdio my-mcp-image:latest -v /host/path:/container/path完整选项
USAGE:
finch-mcp-stdio [OPTIONS]
ARGS:
MCP server image to run
OPTIONS:
-e, --env ... Environment variables to pass to the container
-v, --volume ... Mount volumes in the container
-h, --help Print help information
-V, --version Print version information
-v, --verbose Enable verbose logging (repeat for more verbosity)发展
运行测试
# Run unit tests
cargo test
# Run integration tests (requires Finch)
cargo test -- --ignored建筑文件
cargo doc --no-deps --open运作原理
- 该工具验证Finch是否已安装并可用
- 它确保Finch VM正在运行
- 它在启用STDIO模式的情况下执行指定的容器(
MCP_STDIO=true) - 标准输入/输出流在应用程序和容器之间通过管道传输
- 该工具处理信号中断以实现优雅终止
许可证
MIT许可证-有关详细信息,请参阅许可证文件。
贡献
欢迎投稿!请随时提交拉取请求。
