Skip to main content
Glama
xncbf
by xncbf
README.md
# ChatGPT MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to interact with the ChatGPT desktop app on macOS.

<a href="https://glama.ai/mcp/servers/@xncbf/chatgpt-mcp">
  <img width="380" height="200" src="https://glama.ai/mcp/servers/@xncbf/chatgpt-mcp/badge" alt="ChatGPT Server MCP server" />
</a>

https://github.com/user-attachments/assets/a30c9b34-cdbe-4c0e-a0b0-33eb5054db5c

## Language Support

**Supported system languages for response detection:**
- Korean
- English

**If your macOS system language is not listed above, please follow these instructions:**
1. Make sure ChatGPT desktop app is running
2. Run `show_all_button_names.applescript` and copy the output to create an issue for language support.

## Features

- Send prompts to ChatGPT from any MCP-compatible AI assistant
- Built with Python and FastMCP

**Note:** This server only supports English text input. Non-English characters may not work properly.

## Installation

### Prerequisites
- macOS
- ChatGPT desktop app installed and running
- Python 3.10+
- uv package manager

## For Claude Code Users

Simply run:
```bash
claude mcp add chatgpt-mcp uvx chatgpt-mcp
```

That's it! You can start using ChatGPT commands in Claude Code.

## For Other MCP Clients

### Step 1: Install the MCP Server

#### Option A: Install from PyPI (Recommended)
```bash
# Install with uv
uv add chatgpt-mcp
```

#### Option B: Manual Installation
```bash
# Clone the repository
git clone https://github.com/xncbf/chatgpt-mcp
cd chatgpt-mcp

# Install dependencies with uv
uv sync
```

### Step 2: Configure Your MCP Client

If installed from PyPI, add to your MCP client configuration:
```json
{
  "mcpServers": {
    "chatgpt": {
      "command": "uvx",
      "args": ["chatgpt-mcp"]
    }
  }
}
```

If manually installed, add to your MCP client configuration:
```json
{
  "mcpServers": {
    "chatgpt": {
      "command": "uv",
      "args": ["run", "chatgpt-mcp"],
      "cwd": "/path/to/chatgpt-mcp"
    }
  }
}
```

## Usage

1. **Open ChatGPT desktop app** and make sure it's running
2. **Open your MCP client** (Claude Code, etc.)
3. **Use ChatGPT commands** in your AI assistant:
   - "Send a message to ChatGPT"

The AI assistant will automatically use the appropriate MCP tools to interact with ChatGPT.

## Available Tools

### ask_chatgpt
Send a prompt to ChatGPT and receive the response.

```python
ask_chatgpt(prompt="Hello, ChatGPT!")
```

### get_chatgpt_response
Get the latest response from ChatGPT after sending a message.

```python
get_chatgpt_response()
```

### new_chatgpt_chat
Start a new chat conversation in ChatGPT.

```python
new_chatgpt_chat()
```

## Development

### Local Testing

To test the MCP server locally during development:

1. **Install in editable mode**
   ```bash
   uv pip install -e .
   ```

2. **Test with MCP Inspector**
   ```bash
   npx @modelcontextprotocol/inspector chatgpt-mcp
   ```

The editable installation creates a `chatgpt-mcp` command that directly references your source code, so any changes you make are immediately reflected without reinstalling.

### Running without installation

You can also run the server directly:
```bash
PYTHONPATH=. uv run python -m chatgpt_mcp.chatgpt_mcp
```

## License

MIT

TDQS

B3.3/5.0

Scored across 3 tools

Disambiguation2/5

The 'ask_chatgpt_tool' returns the response immediately, making 'get_chatgpt_response_tool' redundant and causing confusion about when to use each. 'new_chatgpt_chat_tool' is distinct but the overlap between the first two tools leads to ambiguity.

Naming Consistency4/5

All tools follow a snake_case pattern with a '_tool' suffix, maintaining consistency. However, the noun component varies (no noun in 'ask_chatgpt_tool', 'response' in 'get_chatgpt_response_tool', 'chat' in 'new_chatgpt_chat_tool'), which is a minor deviation.

Tool Count4/5

Three tools is a reasonable number for a basic ChatGPT interaction server. It covers sending a prompt, retrieving the latest response, and starting a new conversation without being overly minimal or excessive.

Completeness3/5

The set covers sending prompts and managing conversations at a basic level, but lacks tools for listing past conversations, adjusting model parameters, or deleting chats, which are notable gaps for a chatbot interface.

Maintenance

ActivityInactive
ResponsivenessNo issues