Loading...
Loading...
Compare original and translation side by side
pi-mcp-adapterpi-mcp-adapter| Scope | Config File | When to Use |
|---|---|---|
| Global | | Server used across all projects |
| Project | | Server specific to one project |
| 作用域 | 配置文件 | 使用场景 |
|---|---|---|
| 全局 | | 所有项目通用的服务器 |
| 项目本地 | | 仅针对单个项目的服务器 |
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "package-name@latest"],
"env": { "KEY": "value" }
}
}
}{
"mcpServers": {
"server-name": {
"url": "http://localhost:8080/mcp",
"headers": { "Authorization": "Bearer token" }
}
}
}{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "package-name@latest"],
"env": { "KEY": "value" }
}
}
}{
"mcpServers": {
"server-name": {
"url": "http://localhost:8080/mcp",
"headers": { "Authorization": "Bearer token" }
}
}
}commandurl| Field | Type | Description |
|---|---|---|
| string | Executable to run (stdio) |
| string[] | Command arguments (stdio) |
| object | Environment variables (stdio) |
| string | Working directory (stdio) |
| string | Server URL (HTTP) |
| object | HTTP headers (HTTP) |
| | Auth method (HTTP) |
| string | Static bearer token |
| string | Env var name for bearer token |
| | Connection strategy (default: |
| number | Minutes before idle disconnect |
| boolean | Show server stderr |
commandurl| 字段 | 类型 | 描述 |
|---|---|---|
| 字符串 | 要运行的可执行文件(stdio模式) |
| 字符串数组 | 命令参数(stdio模式) |
| 对象 | 环境变量(stdio模式) |
| 字符串 | 工作目录(stdio模式) |
| 字符串 | 服务器URL(HTTP模式) |
| 对象 | HTTP请求头(HTTP模式) |
| | 认证方式(HTTP模式) |
| 字符串 | 静态Bearer令牌 |
| 字符串 | 存储Bearer令牌的环境变量名称 |
| | 连接策略(默认值: |
| 数字 | 空闲断开连接前的分钟数 |
| 布尔值 | 显示服务器标准错误输出 |
mcpServers{
"mcpServers": {
"server-name": { ... }
}
}mcpServers{
"mcpServers": {
"server-name": { ... }
}
}/reloadmcp({ connect: "server-name" })mcp({ server: "server-name" })/reloadmcp({ connect: "server-name" })mcp({ server: "server-name" })