Unla
CLAUDE.md2.2k starsChanged 18 months agoMITView on GitHub
Unla is an MCP (Model Context Protocol) Gateway service written in Go with a React/TypeScript web interface. It acts as a lightweight proxy and management layer that converts existing APIs and MCP servers into MCP-compliant services through configuration-driven approaches. Key Architecture: - Control Plane: cmd/apiserver - REST API server for management, configuration, and web UI backend - Data Plane: cmd/mcp-gateway - MCP proxy gateway handling real-time MCP protocol communication - Web Interface: web/ - React/TypeScript dashboard for configuration and chat
Trending
Quiet since June.thin dataabout the whole repository
Who's talking about AmoyLab/Unla
- A Hacker News story“Unla: Instantly turn APIs n MCP servers into MCP servers,no code changes needed”Hacker News · Jun 26, 2025 · 2 points
- JSONbored/awesome-claude“content(mcp): add Unla MCP Gateway”GitHub · Jun 6, 2026
- mcp-runtime/mcp-server-fuzzer“Fuzz https://github.com/AmoyLab/Unla”GitHub · Oct 11, 2025
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
In this repositoryOne other file it gives its agents.
- agents.mdAGENTS.md
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 65
All transports implement the same interface for tool fetching/calling
- Distinctive: line 104
All comments must be in English and only where code is not self-explanatory
- Distinctive: line 105
Avoid redundant or obvious comments
- Distinctive: line 106
Before writing new code, check if similar functionality exists and follow existing patterns
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Unla is an MCP (Model Context Protocol) Gateway service written in Go with a React/TypeScript web interface. It acts as a lightweight proxy and management layer that converts existing APIs and MCP servers into MCP-compliant services through configuration-driven approaches.
Key Architecture:
- Control Plane:
cmd/apiserver- REST API server for management, configuration, and web UI backend - Data Plane:
cmd/mcp-gateway- MCP proxy gateway handling real-time MCP protocol communication - Web Interface:
web/- React/TypeScript dashboard for configuration and chat
Development Commands
Go Backend
# Run tests
make test
make test-coverage # with coverage report
make test-race # with race detection
# Build all services
make build
# Build specific components
make build-allinone # single container
make build-multi # multi-container
# Run services locally
make run-allinone # single container setup
make run-multi # multi-container setup
# Development - run specific services
go run cmd/apiserver/main.go -c configs/apiserver.yaml
go run cmd/mcp-gateway/main.go -c configs/mcp-gateway.yaml
go run cmd/mock-server/main.go
# Configuration testing
go run cmd/mcp-gateway/main.go test -c configs/mcp-gateway.yamlWeb Frontend
cd web/
pnpm run dev # development server
pnpm run build # production build
pnpm run lint # lint TypeScript/React code
pnpm run preview # preview production buildKey Architecture Components
Service Architecture
- apiserver: Database-backed management API with JWT auth, user/tenant management, OpenAI integration
- mcp-gateway: Stateless proxy service with hot-reloading configs, multiple transport support (SSE, stdio, HTTP)
- Web Dashboard: React SPA for configuration management and MCP chat interface
Transport Layer
- SSE (Server-Sent Events): Real-time bidirectional communication
- Stdio: Local process execution for MCP servers
- Streamable HTTP: HTTP-based streaming protocol
- All transports implement the same interface for tool fetching/calling
Configuration Management
- YAML-based configuration with environment variable substitution (
${VAR:default}) - Hot-reloading via SIGHUP signals or HTTP endpoints
- Version control and rollback support
- Multi-tenant scoped configurations
Storage Backends
- Database: SQLite/MySQL/PostgreSQL via GORM
- Disk: File-based YAML configurations
- Redis: Session storage and real-time notifications
- Memory: In-memory caching and state management
Code Organization Patterns
Go Backend Structure
internal/core/: Core MCP proxy logic, transport implementations, state managementinternal/apiserver/: REST API handlers, database models, middlewareinternal/common/: Shared configuration, DTOs, constants, error handlinginternal/auth/: OAuth2 and JWT authentication logicinternal/mcp/: MCP protocol storage and session managementpkg/: Reusable packages (logger, OpenAI client, utilities)
Configuration Files
configs/mcp-gateway.yaml: Gateway service configurationconfigs/apiserver.yaml: API server configurationconfigs/i18n/: Internationalization files (English/Chinese)
Frontend Structure
src/pages/: Route-based page components (auth, chat, gateway management)src/components/: Reusable UI components with HeroUI frameworksrc/services/: API clients and WebSocket connectionssrc/types/: TypeScript type definitions- Uses React Router, i18next for internationalization, Monaco Editor for YAML editing
Development Guidelines
Code Style (from .cursorrules)
- All comments must be in English and only where code is not self-explanatory
- Avoid redundant or obvious comments
- Before writing new code, check if similar functionality exists and follow existing patterns
- Prioritize understanding existing infrastructure over building from scratch
Service Selection
- Modification target: Determine if changes belong to control plane (
cmd/apiserver) or data plane (cmd/mcp-gateway) - apiserver: Management UI, user auth, configuration persistence, chat functionality
- mcp-gateway: Real-time MCP protocol handling, tool calling, transport management
Architecture Patterns
- Chain of Responsibility: Response handling (ImageHandler -> AudioHandler -> TextHandler)
- Factory Pattern: Multiple storage backends and transport implementations
- State Management: Atomic updates with lock-free state replacement
- Configuration Hot-Reloading: File watchers and signal-based updates
Testing and Quality
Go Testing
make test # run all tests
make test-coverage # generate coverage report
make test-race # test with race detection
go test ./pkg/utils/... # test specific packagesConfiguration Validation
# Test configuration before deployment
go run cmd/mcp-gateway/main.go test -c configs/mcp-gateway.yamlOperational Commands
# Live reload configuration
go run cmd/mcp-gateway/main.go reload -c configs/mcp-gateway.yaml
# Check service status
curl http://localhost:5234/healthDeployment
The project supports multiple deployment patterns:
- All-in-one: Single container with all services
- Multi-container: Separate containers for each service
- Kubernetes: Helm charts available in
deploy/helm/ - Docker Compose: Multiple configurations in
deploy/docker/
Environment variables are heavily used for configuration with Docker deployments. Check the Makefile and deployment configurations for specific setup requirements.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

