Skip to main content
Glama
lie5860

openai-search-mcp

by lie5860

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DEBUGNoDebug modefalse
FETCH_ENGINENoDefault fetch engine when fetch_engine is not passedllm
OPENAI_MODELNoModel identifiergpt-4o
OPENAI_API_KEYYesAPI key for your endpoint
OPENAI_API_URLYesOpenAI-compatible API endpoint (must support search)
TAVILY_API_KEYNoTavily API key (for web_fetch with fetch_engine=tavily)
TAVILY_API_URLNoTavily API base URLhttps://api.tavily.com
OPENAI_LOG_LEVELNoLog levelINFO
FIRECRAWL_API_KEYNoFirecrawl API key (when using firecrawl as default or per call)
FIRECRAWL_API_URLNoFirecrawl API base URLhttps://api.firecrawl.dev/v2

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
web_searchA

Performs a third-party web search based on the given query and returns the results as a JSON string.

The query should be a clear, self-contained natural-language search query. When helpful, include constraints such as topic, time range, language, or domain.

The platform should be the platforms which you should focus on searching, such as "Twitter", "GitHub", "Reddit", etc.

The min_results and max_results should be the minimum and maximum number of results to return.

Returns

A JSON-encoded string representing a list of search results. Each result includes at least:

  • url: the link to the result

  • title: a short title

  • summary: a brief description or snippet of the page content.

web_fetchA

Fetches and extracts the complete content from a specified URL and returns it as a structured Markdown document.

The url should be a valid HTTP/HTTPS web address pointing to the target page. Ensure the URL is complete and accessible (not behind authentication or paywalls).

fetch_engine (optional): Which engine to use. When omitted, the server uses the FETCH_ENGINE env (default llm). llm = OpenAI-compatible model; tavily / firecrawl = dedicated crawl (set TAVILY_API_KEY or FIRECRAWL_API_KEY).

Returns

A Markdown-formatted string containing:

  • Metadata header (source URL, title, fetch timestamp)

  • Table of Contents (if applicable)

  • Complete page content with preserved structure

  • All text, links, images, tables, and code blocks from the original page

Notes

  • Does NOT summarize or modify content - returns complete original text

  • tavily / firecrawl perform real HTTP fetch and handle anti-bot; llm depends on the model's browse capability.

get_config_infoA

Returns the current OpenAI Search MCP server configuration information and tests the connection.

This tool is useful for:

  • Verifying that environment variables are correctly configured

  • Testing API connectivity by sending a request to /models endpoint

  • Debugging configuration issues

  • Checking the current API endpoint and settings

Returns

A JSON-encoded string containing configuration details:

  • api_url: The configured OpenAI-compatible API endpoint

  • api_key: The API key (masked for security, showing only first and last 4 characters)

  • model: The currently selected model for search and fetch operations

  • debug_enabled: Whether debug mode is enabled

  • log_level: Current logging level

  • log_dir: Directory where logs are stored

  • config_status: Overall configuration status (✅ complete or ❌ error)

  • connection_test: Result of testing API connectivity to /models endpoint

    • status: Connection status

    • message: Status message with model count

    • response_time_ms: API response time in milliseconds

    • available_models: List of available model IDs (only present on successful connection)

Notes

  • API keys are automatically masked for security

  • This tool does not require any parameters

  • Useful for troubleshooting before making actual search requests

  • Automatically tests API connectivity during execution

switch_modelA

Switches the default AI model used for search and fetch operations, and persists the setting.

This tool is useful for:

  • Changing the AI model used for web search and content fetching

  • Testing different models for performance or quality comparison

  • Persisting model preference across sessions

Parameters

model : str The model ID to switch to (e.g., "gpt-4o", "gpt-4o-mini")

Returns

A JSON-encoded string containing:

  • status: Success or error status

  • previous_model: The model that was being used before

  • current_model: The newly selected model

  • message: Status message

  • config_file: Path where the model preference is saved

Notes

  • The model setting is persisted to ~/.config/openai-search/config.json

  • This setting will be used for all future search and fetch operations

  • You can verify available models using the get_config_info tool

toggle_builtin_toolsA

Toggle Claude Code's built-in WebSearch and WebFetch tools on/off.

Parameters: action - "on" (block built-in), "off" (allow built-in), "status" (check) Returns: JSON with current status and deny list

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/lie5860/openai-search-mcp'

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