Grok MCP setup

Connect Grok (Grok Build / Grok CLI) to Modeledge with the hosted MCP server and your Modeledge API key.

Connection details

Server name
modeledge
Server URL
https://mcp.modeledge.ai/mcp
Transport
streamable HTTP or HTTP MCP
Auth header
Authorization: Bearer <API key>
Key source
Modeledge account page

Steps

  1. Install and sign in to Grok (Grok Build / Grok CLI).
  2. Generate a Modeledge MCP API key from your account page.
  3. Add Modeledge with the Grok MCP command, or edit ~/.grok/config.toml.
  4. Optionally store the key in an environment variable and reference it from config.
  5. 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.

Command
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.

Shell
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.

config.toml
[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.

Commands
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.