7 AiMcpClaude
Niquel Mendoza ha modificato questa pagina 2026-04-26 13:53:16 +00:00

Configuration with Claude Desktop

To connect Claude Desktop to the AiDataTaskRunner panel via MCP follow these steps:


Method (1) using direct py script

1. Configure Claude Desktop

Open Claude Desktop, go to Settings → Developer and click "Open configuration". This will open the claude_desktop_config.json file in your editor.

The default file looks like this:

{
  "preferences": {
    "coworkScheduledTasksEnabled": false,
    "ccdScheduledTasksEnabled": true,
    "sidebarMode": "chat",
    "coworkWebSearchEnabled": true
  }
}

Add the mcpServers field at the JSON root and inside it the entry for AiDataTaskRunner:

{
  "preferences": { ... },
  "mcpServers": {
    "aidatataskrunner": {
      "command": "python",
      "args": [
        "C:\\full\\path\\to\\aidatataskruner_mcp.py",
        "--host", "127.0.0.1",
        "--port", "8080"
      ]
    }
  }
}

Important: The --host and --port you configure here must match exactly those configured in the panel (see step 2). Modify the .py path according to where you have the file on your machine.

  • Example:
{
  "mcpServers": {
    "mt5-aidatataskrunner": {
    "command": "python",
    "args": [
      "C:\\Users\\USER\\AppData\\Roaming\\MetaQuotes\\Terminal\\D0E8209F77C8CF37AD8BF550E51FF075\\MQL5\\Shared Projects\\AiDataTaskRuner\\Backend\\Mcp\\aidatataskruner_mcp.py",
      "--host", "127.0.0.1",
      "--port", "9999"
    ]
   }
  },
  "preferences": {
    "coworkScheduledTasksEnabled": false,
    "ccdScheduledTasksEnabled": true,
    "sidebarMode": "chat",
    "coworkWebSearchEnabled": true
  }
}

Method (2) using package

1. Configure Claude Desktop

Install "aidatataskrunner-mcp" package

pip install aidatataskrunner-mcp

Open Claude Desktop, go to Settings → Developer and click "Open configuration". This will open the claude_desktop_config.json file in your editor.

The default file looks like this:

{
  "preferences": {
    "coworkScheduledTasksEnabled": false,
    "ccdScheduledTasksEnabled": true,
    "sidebarMode": "chat",
    "coworkWebSearchEnabled": true
  }
}

Add the mcpServers field at the JSON root and inside it the entry for AiDataTaskRunner:

{
  "preferences": { ... },
  "mcpServers": {
    "aidatataskrunner": {
      "command": "python",
      "args": ["-m", "aidatataskrunner_mcp", "--host", "127.0.0.1", "--port", "9999"]
    }
  }
}

Notes:

  • Important: The --host and --port you configure here must match exactly those configured in the panel (see step 2).
  • We use "aidatataskrunner_mcp" because the module is named with an underscore "_"
  • Example:
{
   "mcpServers": {
    "aidatataskrunner": {
      "command": "python",
      "args": ["-m", "aidatataskrunner_mcp", "--host", "127.0.0.1", "--port", "9999"]
    }
  },
  "preferences": {
    "coworkScheduledTasksEnabled": true,
    "ccdScheduledTasksEnabled": true,
    "sidebarMode": "task",
    "coworkWebSearchEnabled": true
  }
}

2. Configure your MT5

Navigate to the "Tools" section >> "Options" >> "Allowed URLs for WebRequest", add a new field with the host/address you will be using (in this case "127.0.0.1"), and click Accept.

3. Configure and launch the EA from the panel

See the Subtab MCP section for details on each field.

In summary:

  • Open the AiDataTaskRunner panel
  • Go to AiChat → MCP
  • Set Address and Port to the same values you put in claude_desktop_config.json
  • Click "Launch EA"

The host and port must be identical on both sides — in the Claude Desktop JSON and in the panel's MCP subtab — otherwise the connection will fail.

4. Use Claude to control the panel

Once the EA is running and Claude Desktop has the configuration loaded, Claude will have access to all panel tools: adding tasks, running them, loading configurations, querying states, etc.

You may need to restart Claude Desktop after editing the JSON for the changes to take effect.