LONG AI MCP Server
Provides tools for interacting with OpenAI-compatible APIs, including the official OpenAI API: list available models, run non-streaming chat completions with usage reporting, and check endpoint compatibility.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
LONG AI MCP Server
把 LONG AI 的 OpenAI 兼容网关包成一个 MCP server,让 Claude Desktop / Cursor / Cline 这类客户端可以直接:
列模型 (
list_models)跑一次对话并看
usage(chat)体检任意 OpenAI 兼容网关是否真的兼容 (
check_compatibility)
同时它也是个可复用的 MCP 客户端脚手架——代码里没有 SDK 依赖、没有 openai 包,所有请求都是标准库直打 HTTP,改两行就能指向你自己的网关。
为什么不是又一个 chat wrapper
大多数 "LLM MCP server" 只做一件事:把 prompt 转发出去。这个多做两件事:
把
usage原样带回来。MCP 让模型自己调模型,很容易忽略计费;usage出现在工具返回值里,调用方就能看见 token 消耗。check_compatibility。中转型网关在中转过程中会静默丢语义(丢tools、流里没有[DONE]、不存在的模型返回 200 + error)。这个 tool 用 4 个请求把这几件事变成一行FAIL,而不是线上故障。
Related MCP server: mcp-computeflux
安装
pip install "mcp>=1.2"
git clone https://github.com/Dijinlong/longai-mcp-server.git
cd longai-mcp-server配置
Claude Desktop (claude_desktop_config.json) 或 Cursor (.cursor/mcp.json):
{
"mcpServers": {
"longai": {
"command": "python",
"args": ["/absolute/path/to/server.py"],
"env": {
"LONGAI_API_KEY": "sk-your-key",
"LONGAI_BASE_URL": "https://ai.dijinlong.com/v1"
}
}
}
}LONGAI_BASE_URL 换成任何 OpenAI 兼容地址都能用,包括官方 https://api.openai.com/v1——这时它就是一把通用的"兼容性探针"。
工具说明
Tool | 参数 | 作用 |
| — | 返回网关当前上架的模型 id 列表,用来确认模型名对不对 |
|
| 发一次非流式请求,返回正文 + |
|
| 4 项体检:鉴权/清单、非流式、流式 |
输出示例
1. GET /models 200 182ms, models=77
2. POST chat (no stream) 200 940ms usage={'prompt_tokens': 12, 'completion_tokens': 3, 'total_tokens': 15}
3. POST chat (stream) 200 310ms [DONE]=yes
4. POST unknown model 404 96ms 错误形状正常
----------------------------------------------
PASS安全提示
key 只从环境变量读,不写进配置文件、不打日志。
chat不落盘任何 prompt 内容。这个 server 只做转发与探针,不缓存请求、不代理第三方密钥。
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Chat, image, video, and audio models from many vendors behind one remote MCP server and one key.
OpenAI-compatible BYOK LLM gateway: per-task routing, shadow evaluation, promotion gates.
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables LLM chat with routing and failover, balance checking, and model listing via MCP.3-
- AlicenseAqualityBmaintenanceExposes an OpenAI-compatible inference endpoint to MCP hosts, enabling them to list available models and run non-streaming chat completions as tools.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to check ChatGPT connection status, list live models, and run prompts using a ChatGPT Plus/Pro plan via OpenAI's official OAuth and Responses API.1Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to discover and inspect available open models, estimate token costs, and run chat completions through an OpenAI-compatible inference endpoint, with optional bearer-key authentication for billed calls.Apache 2.0