CrazyPigHead/dsh-plugin-agents-loader ↗★ 0
dsh-plugin-agents-loader
Auto-discover and load ~/.agents/mcp.json MCP servers (http + stdio), ~/.agents/commands/ slash commands, and ~/.agents/AGENTS.md into dsh 适合需要快速集成和管理本地或远程MCP工具及自定义命令的用户。
설치
$
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(中文提交信息)
---