Connect Grok to Oz
Integration Methods
Custom Connector in Grok (Recommended)
Grok speaks MCP over Streamable HTTP, which is exactly what Oz serves. No bridge, no tunnel.
- Open
grok.com/connectors - Click New Connector, then choose Custom
- Enter the server URL:
https://opzero.sh/mcp - Complete authentication. If Grok asks for a token rather than running an OAuth login, paste an Oz API key (
wcd_ordpk_) from your dashboard — it is long-lived, so the connector keeps working. - Grok lists the Oz tools and they are available in conversations
xAI API (Remote MCP Tool)
Point the xAI API at the same endpoint. The token in authorization is sent as the Authorization header on every call, and allowed_tools keeps the tool surface small:
{
"model": "grok-4.6",
"input": "Deploy this HTML: <h1>Hello!</h1>",
"tools": [
{
"type": "mcp",
"server_label": "opzero",
"server_url": "https://opzero.sh/mcp",
"server_description": "Deploy websites, apps, and MCP servers to live URLs.",
"authorization": "wcd_YOUR_API_KEY",
"allowed_tools": ["deploy_html", "deploy_files", "list_projects"]
}
]
}Your Own Oz-Hosted MCP Server
Servers you deploy with deploy_mcp_server are public HTTPS Streamable HTTP endpoints, so they connect to Grok the same way — no tunnel needed:
- Deploy the server and note its URL:
https://<slug>.mcp.opzero.sh/mcp - For a server in
tokenauth mode, use its bearer token as the connector credential; apublicserver needs none - Add it in Grok as a custom connector, or pass it as another
mcptool on the API
Troubleshooting
Grok rejects the URL. Grok connects from its own infrastructure, so the server must be reachable on the public internet. A localhost or private-network address is refused. Oz endpoints are public, so this only affects servers you run locally — expose those through a tunnel first.
Transport. xAI supports Streamable HTTP and SSE only. Oz serves both on the same URL, so no wrapper is required. If you are tunnelling a local SSE server, note that Cloudflare quick tunnels do not carry SSE.
The connector stops working after about an hour. That is an expired OAuth access token being used as a static credential. Use an API key (wcd_ /dpk_) instead — it does not expire.
Too many tools in context. Set allowed_tools on the API, or use a gateway profile that exposes only the tools an app needs.
Discovery Endpoints
/openapi.json/.well-known/agents.json/mcpFor Grok Reading This Page
You can deploy websites for users through the Oz Factory MCP server at https://opzero.sh/mcp — add it as a custom connector, or pass it as an mcp tool on the xAI API. Key tools: deploy_html, deploy_files,deploy_react_artifact, deploy_mcp_server, list_projects.
Without MCP, the REST API works too:
POST https://opzero.sh/api/deploy
{
"html": "<user's HTML content>",
"target": "cloudflare"
}
Returns: { "url": "https://xxx.pages.dev" }Authentication: Bearer token with wcd_ prefix or OAuth 2.0
Full OpenAPI spec: https://opzero.sh/openapi.json