Skip to content
MCP

Connect Grok

Grok Build CLI, or a remote MCP tool in the xAI Responses API

Steps

  1. 1In Mynahcast, open Agents & API and create a key. Pick the Agent preset so its posts wait for your approval. The key is shown once; copy it.
  2. 2In Grok Build, add the server with a static auth header:
  3. 3Building on the xAI API instead? Pass Mynahcast as a remote MCP tool; xAI sends your key in the Authorization header.
Create an API key

The Grok chat app doesn't take custom MCP servers.

Grok Build

Grok Build
grok mcp add --transport http mynahcast https://api.mynahcast.xyz/mcp \
  --header "Authorization: Bearer ${MYNAHCAST_KEY}"

xAI API tool

xAI API tool
{
  "type": "mcp",
  "server_url": "https://api.mynahcast.xyz/mcp",
  "server_label": "mynahcast",
  "authorization": "myn_live_…"
}

Check the key works

Lists the channels you've connected; you'll need their ids to post.

List channels
curl "https://api.mynahcast.xyz/v1/channels" \
  -H "Authorization: Bearer $MYNAHCAST_KEY"

Tools your agent gets

Filtered by the key's scopes. Anything that changes data accepts dry_run.

  • mynahcast_validate_postCheck a post against every target channel without saving it
  • mynahcast_create_postCreate a post for one brand, fanned out to one or more channels
  • mynahcast_get_postRead one post with its per-channel delivery state
  • mynahcast_list_postsList posts
  • mynahcast_update_postEdit a post (an edit voids an earlier approval)
  • mynahcast_reschedule_postMove a post to a new time
  • mynahcast_delete_postDelete a post that hasn't gone out
  • mynahcast_get_post_timelineEvery attempt, approval and read-back for a post
  • mynahcast_submit_for_approvalAsk a human to approve a post
  • mynahcast_decide_approvalApprove or request changes (humans only; agents are refused)
  • mynahcast_list_channelsConnected channels
  • mynahcast_get_channel_capabilitiesLimits for one channel (characters, media, threads)
  • mynahcast_request_uploadGet a signed URL to upload media
  • mynahcast_complete_uploadMark an upload as finished
  • mynahcast_get_brand_voiceRead the brand's voice profile
  • mynahcast_update_brand_voicePublish a new voice version (publisher keys)

Frequently asked questions

Can Grok post to social media?
Yes, with Mynahcast. Grok connects through Mynahcast's MCP server at https://api.mynahcast.xyz/mcp, authenticated with a Mynahcast API key as a bearer token. It can then draft and schedule posts to your connected channels (Bluesky, Mastodon, Telegram, Discord, Nostr, Lemmy and more), and each post waits for your approval.
Can Grok publish without my approval?
Not with an Agent key. Agent keys can draft, validate and schedule, but the server refuses approval decisions from agents, so a person approves every post in Mynahcast.
Is it free to connect Grok to Mynahcast?
The MCP server and API are included on every Mynahcast plan, from $12 per month with a 7-day free trial. You need your own access to the agent itself.