MCPcopy Index your code
hub / github.com/AmoyLab/Unla

github.com/AmoyLab/Unla @v0.9.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.9.2 ↗ · + Follow
2,789 symbols 8,943 edges 365 files 649 documented · 23%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Unla - MCP Gateway

🚀 Instantly transform your existing MCP Servers and APIs into MCP endpoints — without changing a line of code.

English 简体中文 繁體中文 Release Docs Ask DeepWiki Discord Go Report Card Snyk Security


Note: Unla is under rapid development! We strive to maintain backward compatibility, but it cannot be 100% guaranteed. Please make sure to check version changes carefully when upgrading. Due to the fast iteration, documentation updates may sometimes lag behind. If you encounter any issues, feel free to search or ask for help via Discord or Issues ❤️


✨ What is Unla?

Unla is a lightweight and highly available gateway service written in Go. It enables individuals and organizations to convert their existing MCP Servers and APIs into services compliant with the MCP Protocol — all through configuration, with zero code changes.

https://github.com/user-attachments/assets/69480eda-7aa7-4be7-9bc7-cae57fe16c54

🔧 Core Design Principles

  • ✅ Zero Intrusion: Platform-agnostic, supports deployment on bare metal, VMs, ECS, Kubernetes, etc., without modifying existing infrastructure
  • 🔄 Configuration-Driven: Convert legacy APIs to MCP Servers using YAML configuration — no code required
  • 🪶 Lightweight & Efficient: Designed for minimal resource usage without compromising on performance or availability
  • 🧭 Built-in Management UI: Ready-to-use web interface to simplify setup and reduce operational overhead

🚀 Getting Started

Unla supports a ready-to-run Docker deployment. Full deployment and configuration instructions are available in the docs.

Quick Launch with Docker

Configure environment variables:

export APISERVER_JWT_SECRET_KEY="changeme-please-generate-a-random-secret"
export SUPER_ADMIN_USERNAME="admin"
export SUPER_ADMIN_PASSWORD="changeme-please-use-a-secure-password"

Launch the container:

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 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:
  2. Open http://localhost:8080/ in your browser
  3. Login with the administrator credentials you configured

  4. Add an MCP Server:

  5. Copy the config from: https://github.com/amoylab/unla/blob/main/configs/proxy-mock-server.yaml
  6. Click "Add MCP Server" in the web interface
  7. Paste the configuration and save

Available Endpoints

After configuration, the service will be available at these endpoints:

  • 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 with the /sse or /mcp suffix URLs to start using it.

Testing

You can test the service using:

  1. The MCP Chat page in the web interface
  2. Your own MCP Client (recommended)

📖 Read the full guide → Quick Start »


🚀 Core Features

🔌 Protocol & Proxy Capabilities

  • [x] Support for converting RESTful APIs to MCP Server — Client → MCP Gateway → APIs
  • [x] Support proxying MCP services — Client → MCP Gateway → MCP Servers
  • [ ] Support for converting gRPC to MCP Server — Client → MCP Gateway → gRPC
  • [ ] Support for converting WebSocket to MCP Server — Client → MCP Gateway → WebSocket
  • [x] Support for MCP SSE
  • [x] Support for MCP Streamable HTTP
  • [x] Support for MCP responses including text, images, and audio

🧠 Session & Multi-Tenant Support

  • [x] Persistent and recoverable session support
  • [x] Multi-tenant support
  • [ ] Support for grouping and aggregating MCP servers

🛠 Configuration & Management

  • [x] Automatic configuration fetching and seamless hot-reloading
  • [x] Configuration persistence (Disk/SQLite/PostgreSQL/MySQL)
  • [x] Configuration sync via OS Signals, HTTP, or Redis PubSub
  • [x] Version control for configuration

🔐 Security & Authentication

  • [x] OAuth-based pre-authentication support for MCP Servers

🖥 User Interface

  • [x] Intuitive and lightweight management UI

📦 Deployment & Operations

  • [x] Multi-replica service support
  • [x] Docker support
  • [x] Kubernetes and Helm deployment support

📚 Documentation

For more usage patterns, configuration examples, and integration guides, please visit:

👉 https://docs.unla.amoylab.com


📄 License

This project is licensed under the MIT License.

💬 Join Our WeChat Community

Scan the QR code below to add us on WeChat. Please include a note: mcp-gateway, mcpgw or unla.

WeChat QR Code

📈 Star History

Star History Chart

Extension points exported contracts — how you extend this code

Connection (Interface)
Connection represents an active session connection capable of sending messages. [6 implementers]
internal/mcp/session/session.go
Content (Interface)
Content represents a content item in a tool call result [3 implementers]
pkg/mcp/server_types.go
Auth (Interface)
Auth defines the authentication oauth interface [3 implementers]
internal/auth/auth.go
Transport (Interface)
Transport defines the interface for MCP transport implementations [3 implementers]
internal/core/mcpproxy/transport.go
Database (Interface)
Database defines the methods for database operations. [3 implementers]
internal/apiserver/database/database.go
Type (Interface)
(no doc)
internal/common/config/config.go
ImportMetaEnv (Interface)
(no doc)
web/src/env.d.ts
Notifier (Interface)
Notifier defines the interface for configuration update notification [5 implementers]
internal/mcp/storage/notifier/notifier.go

Core symbols most depended-on inside this repo

String
called by 584
internal/common/cnst/proto.go
t
called by 530
web/src/utils/i18n-utils.ts
Error
called by 361
internal/i18n/error.go
push
called by 161
web/public/monaco-editor/vs/base/worker/workerMain.js
set
called by 142
web/public/monaco-editor/vs/base/worker/workerMain.js
map
called by 128
web/public/monaco-editor/vs/base/worker/workerMain.js
RespondWithError
called by 118
internal/i18n/response.go
get
called by 104
web/public/monaco-editor/vs/base/worker/workerMain.js

Shape

Method 1,424
Function 899
Struct 215
Interface 133
Class 96
TypeAlias 19
FuncType 3

Languages

TypeScript52%
Go48%

Modules by API surface

web/public/monaco-editor/vs/base/worker/workerMain.js979 symbols
web/public/monaco-editor/vs/loader.js129 symbols
pkg/mcp/server_types.go56 symbols
web/src/services/api.ts33 symbols
web/src/pages/gateway/components/CapabilitiesViewer.tsx29 symbols
internal/common/dto/mcp.go29 symbols
cmd/template-tester/main.go27 symbols
internal/auth/auth.go26 symbols
internal/apiserver/handler/mcp.go22 symbols
internal/i18n/errorresponse.go21 symbols
internal/i18n/error.go20 symbols
internal/common/config/config.go20 symbols

For agents

$ claude mcp add Unla \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact