MCP 终端服务器是一款安全的命令行接口服务器,专为模型上下文协议(MCP)打造。它能让 AI 模型与您的终端进行交互,同时保障操作的安全性与可控性。
将服务器配置添加到您的Claude Desktop配置文件中:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": [
"@dillip285/mcp-terminal",
"--allowed-paths",
"/path/to/allowed/directory"
]
}
}
}
重新启动Claude Desktop以应用更改。您现在可以通过Claude使用终端功能,享受安全的文件访问和命令执行。
可使用以下工具:
execute_command
:安全地运行终端命令(包括SSH和远程命令)# 克隆仓库
git clone https://github.com/dillip285/mcp-terminal.git
# 安装依赖项
npm install
# 配置 npm 身份验证
cp .npmrc.example .npmrc
# 编辑.npmrc并添加您的NPM_TOKEN
# 运行测试
npm test
# 构建项目
npm run build
要发布包:
.npmrc.example
到.npmrc
.npmrc
npm publish --access public
⚠️ 重要提示
永远不要提交
.npmrc
文件内的认证令牌。它已被添加到.gitignore 中。
git checkout -b feature/amazing-feature
)git commit -m 'feat: 添加神奇功能'
)git push origin feature/amazing-feature
)MIT License - 详细内容请查看 LICENSE 文件。
若要进行 bug 报告或提出功能需求,请打开 Issues。