{"id":46332635,"url":"https://github.com/portolanetwork/dragon","last_synced_at":"2026-03-04T18:03:53.097Z","repository":{"id":319339778,"uuid":"1078408208","full_name":"portolanetwork/dragon","owner":"portolanetwork","description":"A cloud-native, distributed Gateway for Model Context Protocol (MCP)","archived":false,"fork":false,"pushed_at":"2025-12-18T08:17:25.000Z","size":751,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-19T18:55:51.911Z","etag":null,"topics":["ai","akka","claude","cloud-computing","gateway","gcp","kubernetes","llm","mcp","openai","pekko","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/portolanetwork.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-17T17:25:49.000Z","updated_at":"2025-12-18T08:17:26.000Z","dependencies_parsed_at":"2025-10-18T21:13:52.545Z","dependency_job_id":"747a2a46-696c-4195-acce-752f975b1949","html_url":"https://github.com/portolanetwork/dragon","commit_stats":null,"previous_names":["portolanetwork/dragon"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/portolanetwork/dragon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portolanetwork%2Fdragon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portolanetwork%2Fdragon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portolanetwork%2Fdragon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portolanetwork%2Fdragon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/portolanetwork","download_url":"https://codeload.github.com/portolanetwork/dragon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/portolanetwork%2Fdragon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30088344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","akka","claude","cloud-computing","gateway","gcp","kubernetes","llm","mcp","openai","pekko","scala"],"created_at":"2026-03-04T18:03:49.998Z","updated_at":"2026-03-04T18:03:53.083Z","avatar_url":"https://github.com/portolanetwork.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dragon MCP Gateway\n\n**Dragon is a cloud-native, distributed gateway for the Model Context Protocol (MCP), unifying multiple downstream MCP servers into a single, user-scoped API for AI applications.** \n\nDragon serves as the central control plane between AI applications (like Claude, ChatGPT, etc.) and your internal or external tool providers. While initially supporting the MCP spec, its core architecture is protocol-agnostic, built to support emerging connectivity standards as the AI ecosystem evolves.\n\n---\n\n## Key Use Cases / Why Dragon?\n\n* **Simplify Integration:** Provide a single MCP endpoint to AI applications and manage all your tool/data access patterns centrally.\n* **Prevent Data Leaks:** Implement fine-grained Data Loss Prevention (DLP) controls to ensure models only access approved data.\n* **Gain Visibility:** Utilize comprehensive usage monitoring for auditing, debugging, and identifying patterns or misuse by AI agents.\n* **Ensure Compliance:** Centralize enterprise compliance controls (e.g., GDPR, HIPAA) across all model-accessed data.\n* **Optimize Token Usage:** Implement advanced optimizations, such as progressive tool discovery, to mitigate context bloat and control costs.\n* **Extend Functionality:** Use the integrated framework to easily implement and manage your own custom tool providers.\n\n---\n\n## Capabilities\n\n### Current\n* **MCP Server Aggregation**: Aggregate multiple downstream MCP servers into one unified gateway.\n* **Tenant/User Isolation**: Route requests to user-specific MCP server instances for multi-tenancy.\n* **Spec Compliant**: Full support for the streaming HTTP MCP specification (2025-06-18).\n* **Auth**: OAuth2/OIDC authentication via third-party IDPs (e.g., Auth0) with JWT validation.\n* **Console UI**: Web-based administrative console.\n* **Monitoring**: Comprehensive audit logging and event tracking for tool executions and system events.\n\n### Planned\n* **Policy Based Enforcement**: Manage tool access and permissions via declarative policies.\n* **Compliance Module**: Built-in modules for enterprise-specific compliance mandates.\n* **Lazy Loading**: Lazy loading of tool specifications to mitigate context bloat and improve latency.\n* **No-Code Datasource Integration**: Ability to create custom tools/datasources directly from APIs without writing code.\n\n---\n\n## Tech Stack\n\nDragon is built on a modern, robust, and asynchronous foundation, prioritizing resilience and speed.\n\n* **Core Framework:** **Apache Pekko** (Akka fork) actor system for asynchronous, event-driven computing.\n* **Language:** **Scala 3** (Extensible in any JVM-based language like Java/Kotlin).\n* **Persistence:** **PostgreSQL** database with configuration management via **Flyway** migrations.\n* **APIs:** **gRPC** (for server management) and **HTTP** (for high-throughput MCP operations).\n* **Protocol Support:** Built on the official Model Context Protocol (MCP) SDK.\n\n---\n\n## Built for Scale and Resilience (Reactive Principles)\n\nDragon is founded on the principles of the **Reactive Manifesto**, providing an inherently distributed and resilient architecture.\n\n* **Actor-Based Architecture:** Uses Apache Pekko for natural isolation, fault tolerance (automatic recovery and rebalancing), and distribution.\n* **Horizontally Scalable:** Easily scales across multiple nodes with native support for cluster sharding and service discovery.\n* **Asynchronous Design:** A fully asynchronous, event-driven model from API to database access, enabling high throughput and minimal resource usage.\n* **Reactive Streaming:** Implements reactive streams with backpressure handling for stable, high-performance MCP streaming operations.\n* **Self-Hostable \u0026 Distributed:** Run on a single machine or scale horizontally across a cluster using its native Apache Pekko foundation.\n* **Protocol-Agnostic Core:** The architecture is designed for rapid extension to new protocols and connectivity standards beyond MCP.\n* **Open Source:** Released under the permissive **Apache 2.0 license**.\n---\n\n\n## Architecture \n\nDocumentation coming soon.\n\n## Getting Started\n\n### Prerequisites\n- JDK 17 or later\n- sbt 1.11+\n- PostgreSQL 12+\n\n### Running Locally\n\nNOTE: This setup doc is work-in-progress. I will be updating this to be more comprehensive in the future releases. If you'd like help setting this up, reach out to me at: sami.malik@portolanetwork.io \n\n\n```bash\n# Clone the repository\ngit clone https://github.com/portola-labs/dragon.git\ncd dragon/scala/turnstile\n\n# Create a database (Use neon.dev and updated env vars in .env file)\nexport DEPLOYMENT_NAME=default\nexport DATABASE_URL=\u003cdb-url\u003e\nexport DATABASE_USER=\u003cdb-user\u003e\nexport DATABASE_PASSWORD=\u003cdb-password\u003e\n\n# Configure Auth0 (see scala/turnstile/docs/auth-with-auth0.md for setup)\nexport AUTH0_DOMAIN=\u003cauth0-domain\u003e\nexport AUTH0_AUDIENCE=\u003cauth0-audience\u003e\nexport AUTH0_CLIENT_AUDIENCE=\u003cauth0-client-audience\u003e # Auth0 requires this to issue refresh-tokens\n\n# Start the gateway (migrations run automatically)\nsbt \"runMain app.dragon.turnstile.main.Turnstile\"\n\n# Start UI\ncd dragon/js/console\nnpm install\nnpm run dev\n\n# Navigate to localhost:5173 and login.\n\n\n# Connect using MCP Inspector with following settings\n## Transport Type: Streamable HTTP\n## URL: http://127.0.0.1:8082/mcp\n## Connection Type: Via Proxy\n## Click: Connect\n## Click: Tools -\u003e List Tools\n## You can create breakpoints to examine how individual example tools are called under: app.dragon.turnstile.service.tools\n\n```\n\nThe gateway starts with:\n- gRPC API: `localhost:8082` (server management)\n- grpc-web API: ``localhost:8081`` (server management from UI)\n- MCP Gateway: `localhost:8082/mcp` (MCP protocol endpoint)\n\n### Register a Downstream MCP Server\n\nUse the gRPC API to register downstream servers:\n\n```bash\n# Example using grpcurl (with authentication)\ngrpcurl -plaintext \\\n  -H \"Authorization: Bearer YOUR_JWT_TOKEN\" \\\n  -d '{\n    \"user_id\": \"user-123\",\n    \"name\": \"my-mcp-server\",\n    \"url\": \"https://mcp.deepwiki.com/mcp1\",\n    \"auth_type\": \"discover\"\n  }' localhost:9090 dragon.turnstile.v1.TurnstileService/CreateMcpServer\n\n# For servers requiring OAuth, initiate login:\n# GET http://localhost:8081/login?uuid=\u003cserver-uuid\u003e\n```\n\n\n## Documentation\n\n- [Configuration Reference](scala/turnstile/src/main/resources/application.conf) - All configuration options\n- [Auth0 Setup Guide](scala/turnstile/docs/auth-with-auth0.md) - TBD\n- [Database Schema](scala/turnstile/src/main/resources/db/migration/) - Flyway migrations\n- [API Documentation](scala/turnstile/src/main/protobuf/) - gRPC protocol definitions\n\n## Technology Stack\n\n- Apache Pekko 1.2.1 - Actor system, clustering, HTTP, gRPC\n- Scala 3.7.3 - Language\n- PostgreSQL - Persistent storage\n- Slick 3.5.2 - Database access\n- Flyway - Database migrations\n- MCP Java SDK 0.14.1 - MCP protocol implementation\n- Spring WebFlux - Reactive HTTP transport (embedded)\n- JWT/Auth0 - OAuth2/OIDC authentication and token validation\n\n## Deployment\n\n### Single Node (Development)\n\n```bash\nsbt \"runMain app.dragon.turnstile.main.Turnstile\"\n```\n\n### Cluster Deployment (Production)\n\nDocumentation coming soon.\n\n## Contributing\n\nContributions are welcome. This is an open-core project licensed under Apache 2.0.\n\n## License\n\n© 2025 Sami Malik, Portola Network, Inc. Licensed under the Apache License, Version 2.0 - See [LICENSE](LICENSE) for details.\n\n## Branding and Attribution\n\nWhile this project is open source under the Apache 2.0 license, the name \"Dragon\" and related branding are protected trademarks. You may not use the name \"Dragon\", \"Portola\" or similar marks for derivative works, forks, or redistributions without written permission.\n\n## Commercial Support\n\nPortola Network, Inc. offers commercial support, enterprise features, and professional services for Dragon MCP Gateway.\n\n## Maintained by\n\n**Sami Malik**  \nFounder, [Portola Network, Inc](https://portolanetwork.io)  \n📧 sami.malik@portolanetwork.io  \n[LinkedIn](https://www.linkedin.com/in/usamah) · [X](https://x.com/samimalik10101)\n\nFor questions or contributions, please open an issue or pull request.\n\n---\n\nBuilt by Portola Network, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fportolanetwork%2Fdragon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fportolanetwork%2Fdragon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fportolanetwork%2Fdragon/lists"}