# Longai MCP

> Longai MCP is an open-source MCP server for design and media. MCP server giving AI clients one key to 109 marketplace-priced text, image and video. It is available on CLI, API, Linux, macOS and Windows.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Linux, macOS, Windows
- **Repository:** https://github.com/dijinlong/longai-mcp
- **MCP Registry name:** io.github.Dijinlong/longai-mcp
- **Categories:** [design and media](https://ai-powered.com/categories/design-and-media), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-11-27

## About

Longai MCP is a small stdio server that lets an MCP-compatible assistant call models through the LONG AI gateway. Instead of holding separate accounts with several providers, a developer sets one API key and the server forwards chat requests to the gateway and returns the assistant reply.

The gateway is a marketplace where independent sellers list their own compute and set their own prices, so the same model may be offered at different rates. The server exposes a chat tool for sending OpenAI-style completions and a list_models tool that shows what is currently available. It speaks JSON-RPC 2.0 over stdio and can be run directly with Python or in a Docker container.

It suits developers who already use Claude Desktop or another stdio MCP client and want to reach many models from a single configuration. Because the gateway is OpenAI-compatible, the same base URL also works with ordinary OpenAI-style client code.

## Features

- **Single key access:** One API key unlocks the gateway's catalogue of text, image and video models.
- **Model listing:** A list_models tool shows which models the gateway currently offers.
- **Chat completions:** A chat tool forwards OpenAI-style messages and returns the assistant response.
- **Stdio transport:** Runs over JSON-RPC 2.0 on stdin and stdout, so any stdio-capable MCP client can launch it.
- **Dependency-free build:** The server is plain Python 3.9+ with no packages to install, and ships with a Dockerfile.
- **OpenAI-compatible base URL:** The same gateway endpoint can be used by standard OpenAI-style clients.

## Good for

- Connect Claude Desktop to multiple hosted language models using one key
- Compare response quality across models from a single MCP configuration
- Route chat requests to lower-cost seller listings on a compute marketplace
- Run an MCP model bridge inside a Docker container for an agent pipeline

## Tools

From the tool list in its README, going by the names, 1 of 2 tools reads data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `chat`: Sends an OpenAI-style chat completion through the LONG AI gateway and returns the assistant message
- `list_models` (name suggests: reads): Lists the models currently listed on the gateway

## FAQ

### What tools does the server expose?

It exposes two tools: chat, which sends an OpenAI-style chat completion and returns the assistant message, and list_models, which lists the models currently on the gateway.

### What do I need to configure Longai MCP?

Set the LONGAI_API_KEY environment variable. LONGAI_BASE_URL is optional and defaults to the LONG AI gateway address.

### How is Longai MCP licensed?

The repository is released under the MIT license.

### Is Longai MCP free?

Yes. Longai MCP is open source, so you can use and self-host it for free.

### What are the best alternatives to Longai MCP?

The closest alternatives to Longai MCP are uplinkswitch, MCP Llm Gateway, Proxyllm MCP, 370.ai — AI Gateway: 100+ Chat Models, Image & Speech Generation and legit2compute.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.

## Alternatives

- [uplinkswitch](https://ai-powered.com/mcp/uplinkswitch-2): uplinkswitch is a paid MCP server for design and media.
- [MCP Llm Gateway](https://ai-powered.com/mcp/mcp-llm-gateway): MCP Llm Gateway is an open-source MCP server for ai models and llm tooling.
- [Proxyllm MCP](https://ai-powered.com/mcp/proxyllm-mcp): Proxyllm MCP is a paid MCP server for ai models and llm tooling.
- [370.ai — AI Gateway: 100+ Chat Models, Image & Speech Generation](https://ai-powered.com/mcp/370-ai-ai-gateway-100-chat-models-image-and-speech-generatio): 370.ai — AI Gateway: 100+ Chat Models, Image & Speech Generation is an MCP server for design and media.
- [legit2compute](https://ai-powered.com/mcp/legit2compute): legit2compute is a paid MCP server for design and media.
- [SinoGate MCP Server](https://ai-powered.com/mcp/sinogate-mcp-server): SinoGate MCP Server is an MCP server for ai models and llm tooling.
- [Korpi API](https://ai-powered.com/mcp/korpi-api): Korpi API is a paid MCP server for design and media.
- [Hubris](https://ai-powered.com/mcp/hubris): Hubris is a paid MCP server for ai models and llm tooling.

---
Source: https://ai-powered.com/mcp/longai-mcp
