/ Каталог / Песочница / Unla
● Сообщество AmoyLab ⚡ Сразу

Unla

автор AmoyLab · AmoyLab/Unla

Turn any REST API into an MCP server from YAML — zero code changes, hot reload, multi-tenant, SSE + Streamable HTTP.

Unla (AmoyLab) is a lightweight Go gateway that converts REST APIs and existing MCP services into MCP endpoints via YAML configuration. Web UI for management, multi-tenant, OAuth pre-auth, Docker-first deployment.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

unla.replay ▶ готово
0/0

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "unla": {
      "command": "npx",
      "args": [
        "-y",
        "Unla"
      ],
      "_inferred": true
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "unla": {
      "command": "npx",
      "args": [
        "-y",
        "Unla"
      ],
      "_inferred": true
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "unla": {
      "command": "npx",
      "args": [
        "-y",
        "Unla"
      ],
      "_inferred": true
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "unla": {
      "command": "npx",
      "args": [
        "-y",
        "Unla"
      ],
      "_inferred": true
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "unla",
      "command": "npx",
      "args": [
        "-y",
        "Unla"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "unla": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "Unla"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add unla -- npx -y Unla

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: Unla

How to expose your internal REST API as MCP without writing a server

👤 Platform engineers, internal tools teams ⏱ ~30 min intermediate

Когда использовать: You have a company REST API and want Claude/Cursor to use it without building a bespoke MCP.

Предварительные требования
  • Docker — docker.com/get-started
  • OpenAPI/Swagger spec for the API (helpful but optional) — Most internal APIs already have one
Поток
  1. Deploy Unla
    docker run -d --name unla -p 8080:80 -p 5234:5234 -p 5235:5235 ghcr.io/amoylab/unla/allinone:latest✓ Скопировано
    → Web UI at :8080
  2. Add a YAML server definition
    In the UI, create a server 'internal-api' with endpoints /users (GET) and /orders (GET, POST), mapped to https://api.internal/v1.✓ Скопировано
    → Tools show up: get_users, get_orders, create_order
  3. Point your client at it
    Add https://gateway.internal/mcp/internal-api to Claude Desktop.✓ Скопировано
    → New tools appear in the client

Итог: Your internal API usable from any MCP client within an hour.

Подводные камни
  • Auth leaks if you map sensitive headers unrestricted — Use Unla's OAuth pre-auth to gate per-user; never hardcode admin tokens in YAML
  • Write endpoints expose destructive calls — Mark POST/DELETE endpoints as 'confirm' so they require explicit user approval
Сочетать с: mcphub

How to give each customer their own MCP namespace

👤 SaaS teams offering MCP access to customers ⏱ ~45 min advanced

Когда использовать: You run a platform and want per-tenant tool isolation.

Поток
  1. Create tenants in Unla
    In admin, create tenants 'acme' and 'globex', each with their own API key mapping.✓ Скопировано
    → Two isolated namespaces
  2. Route per-tenant
    Acme users hit /mcp/acme, globex hits /mcp/globex.✓ Скопировано
    → Tools show tenant-scoped data

Итог: Multi-tenant MCP without running multiple gateways.

Подводные камни
  • Cross-tenant leakage via shared YAML templates — Use tenant-scoped variables, never $ENV references that resolve cross-tenant

How to put your existing MCPs behind a single authenticated URL

👤 Teams with scattered MCP deployments ⏱ ~20 min intermediate

Когда использовать: Multiple stdio MCPs in different places and you want one public URL with OAuth.

Поток
  1. Register each downstream MCP
    In Unla, add github-mcp (stdio) and postgres-mcp (HTTP) as proxied servers.✓ Скопировано
    → Both show as healthy
  2. Enable OAuth
    Turn on GitHub OAuth for the gateway.✓ Скопировано
    → Login flow works end-to-end

Итог: One endpoint, one login, all your MCPs.

Комбинации

Сочетайте с другими MCP — эффект x10

unla + mcphub

Use Unla for REST-to-MCP conversion and MCPHub for routing/grouping

Register Unla-exposed tools in MCPHub under the 'internal' group.✓ Скопировано
unla + proxy

Use mcp-proxy as a last-mile stdio bridge and Unla as the public-facing gateway

Bridge my local stdio MCP to HTTP with mcp-proxy, then register it in Unla.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
(gateway) yaml-defined REST tools As declared in YAML Whatever the exposed REST endpoint does 1 request to upstream API
(gateway) proxied MCP tools Pass-through Same as downstream Same as downstream MCP

Стоимость и лимиты

Во что обходится

Квота API
None at the gateway layer; upstream API quotas still apply
Токенов на вызов
Minimal gateway overhead
Деньги
Free (Apache 2.0)
Совет
Cache GET endpoints at the gateway to avoid duplicate upstream billing.

Безопасность

Права, секреты, радиус поражения

Минимальные скоупы: OAuth issuer config + tenant-scoped API keys
Хранение учётных данных: Gateway config on disk (encrypt via your secret manager); tenant tokens via DB
Исходящий трафик: The gateway forwards to whichever upstream URLs you configure
Никогда не давайте: Do not expose the admin UI publicly without auth Do not YAML-encode production tokens in git

Устранение неполадок

Частые ошибки и исправления

Upstream 401 on every call

Gateway isn't forwarding auth header. Add an Authorization mapping rule in YAML.

Проверить: curl gateway with -v; check upstream headers
Hot reload didn't pick up my YAML change

Validate YAML in the UI's Lint tab first; hot reload rejects invalid configs silently.

OAuth redirect_uri mismatch

Register the exact gateway URL in your OAuth provider.

SSE disconnects after 60s

Load balancer idle timeout. Raise to 3600s or use Streamable HTTP.

Альтернативы

Unla в сравнении

АльтернативаКогда использоватьКомпромисс
MCPHubYou want a TypeScript hub with smart vector routingLess focus on REST-to-MCP conversion
ToolHiveYou want containerized per-MCP isolationNot a REST-to-MCP converter

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills