Skip to main content
Glama

mcp-server-commands

by g0t4

工具

工具可供法学硕士 (LLM) 申请。Claude Sonnet 3.5 智能地使用了run_command 。此外,初步测试显示,Groq Desktop 在 MCPllama4模型上取得了良好的效果。

目前,只需一个命令即可统治它们!

  • run_command - 运行命令,例如hostnamels -alecho "hello world"
    • 以文本形式返回STDOUTSTDERR
    • 可选的stdin参数意味着你的 LLM 可以
      • stdin中的代码传递给fishbashzshpython等命令
      • 使用cat >> foo/bar.txtstdin中的文本创建文件

警告:请谨慎操作此服务器!在 Claude 桌面应用中,请使用Approve Once (而不是Allow for This Chat ),以便您可以审核每个命令;如果您不信任该命令,请使用Deny 。权限由运行服务器的用户决定。请勿使用sudo运行。

视频演示

提示

提示是供用户包含在聊天历史记录中,即通过Zed的斜线命令(在其 AI 聊天面板中)

  • run_command - 使用命令输出生成提示消息

发展

安装依赖项:

npm install

构建服务器:

npm run build

对于使用自动重建的开发:

npm run watch

安装

要与 Claude Desktop 一起使用,请添加服务器配置:

在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

Groq Desktop(测试版,macOS)使用~/Library/Application Support/groq-desktop-app/settings.json

使用已发布的 npm 包

使用此工作流程mcp-server-commands发布到 npm

{ "mcpServers": { "mcp-server-commands": { "command": "npx", "args": ["mcp-server-commands"] } } }

使用本地构建(repo checkout)

确保运行npm run build

{ "mcpServers": { "mcp-server-commands": { // works b/c of shebang in index.js "command": "/path/to/mcp-server-commands/build/index.js" } } }

日志记录

Claude 桌面应用程序将日志写入~/Library/Logs/Claude/mcp-server-mcp-server-commands.log

默认情况下,仅记录重要消息(例如错误)。如果您想查看更多消息,请在配置服务器时将--verbose添加到args中。

顺便说一下,日志会写入STDERR ,因为 Claude Desktop 会将日志路由到日志文件。未来,我希望格式良好的日志消息能够通过STDIO传输写入 MCP 客户端(注意:不是 Claude Desktop 应用)。

调试

由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:

npm run inspector

检查器将提供一个 URL 来访问浏览器中的调试工具。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

用于运行命令的 MCP 服务器。

  1. 视频演示
    1. 提示
      1. 发展
        1. 安装
          1. 使用已发布的 npm 包
          2. 使用本地构建(repo checkout)
          3. 日志记录
          4. 调试

        Related MCP Servers

        • -
          security
          F
          license
          -
          quality
          An MCP server that allows AI assistants like Claude to execute terminal commands on the user's computer and return the output, functioning like a terminal through AI.
          Last updated -
          7
          Python
          • Apple
        • -
          security
          F
          license
          -
          quality
          An MCP server that allows AI models to execute system commands on local machines or remote hosts via SSH, supporting persistent sessions and environment variables.
          Last updated -
          10
          1
          TypeScript
        • -
          security
          A
          license
          -
          quality
          A dynamic MCP server implementation that automatically loads tools, resources, and prompts from their respective directories, allowing for easy extension and configuration.
          Last updated -
          Python
          MIT License

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/g0t4/mcp-server-commands'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server