Dijinlong

longai-mcp

Community Dijinlong
Updated

MCP server for LONG AI: OpenAI-compatible gateway exposing 109 text, image and video models through one key.

longai-mcp

A dependency-free Model Context Protocol server that proxies LONG AI โ€” an AI compute marketplace with an OpenAI-compatible API gateway. One API key gives access to 109 live text, image and video models listed by independent sellers, typically 50โ€“95% below official list price.

Tools

Tool What it does
chat Sends an OpenAI-style chat completion through the LONG AI gateway and returns the assistant message
list_models Lists the models currently listed on the gateway

Install

No packages needed. Python 3.9+.

git clone https://github.com/Dijinlong/longai-mcp.git
cd longai-mcp

Configure

Set two environment variables:

export LONGAI_API_KEY="your-key"
export LONGAI_BASE_URL="https://ai.dijinlong.com/v1"   # optional, this is the default

The gateway is OpenAI-compatible, so any OpenAI-style client works against the same base URL.

Run with Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "longai": {
      "command": "python",
      "args": ["/absolute/path/to/longai-mcp/server.py"],
      "env": { "LONGAI_API_KEY": "your-key" }
    }
  }
}

Run with Docker

docker build -t longai-mcp .
docker run -i --rm -e LONGAI_API_KEY=your-key longai-mcp

The container reads JSON-RPC from stdin and writes responses to stdout, so it plugs into any MCP client that supports a stdio command.

Run with any stdio MCP client

LONGAI_API_KEY=your-key python server.py

Speaks JSON-RPC 2.0 over stdio, supports initialize, tools/list and tools/call.

Example tool call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chat",
    "arguments": {
      "model": "gpt-4o-mini",
      "messages": [{ "role": "user", "content": "Explain what an API gateway does in one sentence." }]
    }
  }
}

Why a marketplace gateway

Most gateways resell at a fixed markup. LONG AI is a marketplace: sellers list their own compute and set their own price, so the same model can cost materially less than the official list price, and you can route to the cheapest seller that is healthy right now.

License

MIT

MCP Server ยท Populars

MCP Server ยท New

    PanStudio

    ZulipChat MCP Server

    ZulipChat MCP Server - A Model Context Protocol server that bridges AI agents with Zulip Chat. Built with FastMCP for lightning-fast performance, featuring comprehensive chat management and intelligent summarization. Transform your Zulip workspace into an AI-powered collaboration hub!

    Community PanStudio
    United-Compute

    GPU Price Tracker: open data

    This project tracks the market prices and performance metrics of various GPUs.

    Community United-Compute
    Graphify-Labs

    graphify

    Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

    Community Graphify-Labs
    superdesigndev

    Treg (OpenRouter for Tools)

    OpenRouter for agent tools. Join community here: https://discord.gg/6mQYYfFMAn

    Community superdesigndev