896aa6111e
- Add multi-platform MCP detection (Claude, Windsurf, Cursor, VS Code) - Auto-unregister previous installations before reinstall - Create platform-specific docs (CURSOR.md, VSCODE.md, ANTIGRAVITY.md) - Update Windsurf config to use correct JSON path (~/.codeium/windsurf/mcp_config.json) - Fix VS Code config format (uses 'servers' not 'mcpServers') - Remove MT5_MCP_HOME requirement from MCP configs (binary auto-detects) - Slim down README installation section with platform table - Update QUICKSTART.md with all platform instructions
3.2 KiB
3.2 KiB
Antigravity MCP Integration Setup
Quick Setup
Option 1: Download Prebuilt Binary (Recommended)
# macOS (Apple Silicon)
curl -L -o mt5-quant.tar.gz https://github.com/masdevid/mt5-mcp/releases/latest/download/mt5-quant-macos-arm64.tar.gz
tar -xzf mt5-quant.tar.gz
# Linux (x64)
curl -L -o mt5-quant.tar.gz https://github.com/masdevid/mt5-mcp/releases/latest/download/mt5-quant-linux-x64.tar.gz
tar -xzf mt5-quant.tar.gz
Option 2: Build from Source
cargo build --release
Configure Antigravity
Step 1: Open MCP Manager
- Launch Antigravity
- Look at the right-side Agent Panel
- Click the "..." (More Options) menu at the top
- Select MCP Servers
Step 2: Access Configuration
- Click Manage MCP Servers
- Click View raw config or Edit configuration
- This opens
mcp_config.json
Step 3: Add mt5-quant Configuration
Add to mcp_config.json:
{
"mcpServers": {
"mt5-quant": {
"command": "/absolute/path/to/mt5-quant"
}
}
}
Step 4: Reload and Verify
- Save the file
- Restart Antigravity (or reload the window)
- Open the Agent chat and type:
What tools do you have access to? - The agent should list MT5 tools like
verify_setup,run_backtest, etc.
Full Example Configuration
{
"mcpServers": {
"mt5-quant": {
"command": "/Users/name/mt5-quant/target/release/mt5-quant"
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${env:GITHUB_TOKEN}"
}
}
}
}
Environment Variables
Antigravity supports ${VAR_NAME} syntax for environment variable substitution:
{
"mcpServers": {
"mt5-quant": {
"command": "/Users/name/mt5-quant/target/release/mt5-quant",
"env": {
"CUSTOM_VAR": "${env:MY_VAR}"
}
}
}
}
This keeps secrets out of the config file.
Verify Setup
In Antigravity chat, type:
Run verify_setup
Expected output:
Wine: /Applications/MetaTrader 5.app/.../wine64
MT5 dir: ~/Library/Application Support/.../MetaTrader 5
Display: gui
Arch: arch -x86_64
Troubleshooting
"Connection Refused" or "Tool not found"
- Double-check the server path in
mcp_config.json - Ensure the binary has execute permissions:
chmod +x /path/to/mt5-quant - Try completely restarting Antigravity
- Check the server is listed in MCP manager
"Stdio Error" or JSON Parsing Error
- Verify the JSON syntax in
mcp_config.json - Use a JSON validator if needed
- Ensure no trailing commas
Agent Hallucinating Tool Parameters
If the agent makes up incorrect parameters:
- Check the tool is actually available: "List your available tools"
- Restart the agent session
- Be explicit in your requests
Configuration Location
| Platform | Path |
|---|---|
| All | Via UI: Agent Panel → ... → MCP Servers → Manage → Edit configuration |