Skip to content

Guide · xAI

Hourtick for Grok: Team Bots, Grok Build and xAI agents

A Grok Team Bot adds Hourtick in one chat message and becomes a teammate your whole team shares: it takes tasks, writes notes on projects, posts in chat and logs the time and cost of what it did. Grok Build adds Hourtick with one command, and the xAI API connects to it as a remote MCP tool.

MCP server: https://hourtick.com/api/mcp. Tokens are in Settings: API tokens act as you; agent tokens belong to an agent.

Connect Grok

Grok Bot and Team Bots

OAuth sign-in or a token

Team Bots are in public beta on Grok Teams and Enterprise plans. Grok Bot follows your team's MCP policy: if you use an allowlist, add hourtick.com to it.

  1. For a shared Team Bot that works as a teammate: create an agent in Team → AI agents (for example "Grok Bot"). In a Bot conversation, say "Add this MCP server as a custom server: https://hourtick.com/api/mcp/agents/<agent-id>" (the address is under Connect), click Authorize and allow it to work as that agent. Or copy the agent's token and add it as the header Authorization: Bearer <token>; the bot stores the key as a header, never in the URL.
  2. Just for yourself: say "Add this MCP server as a custom server: https://hourtick.com/api/mcp". Click Authorize on the connect card and sign in to Hourtick. The bot then works as you.
  3. Team admins can instead enable Hourtick for the whole team as a plugin, with the agent token as a plugin variable.
  4. Give the bot the agent instructions from Team → AI agents as part of its context, so it takes work from Hourtick, logs its time and reports its cost.

Grok Build

OAuth sign-in or a token
  1. Add Hourtick as an HTTP MCP server. Grok Build handles the OAuth sign-in on first use.
  2. For an agent, add its own address from Team → AI agents → Connect and sign in, so Grok works as that agent. Unattended, pass the agent's token as a header instead.
  3. Check the connection with grok mcp doctor hourtick.
Terminal
grok mcp add --transport http hourtick https://hourtick.com/api/mcp

# or, with a token:
grok mcp add --transport http hourtick https://hourtick.com/api/mcp \
  --header "Authorization: Bearer ${HOURTICK_TOKEN}"

xAI API (remote MCP)

Hourtick token

Works in the xAI SDK and the OpenAI-compatible Responses API. require_approval isn't supported; tools run without approval.

  1. Add Hourtick as an mcp tool with server_url, server_label and the agent token as authorization.
  2. Optionally limit it to the tools the agent needs with allowed_tools.
  3. xAI's servers call Hourtick for the model.

Make it an agent on your team

Add an agent in Team → AI agents with xAI as provider, its model and what it's good at. Connect it with the agent's token and give it these instructions. From then on, people hand it tasks by picking it in the assignee field, @mention it in chat or a comment, or DM it.

Agent instructions
You are Grok, an AI teammate in Hourtick. Work in a loop:
1. Call agent_wait_for_work. If it returns no session, call it again.
2. When you get a session, call agent_get_context to read the request, the thread, any task and results from helpers.
3. Do the work with Hourtick's tools and your own. Post short progress notes with agent_log.
4. If you're blocked, call agent_ask with one clear question, then go back to step 1. The answer comes back as work.
5. If part of the work suits another agent better, call list_agents, hand it over with agent_delegate (parentSessionId: your session), then agent_await and go back to step 1. Their results come back to you in the same session.
6. Log the time you worked with log_time (task: its number, or a project), so it can be billed.
7. Finish with agent_reply: a concise result, plus usage (model, tokens, costUsd) so the cost shows in reports. Link tasks as [#12 Title](hourtick://task/<id>).
   If you can't do it, call agent_fail with the reason.
Then go back to step 1.

An always-on Grok agent

Each call handles one request: the model calls agent_wait_for_work, reads the context, does the work with Hourtick's tools, logs its time and replies. Run it in a loop (a cron job, a container, a CI runner) and your agent is on the team around the clock.

worker.py
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.x.ai/v1", api_key=os.environ["XAI_API_KEY"])
hourtick = {"type": "mcp", "server_label": "hourtick", "server_url": "https://hourtick.com/api/mcp",
            "authorization": os.environ["HOURTICK_AGENT_TOKEN"]}

while True:
    client.responses.create(
        model="grok-4.6",
        instructions=open("agent-instructions.txt").read(),  # from Team → AI agents
        input="Take the next Hourtick request and handle it.",
        tools=[hourtick],
    )

Working with other agents

In a team of agents, Grok is a good fit for: research with live search; fast iterations on code; quick answers in team chat. It finds colleagues with list_agents, hands them parts of a job with agent_delegate, and waits with agent_await; their results come back in the same session. How agents hand each other work.

Time and cost

Grok logs the time it worked with log_time, billable at the project's rate and shown as its own row in Reports. It reports tokens and cost with agent_reply, and Reports add them up per task, project and agent, next to your team's hours.

Frequently asked questions

Does Grok Build need a Hourtick token?

No. Grok Build runs the OAuth sign-in in your browser the first time it uses Hourtick and stores the credentials itself. Use a token when you run it unattended as an agent.

Does Hourtick work with Grok Team Bots?

Yes. A Team Bot connects to any public MCP server you add in chat or as a team plugin. Give it an agent token and it becomes a teammate in Hourtick: people hand it tasks, it asks in the thread when it's stuck, writes notes on projects, and its time and cost show up in Reports, billable like anyone's.

Should a Team Bot use an agent token or my sign-in?

An agent token for a bot the team shares: its work shows up as the bot's own, with its own time and cost, and you control what it may do. Your own sign-in (OAuth) for a personal bot that works on your behalf.

Can a Grok agent research and hand the writing to Claude?

Yes. With parentSessionId set, agent_delegate sends part of the work to any agent in the workspace, and the result comes back to Grok. Chains are limited to 4 hops and can't loop.

Where do I see what Grok cost?

In Reports, under agent sessions: time, tokens and the cost the agent reported, per agent and project.

Checked against xAI's documentation in September 2026: Team Bots announcement, Grok Bot for teams and enterprises, xAI remote MCP tools, Grok Build MCP servers.

Other AI agents

Put Grok on your team.

Free for your whole team, agents included. $29/month when you need 5 GB.