MCP终端服务器
用于模型上下文协议(MCP)的安全命令行界面服务器,使AI模型能够与您的终端交互,同时保持安全性和控制。
特性
- 🔒 具有可配置权限的安全命令执行
- 📁 允许路径内的文件系统操作
- 🌍 环境变量管理
- 💻 跨平台支持(Windows、macOS、Linux)
- 🔌 通过命令执行支持远程系统连接
使用Claude Desktop
将服务器配置添加到Claude Desktop配置文件中:
{
"mcpServers": {
"terminal": {
"command": "npx",
"args": [
"@dillip285/mcp-terminal",
"--allowed-paths",
"/path/to/allowed/directory"
]
}
}
}重新启动Claude Desktop以应用更改。现在,您可以通过Claude使用终端功能,实现安全的文件访问和命令执行。
可用工具
execute_command:安全运行终端命令(包括SSH和远程命令)
安全
- 所有操作仅限于指定的允许路径
- 命令在执行前经过验证和净化
- 精心管理环境变量
- 对安全相关问题进行适当的错误处理
发展
# Clone the repository
git clone https://github.com/dillip285/mcp-terminal.git
# Install dependencies
npm install
# Configure npm authentication
cp .npmrc.example .npmrc
# Edit .npmrc and add your NPM_TOKEN
# Run tests
npm test
# Build the project
npm run build出版
要发布包,请执行以下操作:
- 复制
.npmrc.example向.npmrc - 将您的npm身份验证令牌添加到
.npmrc - 跑
npm publish --access public
注意:切勿承诺 .npmrc 带有身份验证令牌的文件。它已添加到 .gitignore.
贡献
- 分叉存储库
- 创建功能分支(
git checkout -b feature/amazing-feature) - 提交您的更改(
git commit -m 'feat: Add amazing feature') - 推到分支(
git push origin feature/amazing-feature) - 打开拉取请求
许可证
MIT许可证-请参阅 许可证 文件以获取详细信息。
相关项目
支持
有关错误报告和功能请求,请 打开一个问题.
