{"type":"mcp_server","name":"Unla","description":"MCP Gateway: Transforms existing APIs into MCP servers with zero code. Dockerized, easy deployment & management.","category":"Developer Tools","language":"TypeScript","stars":2162,"forks":105,"owner":"AmoyLab","github_url":"https://github.com/AmoyLab/Unla","homepage":null,"setup":"## Setup\n\nThese instructions detail how to get started with Unla using Docker.\n\n### Prerequisites\n\n*   Docker installed and running on your system.\n\n### Installation Steps\n\n1.  **Configure Environment Variables:**\n\n    Before running the Docker container, you need to set the required environment variables.  These variables configure the OpenAI API key, the model to use, a secret key for JWT authentication, and the super administrator credentials.\n\n    ```bash\n    export OPENAI_API_KEY=\"sk-eed837fb0b4a62ee69abc29a983492b7PlsChangeMe\"\n    export OPENAI_MODEL=\"gpt-4o-mini\"\n    export APISERVER_JWT_SECRET_KEY=\"fec6d38f73d4211318e7c85617f0e333PlsChangeMe\"\n    export SUPER_ADMIN_USERNAME=\"admin\"\n    export SUPER_ADMIN_PASSWORD=\"297df52fbc321ebf7198d497fe1c9206PlsChangeMe\"\n    ```\n\n    **Important:** Replace the placeholder values with your actual OpenAI API key, desired model, a strong secret key, and secure administrator credentials.\n\n2.  **Run the Docker Container:**\n\n    Use the following `docker run` command to start the Unla container:\n\n    ```bash\n    docker run -d \\\n      --name unla \\\n      -p 8080:80 \\\n      -p 5234:5234 \\\n      -p 5235:5235 \\\n      -p 5335:5335 \\\n      -p 5236:5236 \\\n      -e ENV=production \\\n      -e TZ=Asia/Shanghai \\\n      -e OPENAI_API_KEY=${OPENAI_API_KEY} \\\n      -e OPENAI_MODEL=${OPENAI_MODEL} \\\n      -e APISERVER_JWT_SECRET_KEY=${APISERVER_JWT_SECRET_KEY} \\\n      -e SUPER_ADMIN_USERNAME=${SUPER_ADMIN_USERNAME} \\\n      -e SUPER_ADMIN_PASSWORD=${SUPER_ADMIN_PASSWORD} \\\n      --restart unless-stopped \\\n      ghcr.io/amoylab/unla/allinone:latest\n    ```\n\n    **Explanation of parameters:**\n\n    *   `-d`: Runs the container in detached mode (in the background).\n    *   `--name unla`: Assigns the name \"unla\" to the container.\n    *   `-p 8080:80`: Maps port 80 on the container to port 8080 on the host machine (for the web interface).\n    *   `-p 5234:5234`, `-p 5235:5235`, `-p 5335:5335`, `-p 5236:5236`: Maps other necessary ports.\n    *   `-e ENV=production`: Sets the environment to production.\n    *   `-e TZ=Asia/Shanghai`: Sets the timezone.  Change this to your local timezone.  A list of valid timezones can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).\n    *   `-e OPENAI_API_KEY=${OPENAI_API_KEY}`: Passes the OpenAI API key as an environment variable.\n    *   `-e OPENAI_MODEL=${OPENAI_MODEL}`: Passes the OpenAI model as an environment variable.\n    *   `-e APISERVER_JWT_SECRET_KEY=${APISERVER_JWT_SECRET_KEY}`: Passes the JWT secret key as an environment variable.\n    *   `-e SUPER_ADMIN_USERNAME=${SUPER_ADMIN_USERNAME}`: Passes the super admin username as an environment variable.\n    *   `-e SUPER_ADMIN_PASSWORD=${SUPER_ADMIN_PASSWORD}`: Passes the super admin password as an environment variable.\n    *   `--restart unless-stopped`: Configures the container to restart automatically unless explicitly stopped.\n    *   `ghcr.io/amoylab/unla/allinone:latest`: Specifies the Docker image to use.\n\n### Configuration Requirements\n\n*   **Environment Variables:**  The environment variables defined in step 1 are crucial for configuring the Unla instance.  Ensure they are set correctly before running the Docker container.\n*   **MCP Server Configuration:** After launching the container, you'll need to configure an MCP Server through the web interface.  A sample configuration is available at: [https://github.com/amoylab/unla/blob/main/configs/proxy-mock-server.yaml](https://github.com/amoylab/unla/blob/main/configs/proxy-mock-server.yaml).\n\n### Access and Initial Configuration\n\n1.  **Access the Web Interface:**\n\n    *   Open `http://localhost:8080/` in your web browser.\n    *   Log in using the `SUPER_ADMIN_USERNAME` and `SUPER_ADMIN_PASSWORD` you configured earlier.\n\n2.  **Add an MCP Server:**\n\n    *   Copy the configuration from the example YAML file: [https://github.com/amoylab/unla/blob/main/configs/proxy-mock-server.yaml](https://github.com/amoylab/unla/blob/main/configs/proxy-mock-server.yaml)\n    *   In the Unla web interface, click \"Add MCP Server.\"\n    *   Paste the configuration and save it.\n\n### Available Endpoints\n\nAfter configuring an MCP Server, the service will be accessible at the following endpoints:\n\n*   MCP SSE: `http://localhost:5235/mcp/user/sse`\n*   MCP SSE Message: `http://localhost:5235/mcp/user/message`\n*   MCP Streamable HTTP: `http://localhost:5235/mcp/user/mcp`\n\nConfigure your MCP Client to use the `/sse` or `/mcp` suffix URLs.","tools":"## Available Tools\n\n**Unla** provides a suite of tools and features to seamlessly transform existing APIs and services into MCP-compliant endpoints. Here's a breakdown:\n\n### 🔌 Protocol & Proxy Capabilities\n\n*   **RESTful API to MCP Server Conversion:** Converts existing RESTful APIs into MCP Servers. This allows clients to interact with legacy APIs using the MCP protocol.\n    *   *Usage:* Configure Unla with the REST API endpoint and desired MCP mapping in the YAML configuration.\n*   **MCP Service Proxying:** Proxies requests between MCP clients and existing MCP servers. This enables Unla to act as a gateway, routing MCP traffic to backend MCP services.\n    *   *Usage:* Configure Unla with the target MCP server address in the YAML configuration.\n*   **gRPC to MCP Server Conversion (Planned):**  *Future support* for converting gRPC services to MCP Servers.\n*   **WebSocket to MCP Server Conversion (Planned):** *Future support* for converting WebSocket services to MCP Servers.\n*   **MCP SSE Support:** Supports the MCP Server-Sent Events (SSE) protocol for real-time data streaming.\n    *   *Usage:* Clients can subscribe to MCP SSE endpoints to receive updates from the server.\n*   **MCP Streamable HTTP Support:** Supports MCP Streamable HTTP for efficient data transfer.\n    *   *Usage:* Clients can use HTTP requests to stream data to and from the MCP server.\n*   **MCP Response Media Support:** Supports MCP responses including text, images, and audio.\n    *   *Usage:* Configure the API to return data in the desired format (text, image, or audio), and Unla will handle the MCP encoding.\n\n### 🧠 Session & Multi-Tenant Support\n\n*   **Persistent Session Support:** Provides persistent and recoverable session management.\n    *   *Usage:* Unla maintains session state, allowing clients to resume interrupted sessions.\n*   **Multi-Tenant Support:** Supports multiple tenants, allowing different organizations or users to share the same Unla instance.\n    *   *Usage:* Configure Unla with tenant-specific settings and access controls.\n*   **MCP Server Grouping & Aggregation (Planned):** *Future support* for grouping and aggregating multiple MCP servers into a single endpoint.\n\n### 🛠 Configuration & Management\n\n*   **Automatic Configuration Fetching & Hot-Reloading:** Automatically fetches configuration updates and applies them without restarting the service.\n    *   *Usage:* Unla monitors the configuration source (e.g., file, database) for changes and automatically reloads the configuration.\n*   **Configuration Persistence:** Persists configuration data to various storage options (Disk, SQLite, PostgreSQL, MySQL).\n    *   *Usage:* Choose the desired storage backend in the Unla configuration file.\n*   **Configuration Sync:** Synchronizes configuration across multiple Unla instances via OS Signals, HTTP, or Redis PubSub.\n    *   *Usage:* Configure the desired synchronization method in the Unla configuration file.\n*   **Configuration Version Control:** Provides version control for configuration changes.\n    *   *Usage:* Track and revert to previous configuration versions using the management UI or command-line tools.\n\n### 🔐 Security & Authentication\n\n*   **OAuth-Based Pre-Authentication:** Supports OAuth-based pre-authentication for MCP Servers.\n    *   *Usage:* Configure Unla with the OAuth provider details to protect MCP endpoints.\n\n### 🖥 User Interface\n\n*   **Intuitive Management UI:** Provides a web-based interface for managing Unla configurations and monitoring service health.\n    *   *Usage:* Access the UI through a web browser to add MCP Servers, modify configurations, and view logs.\n\n### 📦 Deployment & Operations\n\n*   **Multi-Replica Service Support:** Supports deploying multiple Unla instances for high availability and scalability.\n    *   *Usage:* Deploy multiple Unla instances behind a load balancer.\n*   **Docker Support:** Provides a Docker image for easy deployment and containerization.\n    *   *Usage:* Use the `docker run` command to launch Unla in a Docker container.\n*   **Kubernetes & Helm Deployment Support:** Supports deployment on Kubernetes using Helm charts.\n    *   *Usage:* Use Helm to deploy and manage Unla on a Kubernetes cluster.","faq":null,"created_at":"2025-04-15T08:51:28+00:00","updated_at":"2025-07-07T15:25:19+00:00","source_url":"https://model-context-protocol.com/servers/unla","related_articles":[]}