Peta Core
A production-ready MCP gateway and control plane that provides credential vault, policy engine, audit logging, and managed runtime for routing tool calls between AI agents and downstream MCP servers.
README
Peta Core
A control-plane runtime for MCP (Model Context Protocol). Gateway, vault, policy engine, and audit trail for every tool call between AI agents and downstream MCP servers.
Supports the core infrastructure components required to run MCP in production: gateway routing, runtime supervision, policy enforcement, credential management, and audit logging.
Key guarantees:
- Credential vault. Secrets stay encrypted at rest (PBKDF2 + AES-GCM) and are injected server-side at execution time. Clients never see raw credentials.
- Policy engine. RBAC/ABAC with per-user, per-tool capability filtering. Optional human-in-the-loop approval for high-risk operations.
- Audit trail. Every tool call is logged with caller identity, policy decision, and outcome. Secrets are never included in logs.
- Managed runtime. Supervises downstream MCP servers with lifecycle controls and automated recovery.
- Protocol compatibility. Standard MCP upstream, plus downstream compatibility for the shared gateway flows that Peta Core currently supports. Standard server-initiated reverse requests (
sampling,roots,elicitation) are intentionally not exposed in the current shared runtime. - Self-hosted. On-premises deployment model. No hosted SaaS dependency.
Quick Start | Website | Documentation
Architecture

Peta Core sits between MCP clients (Claude, ChatGPT, Cursor, n8n, or any MCP-compatible client) and downstream MCP servers. From the client's perspective, it connects to a single MCP server. Behind that endpoint, Peta Core routes to multiple downstream servers using standard MCP for the shared forward-request flows it supports.
Peta Core is one component of the Peta MCP stack:
- Peta Core (this repository) — MCP gateway, credential vault, policy engine, and audit runtime.
- Peta Console — Admin UI for users, servers, policies, approvals, and audit logs.
- Peta Desk — Desktop client for approval workflows and per-user server configuration.
This repository contains only Peta Core. See docs.peta.io for the full stack.
Features
MCP Gateway
- Transparent MCP proxying. Acts as an MCP server upstream and an MCP client downstream. Routes tool calls via namespaced identifiers (
serverId::toolName). - Built-in OAuth 2.0 authorization server. Authorization Code with PKCE, refresh tokens, dynamic client registration, token introspection, and revocation.
- Anonymous public access mode. Optionally allow token-less access for selected public servers through
/mcp/public, while authenticated traffic continues on the standard/mcpendpoint, with configurable anonymous rate limits.
Runtime & Extensions
- Downstream server runtime. Lazy start on first request, health checks, idle timeouts, and capability caching.
- Custom MCP tools (HTTPS or stdio). HTTPS-based custom tools remain supported, with stdio transport added for process-based tools.
- Docker-safe
CustomStdioexecution. In Docker deployments, non-dockerstdio commands are transparently executed insidepetaio/mcp-runner:latest; explicitdockercommands keep their original behavior. - REST API adapter. Register HTTP endpoints as MCP servers. Peta Core translates tool calls to HTTP requests without writing a custom MCP server.
- Skill packages. Upload per-server ZIP bundles with
SKILL.mdmetadata. Served as namespaced MCP tools, isolated by server ID.
Credential Vault
- Server-side credential injection. Credentials are decrypted and injected at execution time. They never appear in client configs or prompts.
- Encrypted configuration storage. Server launch configs and per-user configuration blobs are encrypted at rest.
- OAuth token brokerage. Stores downstream OAuth configurations encrypted, refreshes access tokens automatically, and injects them into downstream calls. Refresh tokens are never exposed.
Policy Engine
- Per-user, per-tool policy evaluation. RBAC/ABAC rules with content-aware DSL conditions and capability filtering.
- Human-in-the-loop approvals. Durable approval queue with explicit lifecycle states and replay-safe retries.
- Rate limiting and network controls. Per-user quotas with sliding window enforcement. Optional IP allow-lists per workspace.
Result Cache
- Configurable result caching with per-entity policy controls (
tools,prompts,resources.inline,resources.exact,resources.patterns). - Safe-by-default behavior for tool results: approval-gated or error results are not promoted into cache.
- Scope-aware cache keys and purge controls, including exact purge with operation/entity-level targeting.
Progressive Disclosure
- Configurable tool visibility. Three discovery modes (
FLAT,HYBRID,STRICT) control whether tools are directly exposed or discoverable only through a catalog search interface. - Discovery profiles. Named profiles with rule-based exposure policies determine which tools are directly callable based on server identity and risk level.
- Persistent catalog index. A searchable index of all tool capabilities across managed servers, with native
catalog.search,catalog.describe, andcatalog.executetools for AI-driven discovery.
Audit & Observability
- Audit trail. Records caller identity, tool name, policy decision, approval status, and outcome for every tool call. Secrets are excluded from log payloads.
- Structured logging. Pino-based JSON logs with per-module child loggers. Integrates with external log aggregation via webhook.
- Observability workflows. Audit records and structured logs support log views, export workflows, and usage dashboards.
Reliability
- Stream resumption. Events are persisted to allow clients to resume via
Last-Event-IDafter disconnection. - Real-time notification channel. Socket.IO-based push for approval requests, capability updates, and server status changes.
- Automatic server recovery. Consecutive downstream timeouts trigger a health ping and automatic reconnection.
- Request-level retry. On downstream disconnection, the gateway reconnects and retries the call up to two times. Clients see a single request.
Documentation
- Architecture & Internals — System architecture, request flows, and core design patterns.
- Security & Permissions — Vault encryption model and the three-layer permission system.
- Deployment & Configuration — Docker, PM2 deployment, and environment variables.
- Reference — API surfaces, usage examples, and contributing.
License
Licensed under the Elastic License 2.0 (ELv2).
You may use, modify, and self-host this software. You may not provide it to third parties as a hosted or managed service, remove license key functionality, or obscure licensing notices.
For detailed terms, see the LICENSE file.
Copyright © 2026 Dunia Labs, Inc.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。