Skip to main content

chatgpt-mcp

MCP server that automates the ChatGPT macOS desktop app. Access ChatGPT Pro features (o1, deep research, GPTs) from Claude Code or any MCP client — no API keys needed.

Forked from xncbf/chatgpt-mcp with significant fixes.

Why

ChatGPT Pro has models and features (o1 pro, deep research, custom GPTs) that aren't available via API. This server bridges the gap by automating the desktop app through AppleScript and the macOS accessibility tree.

Key differences from upstream

  • No focus stealing on reads — reads the AX tree without activating ChatGPT, so you can keep working while it polls for completion
  • Clipboard paste instead of per-character keystroke injection — instant, preserves formatting
  • Configurable polling — quick mode (5s poll, 60s timeout) for fast queries, deep mode (15min poll, 1h timeout) for o1/deep research
  • Text stability detection — fallback completion signal when the button heuristic misses (3 consecutive identical reads = done)
  • Subprocess timeouts — all AppleScript calls timeout after 30s instead of hanging forever

How it works

  1. Send: activates ChatGPT once, opens new conversation (Cmd+N) or navigates to an existing one, pastes prompt via clipboard
  2. Poll: reads the accessibility tree passively (no focus steal) looking for two completion signals:
    • Button heuristic: model selection button followed by voice/transcribe button = idle state
    • Text stability: conversation text unchanged for 3 consecutive reads
  3. Return: extracts all static text from the AX tree, cleans up UI artifacts, returns the response

Conversation management

  • List: reads the sidebar AX tree without activating ChatGPT — no focus steal
  • Navigate: activates ChatGPT once (clicking requires focus), clicks the matching sidebar item
  • Read: navigates to a conversation then reads its content via the existing passive reader

Install

pip install chatgpt-desktop-mcp

Or run without installing:

uvx chatgpt-desktop-mcp

The CLI entry point is chatgpt-mcp (both chatgpt-mcp and chatgpt-desktop-mcp work).

Configure with Claude Code

claude mcp add chatgpt -s user -- uvx chatgpt-desktop-mcp

Requirements

  • macOS (AppleScript + accessibility tree)
  • ChatGPT desktop app installed and logged in
  • Accessibility permission granted to your terminal (System Settings > Privacy & Security > Accessibility)

Tools

ask_chatgpt_tool

Send a prompt to ChatGPT and wait for the response. Opens a new conversation by default, or continues an existing one if conversation is specified.

Parameter Type Default Description
prompt str required The message to send
quick bool False True: 5s poll, 60s timeout. False: 15min poll, 1h timeout
conversation str "" Optional conversation title to continue (substring match, case-insensitive). If empty, starts a new conversation

get_chatgpt_response_tool

Read the current conversation without sending anything. Waits for completion using deep polling.

list_conversations_tool

List conversations from the ChatGPT sidebar without stealing focus. Returns numbered titles that can be used with read_conversation_tool or the conversation parameter of ask_chatgpt_tool.

read_conversation_tool

Navigate to an existing conversation by title and read its full content.

Parameter Type Default Description
conversation str required Title to match (substring, case-insensitive)

Activates ChatGPT once to click the sidebar item, then reads the conversation text.

Limitations

  • English-only button detection — the AppleScript checks for English button labels ("voice", "Transcribe", "model", "GPT"). Non-English ChatGPT UI will break completion detection.
  • Completion detection is heuristic — it works by reading button sequences and text stability, not an API signal. Edge cases exist.
  • Clipboard race window — there's a ~0.7s window during send where the clipboard contains your prompt. Restored afterwards.
  • macOS only — relies on AppleScript and the accessibility tree.
  • One conversation at a time — the desktop app has one active conversation. Concurrent sends will collide.

License

MIT

Metadata

Release files for chatgpt-desktop-mcp 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chatgpt-desktop-mcp 0.3.5
File Size Uploaded Provenance Actions
chatgpt_desktop_mcp-0.3.5.tar.gz 15.0 kB With provenance Details for chatgpt_desktop_mcp-0.3.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chatgpt-desktop-mcp 0.3.5
File Interpreter ABI Platform Actions
chatgpt_desktop_mcp-0.3.5-py3-none-any.whl Python 3 none any Details for chatgpt_desktop_mcp-0.3.5-py3-none-any.whl

Total release size: 30.7 kB

Release files / chatgpt_desktop_mcp-0.3.5.tar.gz

Download URL chatgpt_desktop_mcp-0.3.5.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fd065e99c09e247dfe98bdb577839120ab8d62ace6e8fd230f60ce6b10501c13
BLAKE2b-256 checksum
How to use checksums
f04989badf67faab481eda9c4f86083d7bd82bfa7ad25edab2b3edf1c1668ac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.

Transparency log

Release files / chatgpt_desktop_mcp-0.3.5-py3-none-any.whl

Download URL chatgpt_desktop_mcp-0.3.5-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d85d28a5b9da7eb855742984ca058540f370a4865664e9c744afdbb5c36e63b
BLAKE2b-256 checksum
How to use checksums
50fd4e7ebdeace4d8d899aedf443135a284b33347a53f52e15baaf124d70eded
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.

Transparency log

Security for chatgpt-desktop-mcp 0.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for chatgpt_desktop_mcp-0.3.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page