mcp-chatgpt
mcp-chatgpt
AI 어시스턴트(예: Google Antigravity, Claude Desktop, Cursor, VS Code Cline/Roo Code)가 브라우저 자동화, Chrome 프로필, 그리고 함께 제공되는 Chrome 확장 프로그램을 통해 ChatGPT Web(https://chatgpt.com)에 직접 질문하고 대화하며 상호작용할 수 있게 해주는 MCP(Model Context Protocol) 서버입니다.
🌟 주요 기능
💬 질문 및 채팅: ChatGPT Web에 원활하게 질문하고 응답(형식화된 텍스트/마크다운)을 받습니다.
🌐 웹 검색 토글: ChatGPT의 실시간 웹 검색(
web_search: true)을 활성화하여 실시간 웹 브라우징과 인용을 지원합니다.🧠 추론 및 모델 선택: 모델(
model: "o3-mini","gpt-4o","o1")을 선택하고 추론 노력(reasoning_effort: "high" | "medium" | "low")을 구성합니다.📎 파일 및 이미지 첨부: 멀티모달 분석을 위해 이미지(
image_paths)와 문서/코드(file_paths)를 첨부합니다.⏩ 자동 계속 생성: 긴 답변이 잘릴 경우 "Continue generating" / "สร้างต่อ"을 자동으로 클릭합니다.
💻 코드 추출:
extract_code_only: true로 코드 블록만 추출하여 반환합니다.👤 Chrome 프로필 선택기: 컴퓨터의 모든 Google Chrome 프로필(Default, Profile 1, Work, Personal, 이메일)을 자동 감지하여 대화할 계정을 선택할 수 있습니다.
🧩 함께 제공되는 Chrome 확장 프로그램:
extension/에 Manifest V3 확장 프로그램이 포함되어 있으며, 프로필 잠금 문제 없이 어떤 Chrome 프로필에든 로드하여 ChatGPT 탭과 실시간으로 대화할 수 있습니다.🔄 대화 관리: Conversation ID / URL을 사용하여 새 채팅을 시작하거나 기존 스레드를 이어갑니다.
💾 영구 세션: 브라우저 프로필과 로그인 쿠키를 로컬에 저장하여 한 번만 로그인하면 됩니다.
🖥️ 헤디드 및 헤드리스 모드: 백그라운드에서 조용히 실행하거나(헤드리스), 초기 인증이나 캡차 해결을 위해 보이는 창(
--login/--headed)을 실행합니다.🔌 Chrome CDP 지원:
--remote-debugging-port를 통해 이미 실행 중인 Google Chrome 인스턴스에 연결합니다.🧰 작업공간 도구: 크로스 플랫폼
shell_command와 루트 제한apply_patch도구로 파일 검색, 빌드/테스트 실행, 코드 편집을 할 수 있습니다.🌐 원격 MCP 터널: Cloudflare Tunnel/ngrok 또는 다른 HTTPS 터널용 Bearer 인증이 있는 선택적 Streamable HTTP 엔드포인트를 제공합니다.
Related MCP server: agentify-desktop
🛠️ 제공되는 MCP 도구
도구 | 매개변수 | 설명 |
|
| 구성된 루트 아래의 작업 디렉터리에서 명령을 실행합니다. Windows에서는 PowerShell을, Linux/macOS에서는 Bash를 자동 선택합니다. |
|
| 구조화된 패치를 사용하여 구성된 셸 루트 아래의 파일을 추가, 업데이트, 삭제 또는 이동합니다. |
|
| ChatGPT Web에 고급 컨트롤과 함께 프롬프트/질문을 보내고 어시스턴트 응답을 반환합니다. |
| 없음 | 현재 ChatGPT Web 페이지를 다시 로드하고 새로 고쳐 멈춤 상태나 연결 오류를 복구합니다. |
| 없음 | 이 계정에서 사용 가능한 모든 AI 모델(GPT-5.6 Sol, GPT-5.5, o3, GPT-4o, o1)과 추론 노력 옵션을 나열합니다. |
|
| ChatGPT 사이드바에서 최근 대화 주제와 ID를 직접 나열하여 채팅을 검색하거나 재개합니다. |
| 없음 | 이 컴퓨터에서 감지된 모든 Google Chrome 프로필을 프로필 ID, 이름, 이메일과 함께 나열합니다. |
|
| 활성 Chrome 프로필을 선택하고 전환합니다(ID |
| 없음 | ChatGPT Web에서 새 채팅 세션을 시작합니다. |
| 없음 | 브라우저 상태, 활성 프로필, 브리지 상태, 현재 URL, 활성 모델을 가져옵니다. |
|
| 로그인을 위해 ChatGPT Web을 보이는 브라우저 창에서 엽니다. |
🚀 빠른 시작
[!WARNING]
shell_command는 MCP 서버와 동일한 운영 체제 권한으로 임의의 명령을 실행할 수 있습니다.--shell-root는 선택 가능한 시작 작업 디렉터리를 제한하지만 OS 샌드박스는 아닙니다. 신뢰할 수 없는 클라이언트를 연결할 때는 제한된 사용자로 서버를 실행하거나 컨테이너에서 실행하세요.apply_patch는 변경된 모든 경로가--shell-root안에 유지되도록 강제합니다.
원격 MCP 터널
로컬 stdio가 기본값으로 유지됩니다. 원격 호환 MCP 엔드포인트를 노출하려면 토큰과 함께 HTTP 모드를 시작하세요:
mcp-chatgpt --http --http-token "change-this-token"엔드포인트는 http://127.0.0.1:8787/mcp입니다. 그 앞에 터널을 배치하세요. 예:
cloudflared tunnel --url http://127.0.0.1:8787원격 MCP 클라이언트를 /mcp로 끝나는 공개 터널 URL과 Authorization: Bearer change-this-token 헤더로 구성하세요. /healthz는 터널 상태 확인에 사용할 수 있습니다. 이 프로세스나 터널 중 하나라도 중지되면 원격 MCP 요청을 사용할 수 없습니다.
1. 설치 및 빌드
# Clone the repository
git clone https://github.com/JonusNattapong/mcp-chatgpt.git
cd mcp-chatgpt
# Install dependencies and Chromium
npm install
npx playwright install chromium
# Build TypeScript
npm run build
# Install the MCP command globally
npm install -g .설치 후 다음으로 확인하세요:
mcp-chatgpt --help이 패키지는 설치 중에 npm run build를 자동으로 실행하므로 로컬 체크아웃에서 설치하면 글로벌 명령이 항상 현재 TypeScript 소스를 사용합니다.
👤 Chrome 프로필 사용하기 (2가지 옵션)
옵션 1: Chrome 프로필 자동 감지 (직접 / 헤드리스)
폴더 이름(예: Default, Profile 1), 표시 이름 또는 이메일로 시스템의 모든 Chrome 프로필을 선택할 수 있습니다:
# List all Chrome profiles in your system
node -e "import('./dist/profile-manager.js').then(m => console.table(m.ProfileManager.listProfiles()))"
# Login with a specific profile
node dist/index.js --login --profile "Profile 1"또는 chatgpt_ask 도구에 profile 매개변수를 직접 전달하세요!
옵션 2: 동반 Chrome 확장 프로그램 (활성 Chrome 사용 시 권장)
이미 로그인된 ChatGPT 계정으로 Google Chrome을 매일 사용 중이라면 동반 확장 프로그램을 설치하세요:
원하는 프로필로 Google Chrome을 엽니다.
chrome://extensions로 이동합니다.개발자 모드(오른쪽 상단)를 활성화합니다.
압축해제된 확장 프로그램을 로드합니다를 클릭하고
d:\Projects\Github\mcp-chatgpt\extension폴더를 선택합니다.도구 모음에서 확장 프로그램 아이콘을 클릭하고 프로필 태그(예: "업무 계정")를 설정한 다음 저장 및 연결을 클릭합니다.
mcp-chatgpt가 실행되면 Chrome 탭을 통해 프롬프트를 직접 라우팅합니다!
⚙️ MCP 클라이언트 구성
Model Context Protocol(MCP)을 지원하는 모든 AI 클라이언트에 mcp-chatgpt를 연결할 수 있습니다:
1. Antigravity IDE / Gemini CLI
파일 위치: ~/.gemini/config/mcp_config.json (Windows: C:\Users\<User>\.gemini\config\mcp_config.json)
{
"mcpServers": {
"chatgpt": {
"command": "node",
"args": [
"d:/Projects/Github/mcp-chatgpt/dist/index.js"
]
}
}
}2. Claude Desktop
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"chatgpt": {
"command": "node",
"args": [
"d:/Projects/Github/mcp-chatgpt/dist/index.js"
]
}
}
}3. Cursor IDE
프로젝트의 .cursor/mcp.json에 추가하거나 Cursor 설정 > 기능 > MCP에서 추가하세요:
{
"mcpServers": {
"chatgpt": {
"command": "node",
"args": [
"d:/Projects/Github/mcp-chatgpt/dist/index.js"
]
}
}
}4. VS Code (Cline / Roo Code / Roo Clinic)
파일 위치:
Cline:
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.jsonRoo Code:
%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
{
"mcpServers": {
"chatgpt": {
"command": "node",
"args": [
"d:/Projects/Github/mcp-chatgpt/dist/index.js"
],
"disabled": false,
"autoApprove": []
}
}
}5. Windsurf Editor (Codeium)
파일 위치: ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"chatgpt": {
"command": "node",
"args": [
"d:/Projects/Github/mcp-chatgpt/dist/index.js"
]
}
}
}6. Zed Editor
~/.config/zed/settings.json에 추가하세요:
{
"context_servers": {
"chatgpt": {
"command": {
"path": "node",
"args": ["d:/Projects/Github/mcp-chatgpt/dist/index.js"]
}
}
}
}7. LibreChat (librechat.yaml)
librechat.yaml에 추가하세요:
mcpServers:
chatgpt:
type: stdio
command: node
args:
- d:/Projects/Github/mcp-chatgpt/dist/index.js8. Cloudflare Tunnel을 통한 원격 연결 (원격 URL / SSE / mcp-remote)
ChatGPT 브라우저 또는 브리지 서버가 홈 컴퓨터나 VPS에서 실행 중이고, 다른 머신/노트북의 AI 클라이언트가 Cloudflare Tunnel을 통해 인터넷을 거쳐 안전하게 연결하려는 경우:
A단계: 호스트 머신에서 브리지 서버 노출
# Start Cloudflare Quick Tunnel (Free, no account required)
cloudflared tunnel --url http://127.0.0.1:18999이렇게 하면 공개 HTTPS URL이 생성됩니다(예:
https://alpha-bravo-charlie.trycloudflare.com)
B단계: 원격 머신에서 클라이언트 구성
1. Antigravity / Gemini CLI (원격 SSE / URL)
~/.gemini/config/mcp_config.json에 추가하세요:
{
"mcpServers": {
"chatgpt-remote": {
"serverUrl": "https://alpha-bravo-charlie.trycloudflare.com/sse"
}
}
}2. Cursor IDE (원격 SSE)
.cursor/mcp.json 또는 Cursor 설정에 추가하세요:
{
"mcpServers": {
"chatgpt-remote": {
"url": "https://alpha-bravo-charlie.trycloudflare.com/sse"
}
}
}3. VS Code Cline / Roo Code (원격 SSE)
cline_mcp_settings.json에 추가하세요:
{
"mcpServers": {
"chatgpt-remote": {
"url": "https://alpha-bravo-charlie.trycloudflare.com/sse",
"type": "sse",
"disabled": false,
"autoApprove": []
}
}
}4. Claude Desktop / 모든 stdio 클라이언트 (mcp-remote 경유)
command(stdio)만 허용하는 클라이언트의 경우 mcp-remote를 사용하여 Cloudflare Tunnel URL을 브리지하세요:
{
"mcpServers": {
"chatgpt-remote": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://alpha-bravo-charlie.trycloudflare.com/sse"
]
}
}
}5. LibreChat (librechat.yaml)
mcpServers:
chatgpt-remote:
type: sse
url: https://alpha-bravo-charlie.trycloudflare.com/sse6. 직접 HTTP REST API (cURL / Python / Node.js)
Cloudflare를 통해 브리지 엔드포인트와 직접 상호 작용할 수도 있습니다:
# Query status
curl -s https://alpha-bravo-charlie.trycloudflare.com/status
# Ask a question
curl -X POST https://alpha-bravo-charlie.trycloudflare.com/ask \
-H "Content-Type: application/json" \
-d '{"message": "Hello from Cloudflare Tunnel!"}'📖 CLI 옵션
Usage: mcp-chatgpt [options]
Options:
--headed Run browser in headed (visible) mode (default: false)
--login Open browser in interactive mode to log in to ChatGPT
--profile <name_or_id> Select specific Chrome Profile (e.g. "Default", "Profile 1", or Name/Email)
--chrome Use installed Google Chrome browser (default: true)
--no-chrome Use Playwright bundled Chromium instead of Google Chrome
--user-data-dir <path> Custom browser profile directory
--cdp <endpoint> Connect to an existing Chrome browser via CDP endpoint
--bridge-port <port> Port for Chrome Extension bridge WebSocket (default: "18999")
--bridge-only Run only the Chrome Extension WebSocket bridge server
--shell-root <path> Restrict shell and patch tools to this directory (default: current directory)
--shell-max-timeout <ms> Maximum shell command timeout in milliseconds (default: "300000")
--http Expose an MCP Streamable HTTP endpoint for a tunnel/remote client
--http-host <host> HTTP bind host (default: "127.0.0.1")
--http-port <port> HTTP port for the MCP endpoint (default: "8787")
--http-token <token> Bearer token required by remote MCP clients (or MCP_HTTP_TOKEN)
--timeout <ms> Default timeout in milliseconds (default: "120000")
-h, --help Display help for command🌟 라이브 대화형 메모리 및 컨텍스트 유지 데모
다음은 mcp-chatgpt를 통해 실시간으로 실행된 실제 편집되지 않은 다중 턴 대화형 세션입니다:
턴 1: 새 세션에서 컨텍스트 설정 (new_chat: true)
요청:
{
"message": "สวัสดีครับ ผมชื่อ โจ๊กเกอร์ เป็น Software Architect ชอบเขียน Go และ TypeScript กำลังพัฒนาโปรเจกต์ชื่อ MCP-ChatGPT ฝากจำข้อมูลนี้ไว้หน่อยนะครับ ตอบสั้นๆ 1 ประโยคยืนยัน",
"new_chat": true
}ChatGPT 응답:
"จำไว้แล้วครับ: คุณชื่อโจ๊กเกอร์ เป็น Software Architect ชอบ Go และ TypeScript และกำลังพัฒนาโปรเจกต์ MCP-ChatGPT ครับ"
URL:
https://chatgpt.com/c/6a86843c-8f30-83ec-b064-d27f7f832244
턴 2: 후속 메모리 회상 (conversation_id)
요청:
{
"message": "ไหนลองทบทวนดูซิว่า ผมชื่ออะไร ชอบเขียนภาษาอะไร และกำลังทำโปรเจกต์ชื่ออะไรอยู่?",
"conversation_id": "6a86843c-8f30-83ec-b064-d27f7f832244"
}ChatGPT 응답 (6초 만에 회상):
"คุณชื่อ โจ๊กเกอร์ ชอบเขียน Go และ TypeScript และกำลังพัฒนาโปรเจกต์ชื่อ MCP-ChatGPT อยู่ครับ 🫡"
🤖 AI 어시스턴트 시스템 프롬프트 및 통합 지침
다음 지침을 복사하여 AI 어시스턴트(Cursor Rules, Claude System Prompt, Antigravity Custom Instructions, Cline, Roo Code)에 붙여넣으면 AI가 mcp-chatgpt를 호출해야 하는 시기와 방법을 자동으로 알 수 있습니다:
# 🛠️ Instruction: Setup and Integrate `mcp-chatgpt` MCP Server
You are integrated with the `mcp-chatgpt` MCP server, granting you direct access to ChatGPT Web capabilities (o3-mini, o1, GPT-4o, live Web Search, DALL-E, and multimodal file analysis).
### 🎯 When to Automatically Use `chatgpt_ask`:
1. **Deep Reasoning & Hard Coding Tasks**:
- For complex architecture designs, difficult debugging, or advanced algorithms, call `chatgpt_ask` with:
`{ "model": "o3-mini", "reasoning_effort": "high", "extract_code_only": true }`
2. **Live Web Information & Current News**:
- When the user asks for up-to-date news, today's market data, or the latest documentation of newly updated packages, call:
`{ "web_search": true }`
3. **Image Generation (DALL-E 3)**:
- When the user requests an image, logo, or icon design, request it via `chatgpt_ask` and present the returned `imageUrls` directly to the user.
4. **Heavy Document & File Analysis**:
- When analyzing CSV, Excel spreadsheets, PDFs, or large source code files, attach them via `file_paths` or `image_paths`.
5. **Continuous Conversations**:
- Always track and pass `conversation_id` to continue in the same thread, or pass `new_chat: true` when starting an unrelated topic.
6. **Finding Past Chats**:
- Call `chatgpt_list_conversations` to search for existing topic IDs before resuming a specific past conversation.📄 라이선스
MIT
Available Tools
12 toolsapply_patchA
Safely add, update, delete, or move files inside the configured shell root using an *** Begin Patch / *** End Patch patch. Prefer this over shell redirection for code edits.
Inputs: patch (required).
chatgpt_askB
Send a question or prompt to ChatGPT Web (chatgpt.com) and get the assistant response. Supports Web Search, o1/o3-mini reasoning, model selection, code extraction, image/file attachments, and Chrome profiles.
Inputs: message (required), model, profile, new_chat, +9 more.
chatgpt_get_latest_responseA
Fetch and recover the latest assistant response (including text, code blocks, and images) from the current or specified conversation without asking a new question. Useful after recovering from a timeout or reload.
Inputs: refresh_first, conversation_id.
chatgpt_get_statusA
Get the current status of ChatGPT Web automation (initialized, logged in, active profile, extension bridge status, current conversation URL, title, model).
Inputs: no named parameters.
chatgpt_list_conversationsA
List recent conversation history topics and IDs from the ChatGPT sidebar so you can select and resume any previous chat.
Inputs: limit.
chatgpt_list_modelsA
List all available AI models (e.g. GPT-5.6 Sol, GPT-5.5, o3, gpt-4o, o1) and reasoning effort options for this ChatGPT account.
Inputs: no named parameters.
chatgpt_list_profilesA
List all detected Google Chrome profiles available on this machine (including Profile Folder ID, Display Name, Email).
Inputs: no named parameters.
chatgpt_loginA
Open ChatGPT Web in a visible (headed) browser window so the user can log in or solve Captcha challenges.
Inputs: profile.
chatgpt_new_chatA
Start a clean/new conversation on ChatGPT Web.
Inputs: no named parameters.
chatgpt_reloadA
Reload and refresh the current ChatGPT Web page to fix stuck conversations or connection glitches.
Inputs: no named parameters.
chatgpt_select_profileA
Select which Chrome profile to use for ChatGPT Web automation (by Profile Folder ID, Display Name, or Email).
Inputs: profile (required).
shell_commandA
Run a command with a working directory inside the configured shell root. Uses PowerShell on Windows and Bash on Linux/macOS by default. The command has the same OS permissions as this MCP server.
Inputs: command (required), shell, workdir, timeout_ms.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
The ChatGPT tools mostly map to distinct lifecycle stages, such as selecting a profile, asking a question, reloading the page, and fetching status. The main potential confusions are shell_command vs apply_patch for file operations and chatgpt_ask vs chatgpt_get_latest_response for retrieving assistant output, though the descriptions provide reasonable separation.
The 10 chatgpt_* tools consistently use a readable, mostly verb-first style with a common prefix. Two tools, shell_command and apply_patch, break away from the chatgpt_ prefix and use different naming conventions, which makes the overall set slightly inconsistent.
With 12 tools, the count is reasonable, and most tools are clearly relevant to ChatGPT Web automation. The shell_command and apply_patch pair broadens the server beyond ChatGPT-specific tasks, feeling slightly like an additional generic toolkit rather than a core part of the same domain.
The core ChatGPT Web workflow is covered well: profile selection, login/status, starting a chat, asking questions, recovering responses, listing conversations, listing models, and reloading. Obvious gaps are conversation management actions such as delete or rename, and there is no explicit tool name for select/resume a previous conversation, though this may be handled through parameters in ask or get_latest_response.
Related MCP Connectors
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn MCP Server that enables AI assistants to interact with your local browsers.56MIT

agentify-desktopofficial
AlicenseNot gradedqualityDmaintenanceMCP server that enables AI tools to control local browser sessions for ChatGPT, Claude, and other AI services, supporting querying, navigation, file uploads, and artifact management.572Mozilla Public 2.0- AlicenseAqualityDmaintenanceA MCP server that gives AI assistants full browser control, enabling navigation, clicking, form filling, and screenshots via any MCP client.8MIT
- AlicenseBqualityFmaintenanceMCP server that drives chatgpt.com via web UI automation using a session token, enabling long-running tasks, deep research, and image generation.9113 npm2MIT