CrazyPigHead/dsh-plugin-agents-loader ↗★ 0

dsh-plugin-agents-loader

自动发现并加载MCP服务与斜杠命令 适合需要快速集成和管理本地或远程MCP工具及自定义命令的用户。

套件
dsh-plugin-agents-loader
相容性
待驗證
Harness 依賴範圍
0.1.7-rc.2
Cordis 依賴範圍
4.0.4
版本
0.2.0
授權
MIT
最近更新
2026年9月28日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:CrazyPigHead/dsh-plugin-agents-loader

配置

mcp.json

放在 ~/.agents/mcp.json:

{
  "mcpServers": {
    "context-7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": { "Authorization": "Bearer {CONTEXT7_API_KEY}" },
      "timeoutMs": 30000
    },
    "local-tool": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "some-mcp-server"],
      "env": { "API_KEY": "{MY_API_KEY}" },
      "cwd": "/opt/somewhere"
    },
    "legacy-server": {
      "type": "http",
      "url": "https://example.com/mcp",
      "headers": {},
      "enabled": false
    }
  }
}
  • type:"http"(streamable-http)或 "stdio";省略时按字段推断——有 url 走 http,有 command 走 stdio。
  • enabled:设为 false 跳过该项(默认启用)。
  • serverName:自动从 key 生成(非法字符替换为 _,截断到 32 字符),需符合 /^[A-Za-z0-9_-]{1,32}$/。
  • headers / env:值中的 {VAR} / ${VAR} 占位符用 Host 进程的 process.env 插值(日志不打印解析值);引用不存在的环境变量时该项丢弃并告警。
  • timeoutMs:单次工具调用超时,默认 60000。

commands/*.md

放在 ~/.agents/commands/:

---
description: 创建 conventional git commit(中文提交信息)
---