agent-zero icon indicating copy to clipboard operation
agent-zero copied to clipboard

BUG: `github_mcp` Fails with `ValueError: Command not specified` Despite Correct Configuration

Open Javendean opened this issue 3 months ago • 2 comments

Description The github_mcp server fails to initialize during startup. The Docker logs show a ValueError: Command not specified, even when the mcp_config.json file is correctly configured with a "command": "mcp http" entry for the github_mcp server.

Steps to Reproduce

  1. Create an mcp_config.json file with the following content:

    {
      "mcp_servers": [
        { "name": "github_mcp" }
      ],
      "mcpServers": {
        "github_mcp": {
          "command": "mcp http",
          "httpUrl": "https://api.githubcopilot.com/mcp/",
          "headers": {
            "Authorization": "YOUR_GITHUB_TOKEN"
          },
          "timeout": 5000
        }
      }
    }
    
  2. Run the agent0ai/agent-zero container using a docker run command that mounts this configuration file.

    docker run -d --name agent0 -p 50001:80 \
    -v '/path/to/your/mcp_config.json:/a0/mcp_config.json' \
    agent0ai/agent-zero
    
  3. Check the container logs.

    docker logs agent0
    

Expected Behavior The github_mcp server should initialize successfully without any errors.

Actual Behavior The application starts but the logs show the following error, indicating the command field was not processed:

MCPClientBase (github_mcp - list_tools_op): Error during operation: ValueError: Command not specified
MCPClientBase (github_mcp): 'update_tools' operation failed: ValueError: Command not specified

Troubleshooting Steps Taken

  • Verified the mcp_config.json file is correctly mounted into the container at /a0/mcp_config.json using docker inspect.
  • Verified the contents of the file inside the container using docker exec ... cat /a0/mcp_config.json, which confirms that the "command": "mcp http" line is present. This suggests the issue may be with how the application is parsing the configuration for this specific MCP server.

Please let me know if I'm missing something.

Javendean avatar Sep 23 '25 17:09 Javendean

Command mcp http is surely not correct. It will be something like npx, uvx etc.

frdel avatar Sep 23 '25 18:09 frdel

Also we don't use mcp_config.json, it's done in the ui.

frdel avatar Sep 23 '25 18:09 frdel