Grok MCP setup
Connect Grok (Grok Build / Grok CLI) to Modeledge with the hosted MCP server and your Modeledge API key.
Connection details
Steps
- Install and sign in to Grok (Grok Build / Grok CLI).
- Generate a Modeledge MCP API key from your account page.
- Add Modeledge with the Grok MCP command, or edit ~/.grok/config.toml.
- Optionally store the key in an environment variable and reference it from config.
- Confirm the server with grok mcp list or /mcps in the Grok TUI, then ask Grok to use Modeledge tools.
Add Modeledge
Replace YOUR_MODELEDGE_API_KEY with the full key shown when you generate your Modeledge MCP key. Grok writes the server to ~/.grok/config.toml by default.
grok mcp add --transport http modeledge https://mcp.modeledge.ai/mcp --header "Authorization: Bearer YOUR_MODELEDGE_API_KEY"To keep the key out of the config file, export it and use a ${MODELEDGE_API_KEY} reference in headers instead of pasting the raw key into the command.
export MODELEDGE_API_KEY="YOUR_MODELEDGE_API_KEY"config.toml
Grok loads user MCP servers from ~/.grok/config.toml. You can also add a project-scoped .grok/config.toml (use --scope project with grok mcp add). Prefer an environment variable for the bearer token when sharing project config.
[mcp_servers.modeledge]
url = "https://mcp.modeledge.ai/mcp"
enabled = true
headers = { "Authorization" = "Bearer ${MODELEDGE_API_KEY}" }Verify
Check that Grok can reach Modeledge, then open a session. In the TUI, run /mcps and refresh if you edited config while Grok was already open.
grok mcp list
grok mcp doctor modeledge- Modeledge tools appear namespaced as modeledge__… (for example modeledge__FindCompany).
- If doctor reports unauthorized, regenerate your Modeledge API key and update the Authorization header.