Skip to main content
Glama
nekobato

ChatGPT WebSearch MCP

by nekobato

ChatGPT WebSearch MCP

A local MCP stdio server that provides access to the OpenAI (ChatGPT) API for Claude Code and other MCP clients. Supports models with web search capabilities.


Usage

Claude Code

$ claude mcp add chatgpt-websearch \
	-s user \  # If you omit this line, it will be installed in the project scope
	-e OPENAI_API_KEY=your-api-key \
	-- npx @nekobato/chatgpt-websearch-mcp

Or configure in settings

{
  "mcpServers": {
    "chatgpt-websearch": {
      "command": "npx",
      "args": ["@nekobato/chatgpt-websearch-mcp"],
      "env": {
        "OPENAI_API_KEY": "your-api-key",
        ...
      },
    },
  },
}

Environment Variables

The following environment variables can be used to set default values:

  • OPENAI_API_KEY (required): Your OpenAI API key

  • OPENAI_DEFAULT_MODEL (optional): Default model to use (default: gpt-5)

  • REASONING_EFFORT (optional): Default reasoning effort level for reasoning models (minimal|low|medium|high)

  • SEARCH_CONTEXT_SIZE (optional): Default verbosity level (low|medium|high)

  • OPENAI_MAX_RETRIES (optional): Default maximum retry attempts (default: 3)

  • OPENAI_API_TIMEOUT (optional): Default API timeout in milliseconds. If not set, auto-adjusts based on effort level:

    • minimal/low: 60000 (1 minute)

    • medium: 120000 (2 minutes)

    • high: 300000 (5 minutes)

Related MCP server: MCP ChatGPT Responses

API

MCP Tools

  • ask_chatgpt: Send a prompt to ChatGPT and receive a response

    • prompt (required): The prompt to send

    • model (optional): The model to use (default: from OPENAI_DEFAULT_MODEL env var or gpt-5)

    • system (optional): System prompt to set context and behavior

    • temperature (optional): Temperature for response generation (0-2, default: 0.7) - Not available for reasoning models

    • effort (optional): Reasoning effort level (minimal|low|medium|high, default: from REASONING_EFFORT env var) - For reasoning models only

    • verbosity (optional): Output verbosity (low|medium|high, default: from SEARCH_CONTEXT_SIZE env var) - For reasoning models only

    • maxTokens (optional): Maximum output tokens

    • maxRetries (optional): Maximum API retry attempts (default: from OPENAI_MAX_RETRIES env var or 3)

    • timeoutMs (optional): Request timeout in milliseconds. Auto-adjusts based on effort level (high=300s, medium=120s, low/minimal=60s)

    • useStreaming (optional): Force streaming mode to prevent timeouts. Auto-enabled for medium/high effort reasoning models

Development

Requirements

  • Node.js 22+

  • An OpenAI API key in OPENAI_API_KEY

Commands

# Install dependencies
pnpm install

# Run in development mode
pnpm dev

# Build for production
pnpm build

# Run tests
pnpm test

# Lint code
pnpm lint

# Format code
pnpm format

License

MIT License

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    Enables integration with OpenAI models through the MCP protocol, supporting concise and detailed responses for use with Claude Desktop.
    1
    3
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    MCP ChatGPT Responses connects Claude to ChatGPT through two essential tools: standard queries for AI-to-AI conversations and web-enabled requests for current information. It uses OpenAI's Responses API to maintain conversation state automatically.
    18
  • F
    license
    C
    quality
    D
    maintenance
    Enables GPT-5 inference via OpenAI API with configurable reasoning effort, verbosity levels, and optional web search integration. Supports per-call parameter overrides for flexible AI model interactions through MCP.
    1
  • F
    license
    -
    quality
    -
    maintenance
    Enables Claude and other MCP-compatible tools to communicate with OpenAI's GPT models (GPT-5, GPT-5-mini, o3) with conversation history and session management. Features advanced controls like reasoning effort settings, token tracking, and parallel conversation sessions for efficient AI workflows.
    8

View all related MCP servers

Related MCP Connectors

  • Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nekobato/chatgpt-websearch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server