ChatGPT WebSearch MCP

ChatGPT WebSearch MCP

Provides access to OpenAI's ChatGPT API with web search capabilities for Claude and other MCP clients. Supports various GPT models with configurable parameters like reasoning effort, temperature, and streaming mode.

Category
Visit Server

README

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)

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured