1.0.0 • Published 4 months ago

openai-websearch-mcp-server v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

OpenAI Web Search MCP Server

A TypeScript implementation of an MCP server that provides web search functionality using OpenAI's web search preview feature.

Installation

You can run this package directly using npx:

npx openai-websearch-mcp-server

Or install it globally:

npm install -g openai-websearch-mcp-server

Usage

  1. Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY='your-api-key-here'
  1. Run the server:
openai-websearch-mcp

By default, the server runs on port 3000. You can change this by setting the PORT environment variable:

PORT=8080 openai-websearch-mcp

API

The server provides a web search tool that can be used through the MCP protocol. The tool is named web_search and accepts a query string as input.

Development

To set up the development environment:

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev

Building

To build the package:

npm run build

License

MIT