████████ ██████ ████████ ████████ ████████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
████████ ██ ██ ████████ ██ ██████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██████ ██ ██ ██ ████████ ██ ██Standalone MCP Gateway
Part of the Nimbus Ecosystem
______________________________________________________________________
Porter将多个MCP服务器聚合到一个统一的MCP端点中。单独使用 porter serve 或 porter stdio,或作为 雨云 平台。
波特是什么?
Porter是一个库和二进制文件,它在单个MCP接口后面聚合了多个MCP服务器:
- MCP服务器:通过STDIO或流式HTTP传输管理外部MCP服务器,命名空间隔离其工具以防止名称冲突
无需任何Nimbus基础设施即可独立工作。直接连接任何MCP客户端。
安装
cargo install nimbus-porter-cli从源代码构建:
git clone https://github.com/Layer-Prime-Solutions/porter
cd porter
cargo build --release
# Binary is at ./target/release/porter快速开始
1.创建一个 porter.toml 配置文件 (或复制示例: cp porter.example.toml porter.toml):
# MCP servers (STDIO or HTTP transports)
[servers.github-mcp]
slug = "gh-mcp"
transport = "stdio"
command = "gh-mcp"
[servers.context7]
slug = "c7"
transport = "http"
url = "https://mcp.context7.com/mcp"2.启动波特:
porter serve输出:
Porter HTTP server listening host=127.0.0.1 port=3000
Connect your MCP client to http://127.0.0.1:3000/mcp3.连接您的MCP客户端 到 http://127.0.0.1:3000/mcp
来自所有已配置服务器的所有工具都可以在该单一端点上使用。
配置
波特配置使用 porter.toml (或通过自定义路径 --config).
听
为设置默认绑定地址和端口 porter serve.CLI标志 --host 和 --port 在提供时覆盖这些。
[listen]
host = "127.0.0.1" # Default: "127.0.0.1"
port = 3000 # Default: 3000MCP服务器
[servers.]
slug = "unique-id" # Required: identifier used as tool namespace prefix
transport = "stdio" # "stdio" or "http"
enabled = true # Optional: default true
# For stdio transport:
command = "my-mcp-server" # Required for stdio
args = ["--verbose"] # Optional extra args
env.MY_VAR = "${MY_VAR}" # Optional env vars (must use ${VAR} syntax)
cwd = "/path/to/dir" # Optional working directory
# For http transport:
url = "https://mcp.example.com/mcp" # Required for http完整示例
[servers.filesystem]
slug = "fs"
transport = "stdio"
command = "mcp-server-filesystem"
args = ["/home/user/projects"]
[servers.github-mcp]
slug = "gh-mcp"
transport = "stdio"
command = "gh-mcp"
env.GITHUB_TOKEN = "${GITHUB_TOKEN}"用法
搬运工服务
启动流式HTTP MCP服务器:
# Default: localhost:3000, config from porter.toml
porter serve
# Custom config, port, and host
porter serve --config my-tools.toml --port 8080 --host 0.0.0.0选项:
--config/-c:配置文件的路径(默认值:./porter.toml或~/.config/porter/porter.toml)--port/-p:HTTP端口(覆盖[listen].port从配置;违约:3000)--host:绑定地址(覆盖[listen].host从配置;违约:127.0.0.1)
热重载:Porter会查看配置文件是否有更改。编辑时 porter.toml,Porter会自动重新加载工具表面并发送 tools/list_changed 通知所有连接的MCP客户端——无需重新启动。
MCP端点: http://: /mcp
波特标准
为Claude Desktop和其他基于STDIO的MCP客户端在STDIO上桥接所有配置的工具:
porter stdio
porter stdio --config /path/to/porter.toml选项:
--config/-c:配置文件的路径(默认值:./porter.toml或~/.config/porter/porter.toml)
客户端配置
Porter按以下顺序搜索配置: ./porter.toml 然后 ~/.config/porter/porter.toml。如果您将配置放在 ~/.config/porter/porter.toml,以下示例在没有 --config.
克劳德代码
claude mcp add porter -- porter stdio或者使用显式配置路径:
claude mcp add porter -- porter stdio --config ~/.config/porter/porter.toml克劳德桌面版
添加 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)或 %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"porter": {
"command": "porter",
"args": ["stdio"]
}
}
}光标
添加到光标MCP设置(.cursor/mcp.json):
{
"mcpServers": {
"porter": {
"command": "porter",
"args": ["stdio"]
}
}
}VS代码/副本
添加 .vscode/mcp.json:
{
"servers": {
"porter": {
"type": "stdio",
"command": "porter",
"args": ["stdio"]
}
}
}帆板运动
添加 ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"porter": {
"command": "porter",
"args": ["stdio"]
}
}
}任何可流式传输的HTTP客户端
开始 porter serve 并连接到端点:
http://127.0.0.1:3000/mcp用例食谱
porter.example.toml 包括随时取消注释的配置块,用于通过MCP服务器将AI代理连接到流行的项目管理和代码审查平台。每个配方都按访问层记录了每个公开的工具,以便您可以就允许的内容做出明智的决定。
访问层
| 层级 | 默认值 | 描述 | 示例 |
|---|---|---|---|
| 阅读 | 启用 | 被动观察-无副作用 | 搜索、列表、获取、查看、差异 |
| 反馈 | 已启用 | 参与工作流而不会产生破坏性的副作用 | 创建问题、添加评论、更新标签/状态 |
| 破坏性的 | 已阻止 | 不可逆或高影响操作 | 删除、合并、关闭、存档 |
| 代码写入 | 已阻止 | 源代码发生重大突变 | 推送文件、创建分支、分叉存储库 |
阅读 和 反馈 默认情况下,工具可以安全地暴露给AI代理。 破坏性的 和 代码写入 在审查了影响后,应该明确选择工具。
可用食谱
| 平台 | 包装 | 运输 | 认证 |
|---|---|---|---|
| GitHub | @modelcontextprotocol/server-github 工作室 | GITHUB_TOKEN | |
| GitLab | @modelcontextprotocol/server-gitlab 工作室 | GITLAB_TOKEN (+可选 GITLAB_API_URL) | |
| 线性 | mcp-remote → https://mcp.linear.app/sse | STDIO(远程网桥) | OAuth(浏览器流) |
| 吉拉 | mcp-atlassian (通过 uvx(工作室。 JIRA_URL + JIRA_USERNAME + JIRA_API_TOKEN | ||
| 点击起来 | clickup-mcp-server 工作室 | CLICKUP_API_KEY + CLICKUP_TEAM_ID |
要使用配方:打开 porter.example.toml,找到平台块,取消注释,设置所需的环境变量,并将其复制到您的 porter.toml.
备注:这些是由各自社区维护的第三方MCP服务器。在将每台服务器暴露给生产环境中的AI代理之前,请先查看其文档和安全状况。
安全
- 工具名称间距:每个服务器的工具都以其slug作为前缀,以防止名称冲突
- 健康跟踪:不健康的服务器将自动从工具列表和调用中排除
- 热重载:配置更改会自动获取,无需重新启动
许可证
根据您的选择,在MIT或Apache-2.0下获得许可。
