Unla

MCP Gateway: Transforms existing APIs into MCP servers with zero code. Dockerized, easy deployment & management.

1,413
105
# Unla - MCP Gateway

> ๐Ÿš€ Instantly transform your existing APIs and services into [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) endpoints โ€” without changing a line of code.

[![English](https://img.shields.io/badge/English-Click-yellow)](./README.md)
[![็ฎ€ไฝ“ไธญๆ–‡](https://img.shields.io/badge/็ฎ€ไฝ“ไธญๆ–‡-็‚นๅ‡ปๆŸฅ็œ‹-orange)](docs/README.zh-CN.md)
[![Release](https://img.shields.io/github/v/release/mcp-ecosystem/mcp-gateway)](https://github.com/amoylab/unla/releases)
[![Docs](https://img.shields.io/badge/Docs-View%20Online-blue)](https://mcp.ifuryst.com)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/mcp-ecosystem/mcp-gateway)
[![Discord](https://img.shields.io/badge/Discord-Join%20our%20Discord-5865F2?logo=discord&logoColor=white)](https://discord.gg/udf69cT9TY)
[![Go Report Card](https://goreportcard.com/badge/github.com/amoylab/unla)](https://goreportcard.com/report/github.com/amoylab/unla)
[![Snyk Security](https://img.shields.io/badge/Snyk-Secure-blueviolet?logo=snyk)](https://snyk.io/test/github/mcp-ecosystem/mcp-gateway)

---

## ๐Ÿ“ข Support Us on Product Hunt

We've launched **MCP Gateway** on Product Hunt! ๐Ÿš€ If you find this project valuable, please show your support with an upvote. Every vote helps more developers discover Unla! โค๏ธ

<a href="https://www.producthunt.com/posts/mcp-gateway?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-mcp&#0045;gateway" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=958310&theme=light&t=1745767484477" alt="MCP&#0032;Gateway - Turn&#0032;APIs&#0032;into&#0032;MCP&#0032;endpoints&#0044;without&#0032;changing&#0032;a&#0032;line&#0032;of&#0032;code | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>

---

> โš ๏ธ **Important**: Unla is under active development. While we aim for backward compatibility, it's not always guaranteed.  Carefully review version changes before upgrading. Documentation may sometimes lag behind the latest features. For assistance, please use our [Discord](https://discord.gg/udf69cT9TY) or [GitHub Issues](https://github.com/amoylab/unla/issues). โค๏ธ

---

## โœจ What is Unla?

**Unla** is a lightweight, high-availability gateway service built in Go, designed to simplify the adoption of the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/).  It allows you to expose existing APIs and services as MCP-compliant endpoints through configuration, requiring **zero code modifications**.

![Unla Architecture](https://github.com/user-attachments/assets/69480eda-7aa7-4be7-9bc7-cae57fe16c54)

### ๐Ÿ”ง Core Design Principles

*   **โœ… Zero Intrusion:** Platform-agnostic deployment on bare metal, VMs, ECS, Kubernetes, etc., without altering existing infrastructure.
*   **๐Ÿ”„ Configuration-Driven:** Convert legacy APIs to MCP Servers using YAML configuration โ€“ no coding needed.
*   **๐Ÿชถ Lightweight & Efficient:** Optimized for minimal resource usage without sacrificing performance or availability.
*   **๐Ÿงญ Built-in Management UI:** User-friendly web interface for simplified setup and reduced operational overhead.

---

## ๐Ÿš€ Getting Started

Unla offers a ready-to-run Docker deployment for quick setup. Detailed deployment and configuration instructions are available in the [documentation](https://mcp.ifuryst.com/getting-started/quick-start).

### Quick Launch with Docker

1.  **Configure Environment Variables:**

    ```bash
    export OPENAI_API_KEY="sk-eed837fb0b4a62ee69abc29a983492b7PlsChangeMe"
    export OPENAI_MODEL="gpt-4o-mini"
    export APISERVER_JWT_SECRET_KEY="fec6d38f73d4211318e7c85617f0e333PlsChangeMe"
    export SUPER_ADMIN_USERNAME="admin"
    export SUPER_ADMIN_PASSWORD="297df52fbc321ebf7198d497fe1c9206PlsChangeMe"
    ```

    **Important:** Replace the placeholder values with your actual credentials.

2.  **Launch the Container:**

    ```bash
    docker run -d \
      --name unla \
      -p 8080:80 \
      -p 5234:5234 \
      -p 5235:5235 \
      -p 5335:5335 \
      -p 5236:5236 \
      -e ENV=production \
      -e TZ=Asia/Shanghai \
      -e OPENAI_API_KEY=${OPENAI_API_KEY} \
      -e OPENAI_MODEL=${OPENAI_MODEL} \
      -e APISERVER_JWT_SECRET_KEY=${APISERVER_JWT_SECRET_KEY} \
      -e SUPER_ADMIN_USERNAME=${SUPER_ADMIN_USERNAME} \
      -e SUPER_ADMIN_PASSWORD=${SUPER_ADMIN_PASSWORD} \
      --restart unless-stopped \
      ghcr.io/amoylab/unla/allinone:latest
    ```

### Access and Configuration

1.  **Access the Web Interface:**
    *   Open `http://localhost:8080/` in your browser.
    *   Log in using the administrator credentials you configured.

2.  **Add an MCP Server:**
    *   Copy the configuration from: [https://github.com/amoylab/unla/blob/main/configs/proxy-mock-server.yaml](https://github.com/amoylab/unla/blob/main/configs/proxy-mock-server.yaml)
    *   Click "Add MCP Server" in the web interface.
    *   Paste the configuration and save.

### Available MCP Endpoints

After configuration, the following MCP endpoints will be available:

*   **MCP SSE:** `http://localhost:5235/mcp/user/sse`
*   **MCP SSE Message:** `http://localhost:5235/mcp/user/message`
*   **MCP Streamable HTTP:** `http://localhost:5235/mcp/user/mcp`

Configure your MCP Client to use the `/sse` or `/mcp` suffix URLs to interact with the service.

### Testing

You can test the service using:

1.  The built-in MCP Chat page in the web interface.
2.  Your own MCP Client (**recommended**). This allows for more comprehensive testing and integration with your specific use cases.

๐Ÿ“– Read the full guide โ†’ [Quick Start ยป](https://mcp.ifuryst.com/getting-started/quick-start)

---

## ๐Ÿš€ Core Features

Unla provides a comprehensive set of features to facilitate the adoption and management of MCP-based services.

### ๐Ÿ”Œ Protocol & Proxy Capabilities

*   [x] **REST to MCP Conversion:** Convert RESTful APIs to MCP Servers (Client โ†’ MCP Gateway โ†’ APIs).
*   [x] **MCP Proxying:** Proxy MCP services (Client โ†’ MCP Gateway โ†’ MCP Servers).
*   [ ] **gRPC to MCP Conversion:** Convert gRPC services to MCP Servers (Client โ†’ MCP Gateway โ†’ gRPC).
*   [ ] **WebSocket to MCP Conversion:** Convert WebSocket services to MCP Servers (Client โ†’ MCP Gateway โ†’ WebSocket).
*   [x] **MCP SSE Support:**  Supports Server-Sent Events for real-time updates.
*   [x] **MCP Streamable HTTP Support:** Supports streaming HTTP responses.
*   [x] **Rich Media Support:**  Supports MCP responses including text, images, and audio.

### ๐Ÿง  Session & Multi-Tenant Support

*   [x] **Persistent Session Support:**

Repository

AM
AmoyLab

AmoyLab/Unla

Created

April 15, 2025

Updated

July 7, 2025

Language

TypeScript

Category

Developer Tools