Sandbox
@TheLunarCompany/lunar

MCP gateway and API proxy for agent traffic

Lunar.dev provides a mediation layer for outbound API use in agent and application workflows. It combines a proxy for traffic control with an MCP aggregator so you can centralize access, watch usage, and apply governance rules.

491 stars49 forksTypeScriptUpdated 6d ago
Who it's for

Builders who want to put one governed gateway in front of the APIs their agents use.

What it delivers

You can control, observe, and shape agent API calls without wiring each service separately.

What it does

Live traffic visibility

Shows latency, errors, cost, and token usage across outbound API and agent calls.

Policy enforcement

Lets you control tool access and apply fine-grained rules to agent traffic.

Traffic shaping

Supports rate limits, retries, priority queues, and circuit breakers.

MCP aggregation

Combines multiple MCP servers behind one gateway for simpler access and management.

Example clients and interceptors

Includes sample consumer apps and a TypeScript interceptor for trying the gateway in real flows.

README

License Documentation Website

Welcome to Lunar.dev

Lunar.dev is an open-source platform for managing, governing and optimizing third-party API consumption across applications and AI agent workloads at scale.

Consumption Management for the AI Era

As AI agents and autonomous workflows increasingly rely on external APIs, there's a growing need for a mediation layer that acts as a central aggregation point between applications, agents, and the services they depend on.

Lunar.dev provides that layer—serving as a unified API Gateway for AI, delivering:

  • Live API Traffic Visibility: Get real-time metrics on latency, errors, cost, and token usage across all outbound traffic, including LLM and agent calls.
  • AI-Aware Policy Enforcement: Control tool access, throttle agent actions, and govern agentic traffic with fine-grained rules.
  • Advanced Traffic Shaping: Apply rate limits, retries, priority queues, and circuit breakers to manage load and ensure reliability.
  • Cost & Performance Optimization: Identify waste, smooth traffic peaks, and reduce overuse of costly APIs through smart gateway policies.
  • Centralized MCP Aggregation: Streamline operations by consolidating multiple MCP servers into a single gateway, enhancing security, observability, and management.

Choose Your Path

Lunar.dev is composed of two major components:

  • Lunar Proxy – our core API gateway and control layer
  • Lunar MCPX – a zero-code aggregator for multiple MCP servers with unified API access

Explore the one that fits your needs—or use both for a full-stack solution.

Open Source at the Core

This project was born out of the need for a more robust, production-ready approach to managing third-party APIs. It remains open-source at its core and free for non-production/personal use. For production environments, we offer advanced features through guided onboarding and platform tiers; visit our website or reach out directly for more information

Files in the repo

Repository payload11 top-level entries
  • .github
  • example-consumer-app
  • interceptors
  • mcpx
  • proxy
  • readme-files
  • .dcignore
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • LICENSE
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k
t8y2/dbxConnectors

20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。

19k