GitHub user phantosmax added a comment to the discussion: CloudStack MCP Server

i think that the error occurs because you're feeding a client configuration 
file to the MCP server instead of proper JSON-RPC
  messages.

The configuration object with "mcpServers" is being validated against JSON-RPC 
schemas (CallToolRequestSchema) instead of being used as a client configuration.

Use the configuration file to configure your MCP client, not feed it to the 
server directly. The server gets configuration from environment variables, not 
stdin.

  How it should work:

  1. Configuration file (for MCP client like Claude Desktop):
  {
    "mcpServers": {
      "cloudstack": {
        "command": "node",
        "args": ["/path/to/build/index.js"],
        "env": {
          "CLOUDSTACK_API_URL": "https://your-server/client/api";,
          "CLOUDSTACK_API_KEY": "your-key",
          "CLOUDSTACK_SECRET_KEY": "your-secret"
        }
      }
    }
  }

  2. Server expects JSON-RPC messages via stdin:
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "list_virtual_machines",
      "arguments": {}
    }
  }

GitHub link: 
https://github.com/apache/cloudstack/discussions/11031#discussioncomment-13483841

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscr...@cloudstack.apache.org

Reply via email to