Skip to main content
Glama

grok-agent-threads

From your phone, ask Grok Bot (or ChatGPT, Codex, or any other agent that speaks MCP) about your Claude Code chats and Codex threads on your Mac, and have it message them:

"list my pinned Claude chats" "what does my launch chat need from me?" "message my launch chat: where are we?" "start a Codex thread in my vault called Weekly review and ask it to draft the outline"

How grok-agent-threads works

The agent gets the same reach into your chats that a Claude chat has from inside the Claude app. It sees the same titles, sidebar groups and status lines, it can read and search every conversation, and it can message any chat, open or closed, and get the answer back. It can also start new chats in the folder you name, and do all of the same with Codex threads.

Nothing on your Mac is exposed to the internet. The server listens on 127.0.0.1 only, and your tailnet reaches it through tailscale serve. A cloud agent like Grok Bot joins your tailnet through Tailscale's official OAuth app sign-in.

Tools

Tool

What it does

list_chats

Your Claude Code chats as the Claude app sidebar shows them, newest first. Each row has the title, whether the chat is open (busy or idle) or closed, last activity, group, pinned, and the chat's own one-line status or what it needs from you. Filter by title words, group or pinned

list_groups

Your sidebar groups, with how many chats each holds

chat_status

One chat in full: state, status, what it needs from you, folder, model, turns, link

read_chat

A chat's last messages, each labeled by who wrote it: you, the relaying agent, another session, or the chat

search_chats

Searches every conversation's full history

message_chat

Messages any chat and returns its answer. An open chat answers in place. A closed chat wakes up with its own folder, model, permission mode and settings

start_chat

Starts a new chat in a folder, names it, adds it to the Claude app sidebar, and returns its first answer and link. New chats start in auto mode

connector_status

Says whether closed and new chats run live in the Claude app right now or in the background, and what brings live mode back

codex_list_threads

Your Codex threads, newest first. Takes an optional search

codex_read_thread

A Codex thread's last turns

codex_message_thread

Messages a Codex thread and returns the answer. A thread the ChatGPT app has open gets the message through its queue

codex_start_thread

Starts a named Codex thread in a folder

There is no tool to delete, archive or stop a chat or thread, on purpose.

Related MCP server: claude-remote-channel

Seeing the work

  • In the Claude app. A chat that is open in the app answers in place, live. A closed or new chat runs live too when the relay chat is open: one small chat inside the app that asks the app to wake the target (docs/relay.md). Without the relay, closed and new chats work in the background and show the result when you open them.

  • In a browser, anywhere on your tailnet. Every result that says "still working" carries a private watch link, and chat_status gives one for any chat. The page streams the chat's messages and steps as they happen, on your phone or your Mac, whichever way the turn runs.

Install

By prompt (recommended). Paste docs/install-prompt.md into Claude Code on your Mac. Claude checks what you have, installs the server as a login item shared on your tailnet only, tests it, starts the relay chat, and hands you the setup prompt for your agent with your address filled in.

By hand. You need macOS, Claude Code (the Claude desktop app is optional), uv, ripgrep, and the Tailscale app signed in. Codex is optional; its tools turn on when the ChatGPT app or the codex CLI is installed.

git clone https://github.com/ArtemXTech/grok-agent-threads ~/grok-agent-threads
cd ~/grok-agent-threads
scripts/install.sh "Your Name" "Grok Bot"   # your name, and the agent that will call it
uv run scripts/check.py                     # tools, status and your newest chats

install.sh keeps the server running as a login item on 127.0.0.1:8857, shares it on your tailnet with tailscale serve (never Funnel), creates an access key, and prints the address with it, for example https://your-mac.your-tailnet.ts.net:8857/mcp?key=.... scripts/install.sh --uninstall removes both.

Connect your agent.

  • Grok Bot: paste docs/grok-setup-prompt.md into Grok Bot with your address filled in. Grok connects its Tailscale plugin (you click once to sign in), adds the server, and runs a full test.

  • Any other MCP client: add the address (with its ?key=) as a streamable HTTP MCP server. On the same Mac you can use stdio instead: uv run --directory ~/grok-agent-threads grok-agent-threads --stdio.

  • Live work in the Claude app: start the relay chat once (docs/relay.md). The install prompt does it for you.

Settings

All settings are environment variables. scripts/run.sh passes them through, and scripts/install.sh writes them into the login item.

Variable

Default

Meaning

GROK_AGENT_THREADS_OWNER

the owner

Your name, used in the note on every relayed message

GROK_AGENT_THREADS_CALLER

Grok Bot

The agent that calls the server

GROK_AGENT_THREADS_KEY

set by install.sh

Access key every MCP request must carry (?key= or Authorization: Bearer). Empty: tailnet only

GROK_AGENT_THREADS_PORT

8857

Port on 127.0.0.1

GROK_AGENT_THREADS_HOSTS

set by run.sh

Extra Host headers to accept (your tailnet name). Any other Host is refused

GROK_AGENT_THREADS_ANSWER_WAIT

45

Seconds a call waits for an answer before it reports "still working" (the work goes on)

GROK_AGENT_THREADS_NEW_CHAT_MODE

auto

Permission mode for start_chat

GROK_AGENT_THREADS_LOG_DIR

~/.grok-agent-threads/logs

Where every call is logged (calls.jsonl)

Security

Read docs/security.md before you connect a cloud agent. In short:

  • Who can reach it: only devices on your tailnet that also have your access key (the installer makes one). The Grok Bot device joins with your identity, so it can also reach your other devices. To prevent that, give it a tag and allow that tag only this port; the doc has a ready policy.

  • What the agent can do: whatever your chats can do. A closed chat wakes up in its own permission mode, which can mean edits and commands on your Mac without a prompt.

  • What a chat is told: every relayed message opens with a note. It says who typed the words and that they are never your approval for anything outward (sending, posting, paying).

  • Your words only: tell your agent to pass along only words you typed. The setup prompt does this.

How it works

See docs/how-it-works.md, including which parts rely on documented interfaces and which rely on app internals that an update could move.

Tests

uv run --group dev pytest

The tests run against synthetic data in a temporary home folder and never touch your real chats.

License

MIT

Available Tools

12 tools
chat_statusC

One chat in full: title, open in the app (busy or idle) or closed, its own status line after its last turn, what it needs from the owner, sidebar group, pinned, folder, model, turns, created, last activity, link.

Inputs: chat (required). Returns: result

codex_list_threadsB

List the owner's Codex threads (ChatGPT app and Codex), newest first: title, sidebar section, last activity, folder, link. query searches thread titles and contents.

Inputs: limit, query, include_archived. Returns: result

codex_message_threadA

Send the owner's words to one of their Codex threads and return Codex's answer. A thread the ChatGPT app has open gets the message in its queue, and the app runs it within about 10 s. Pass only words the owner typed.

Inputs: text (required), thread (required). Returns: result

codex_read_threadA

Read the last turns of one Codex thread: what was asked and what Codex answered. thread is its title, words from it, its id or its codex://threads link.

Inputs: thread (required), turns. Returns: result

codex_start_threadA

Start a new Codex thread with the owner's words as its first message, in a folder on this Mac, name it, and return Codex's first answer and link. It shows in the ChatGPT app's sidebar within about a minute.

Inputs: text (required), title (required), folder. Returns: result

connector_statusA

How the connector is working right now: whether closed and new chats run live in the Claude app or in the background (and what the owner can do about it), how many chats are open, and whether Codex is available. Call it when the owner asks why they cannot see work happening, or before a batch of requests.

Inputs: no named parameters. Returns: result

list_chatsA

List the owner's Claude Code chats exactly as the Claude app sidebar has them, newest first: title, open in the app (busy or idle) or closed, last activity, sidebar group, pinned, and the chat's own one-line status after its last turn (or what it needs from the owner). query filters by words in the title ("screen helper"); group by sidebar group name; list_groups shows the groups.

Inputs: group, limit, query, pinned_only, +1 more. Returns: result

list_groupsA

The owner's sidebar groups in the Claude app, with how many chats each holds.

Inputs: no named parameters. Returns: result

message_chatA

Send the owner's words to one of their Claude Code chats and return its answer. A chat open in the Claude app gets it as a message from the calling agent and answers in place, live on the owner's screen. A closed chat wakes up with its own folder, model and permissions: live in the Claude app when the relay chat is open there (docs/relay.md), otherwise in the background. show_in_app=true also switches the app to that chat. chat is its title (or words from it) or its id. Pass only words the owner typed.

Inputs: chat (required), text (required), show_in_app. Returns: result

read_chatA

Read the last messages of one chat: what the owner (or another agent) wrote and what the chat answered. chat is its title, words from its title, or its id.

Inputs: chat (required), last. Returns: result

search_chatsA

Search inside every one of the owner's chats (full history) for words or a regex, case-insensitive. Returns the matching chats, newest first, with title, state and up to two snippets.

Inputs: query (required), limit. Returns: result

start_chatA

Start a new Claude Code chat in a folder on this Mac (default the home folder), name it, add it to the Claude app sidebar, and hand it the owner's words. Returns within about 30 s with the link; the chat then works on the request, live in the Claude app when the relay chat is open there (docs/relay.md), otherwise in the background. The app stays on the chat the owner is looking at unless show_in_app is true. Check on it with read_chat or chat_status; continue it with message_chat. It starts in auto permission mode with the owner's settings.

Inputs: text (required), title (required), folder, show_in_app. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 12 tools

    Disambiguation4/5

    The set is cleanly split into two prefixed families (codex_* vs. chat tools), and within each family read/list/message/start target distinct actions. The only friction is structural symmetry: an agent must notice whether it is dealing with a Codex thread or a Claude chat, and search_chats exists only for Claude while Codex search is folded into codex_list_threads' query parameter.

    Naming Consistency4/5

    Most tools follow verb_noun (read_chat, message_chat, start_chat, list_chats, codex_read_thread), and the codex_ prefix is applied uniformly inside its family. Minor deviations are the noun_status form of chat_status/connector_status and the fact that Claude tools lack a domain prefix while Codex tools carry one.

    Tool Count5/5

    Twelve tools is well within a healthy range and each one earns its place: four Codex lifecycle tools, five Claude chat tools, and three supporting status/group tools. Nothing feels redundant or padded.

    Completeness3/5

    The core workflow (start, list, read, message, status, search for Claude chats) is covered, but lifecycle management is missing: no delete/archive/rename and no way to stop or interrupt a running chat or thread. The Codex side also lacks a dedicated search and status equivalent beyond connector_status, leaving some dead ends for an agent managing live sessions.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables voice assistants to start, monitor, message, and approve local Claude Code sessions on your computer, including sessions already open in a terminal. It exposes session management, recaps, approvals, and history search as MCP tools.
      8
      GPL 3.0
    • A
      license
      B
      quality
      B
      maintenance
      Exposes the Claude Code sessions on a Mac over a tunneled MCP endpoint so any MCP client can list and inspect them, send confirm-gated follow-ups, and launch, resume, or stop sessions while getting status and proof back. Mutating tools are registered only when the operator enables send, launch, or delivery permissions.
      7
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables other agents to list, read, start, and steer Codex chats in the macOS ChatGPT desktop app, including sending follow-ups, choosing model/reasoning/speed, interrupting work, and answering approvals. It can run locally or behind bearer-token-protected tunnels for remote monitoring and control.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude Code, Codex, and Antigravity to talk to each other directly through a local MCP message bus, coordinating discussions and code reviews without a human relaying messages between windows. Provides typed actions, peer-safe messaging, and per-host SQLite history.
      MIT