Skip to content

vivian254338489/openai-compatible-mcp-server

Repository files navigation

OpenAI-Compatible MCP Server

Provider-neutral MCP server for OpenAI-compatible endpoint diagnostics, base_url testing, and AI agent compatibility checks.

This project helps agents and developers answer a simple question before wiring a provider into production: does this OpenAI-compatible endpoint behave enough like the OpenAI API for common agent workflows?

TKEN is included as one disclosed example endpoint: https://www.tken.shop/v1. Try it from the docs CTA: TKEN OpenAI-compatible endpoint.

Why This Exists

Searches like MCP OpenAI-compatible server, MCP base_url tester, AI agent endpoint diagnostics, and OpenAI-compatible model checker usually end in custom curl snippets. This repo wraps those checks in MCP tools so an AI agent can inspect an endpoint, list models, run small smoke tests, and produce a compatibility report.

Tools

  • endpoint_info: validates and explains a provider base URL.
  • list_models_check: checks GET /models.
  • chat_completion_smoke_test: checks POST /chat/completions.
  • embeddings_smoke_test: checks POST /embeddings.
  • compatibility_report: combines all checks into one report.

All tools are safe by default. Without an API key, they run in offline mock mode and show the request shape without sending network requests.

Quick Start

npm install
npm run build
node dist/cli.js compatibility_report --base-url https://www.tken.shop/v1

Run as an MCP stdio server:

npm start

Example MCP client config:

{
  "mcpServers": {
    "openai-compatible-diagnostics": {
      "command": "node",
      "args": ["C:/path/to/openai-compatible-mcp-server/dist/server.js"],
      "env": {
        "OPENAI_COMPAT_BASE_URL": "https://www.tken.shop/v1"
      }
    }
  }
}

For live checks, set an API key in your MCP client environment or pass apiKey in the tool input.

Agent Use Cases

  • Check an unfamiliar OpenAI-compatible base_url before adding it to a coding agent.
  • Give Claude Desktop, Codex, Cursor-like tools, and local MCP clients a repeatable endpoint diagnostic tool.
  • Compare model-list, chat, and embeddings support without exposing secrets in prompts.
  • Generate a short compatibility report before routing an agent workflow to a new provider.

Keywords

MCP OpenAI-compatible server, Model Context Protocol, OpenAI-compatible base_url tester, AI agent endpoint diagnostics, coding agent tools, model list checker, chat completions smoke test, embeddings compatibility report.

Safety

  • No API key is required for offline diagnostics.
  • Live checks send only tiny probes.
  • The repo includes scripts/scan-secrets.js and a required .env.example.
  • Do not commit .env files or provider keys.

Documentation

License

MIT

About

Provider-neutral MCP server for OpenAI-compatible endpoint diagnostics, base_url testing, and AI agent compatibility reports.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors