OpenAI Complete MCP Server

by aiamblichus

338 downloads Not rated yet MIT

About

The OpenAI Complete MCP Server is an MCP server that provides a clean interface for LLMs to use text completion capabilities through the MCP protocol. It acts as a bridge between an LLM client and any OpenAI-compatible API. The primary use case is for base models, as it does not…

Details

License
MIT

Explore

- Provides a single tool named "complete" for generating text completions
- Properly handles asynchronous processing to avoid blocking
- Implements timeout handling with graceful fallbacks
- Supports cancellation of ongoing requests

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name OpenAI Complete MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository


pnpm install

bash

docker run -it --rm \
-e OPENAI_API_KEY="your-api-key" \
-e OPENAI_MODEL="gpt-3.5-turbo-instruct" \
mcp-openai-complete


You can also use a .env file:

bash

prompt

(string, required): The text prompt to complete

max_tokens

(integer, optional): Maximum tokens to generate, default: 150

temperature

(number, optional): Controls randomness (0-1), default: 0.7

top_p

(number, optional): Controls diversity via nucleus sampling, default: 1.0

frequency_penalty

(number, optional): Decreases repetition of token sequences, default: 0.0

presence_penalty

(number, optional): Increases likelihood of talking about new topics, default: 0.0

- prompt (string, required): The text prompt to complete
- max_tokens (integer, optional): Maximum tokens to generate, default: 150
- temperature (number, optional): Controls randomness (0-1), default: 0.7
- top_p (number, optional): Controls diversity via nucleus sampling, default: 1.0
- frequency_penalty (number, optional): Decreases repetition of token sequences, default: 0.0
- presence_penalty (number, optional): Increases likelihood of talking about new topics, default: 0.0

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "openai complete mcp server": {
            "mcp-openai-complete": {
                "command": "docker",
                "args": [
                    "build",
                    "-t",
                    "mcp-openai-complete",
                    "."
                ]
            }
        }
    }
}

McpServers

{
    "mcp-openai-complete": {
        "command": "docker",
        "args": [
            "build",
            "-t",
            "mcp-openai-complete",
            "."
        ]
    }
}

An MCP (Model Context Protocol) server that provides a clean interface for LLMs to use text completion capabilities through the MCP protocol. This server acts as a bridge between an LLM client and any OpenAI's compatible API. The primary use case is for base models, as the server does not provide support for chat completions.

Features

- Provides a single tool named "complete" for generating text completions
- Properly handles asynchronous processing to avoid blocking
- Implements timeout handling with graceful fallbacks
- Supports cancellation of ongoing requests

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.