mcpg-control-plane-core MCP server
2026년 11월 10일 커밋Provides shared types, gRPC contracts, and security primitives for the MCPG Control Plane multi-tenant service.
다른 이름 mcpg-dev/mcpg-control-plane-core
- 스타
- 0
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 11월 10일
- 라이선스
- Apache-2.0
mcpg-control-plane-core MCP란?
Provides shared types, gRPC contracts, and security primitives for the MCPG Control Plane multi-tenant service.
프로젝트 README에서 생성된 요약
mcpg-control-plane-core MCP server 정보
Developers building components for the MCPG Control Plane use this library to ensure all services share a unified vocabulary and security model. It provides the essential gRPC contracts, such as the AgentControl service, which manages operations like Register, Heartbeat, and PullConfig. By using these shared types and schema migrations, different parts of the multi-tenant system can communicate reliably without drifting apart.
The library includes critical security primitives like the EnvelopeCipher for at-rest encryption, supporting implementations from a NoopCipher for development to AES-256-GCM or VaultTransitCipher for production. It also features a publish guard to validate tenant-authored gateway configurations, preventing unauthorized access to host state or internal networks. This core crate is used by the main control plane server, the gateway-side agent client, and various federation services to maintain strict tenant isolation and billing accuracy.
활용 사례
- 1Secure tenant data at restYou can implement envelope encryption using AES-256-GCM or Vault to ensure one tenant cannot decrypt another's data.
- 2Enforce database multi-tenancyApply Postgres row-level security policies to ensure strict isolation between different organizations.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
구성
MCPG_POSTGRES_TEST_URL
| 이름 | 설명 | 유형 |
|---|---|---|
| MCPG_POSTGRES_TEST_URL | — |
자동 검사
2026년 11월 16일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능mcpg-dev/mcpg-control-plane-core is public and reachablegithub.com/mcpg-dev/mcpg-control-plane-core ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-10github.com/mcpg-dev/mcpg-control-plane-core ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기mcpg-control-plane-core
Shared types, traits, schema migrations, and the gRPC agent contract every MCPG Control Plane component is built on.
The MCPG Control Plane is the multi-tenant service that gateways register with,
heartbeat to, and pull configuration from. This crate is the vocabulary all of
its components agree on: the typed tenant identifiers, the domain model, the
mcpg.cp.v1 gRPC contract compiled from proto/mcpg/cp/v1/agent.proto, the
at-rest envelope-encryption primitive, the SQL migrations that define the
schema, and the small pieces of shared policy — the publish guard, the usage
report, the public-route rate limiter — where two services drifting apart would
be a security or billing bug. It is a library of contracts and shared
primitives; the HTTP API, the gRPC server, and the database access layer live in
apps/control-plane/server.
What's here
proto— the gRPC types generated fromproto/mcpg/cp/v1/agent.proto. TheAgentControlservice (Register,Channel,PullConfig,Heartbeat,Deregister) and its messages, includingConfigBundle,MetricsReport,LogBatch,QuotaStatusandCredentialRotation. Themcpg.cp.v1package is a public stability commitment.model—Org(withORG_STATUS_ACTIVE/ORG_STATUS_SUSPENDED/ORG_STATUS_DECOMMISSIONINGandis_suspended()/is_decommissioning()),Workspace,Environment,InstancewithInstanceState,InstancePlacement,ProviderName,PluginSet/PluginEntry, andUser.provider— theInstanceProviderdiscovery trait (name,list,watch, and the optionalregister/deregister, which default toError::Unsupported), plusInstanceEvent,DepartedReason,RegistrationClaim,AddressableEndpointandis_live().idsandlicense, re-exported frommcpg-control-plane-licenseso every control-plane component reads one definition ofOrgId,OrgSlug,LicenseClaims,Quotasand the entitlement gates.cipher— theEnvelopeCiphertrait and its implementations:NoopCipher(pass-through, for development and self-hosting without a key),LocalCipher(AES-256-GCM under a base64 32-byte master key), and, behind the non-defaultkmsfeature,VaultTransitCipherwithVaultKmsConfig. Every call binds a caller-chosencontextstring into the AEAD associated data — a tenant slug for control-plane payloads, a cluster id for provisioner credentials — so one tenant's ciphertext cannot be decrypted as another's even under the same master key.build()selects an implementation from the configured key;build_strict(key, require_encryption)returnsCipherError::EncryptionRequiredinstead of silently falling back to plaintext, which is what a production deployment passes.publish_guard—check_published_config(raw), the pre-deploy guard for tenant-authored gateway configs. A published config runs in the tenant's own pod at config-origin trust, so the guard rejects the constructs that would read host state from there —${env.…}interpolation andenv:///file://secret URIs — and the ones that would reach the pod's internal network:allow_private_backendsand federation upstreams pointed at a literal private address. It inspects leaf string values only, never keys or comments, reports every violation at once, and fails closed on input that parses as neither YAML nor TOML. Credential URIs the tenant owns are allowed and merely checked for well-formedness, and atunnel://upstream stays permitted because it egresses through the authenticated relay.require_cloud_auth(raw)is the companion check on the config's authentication posture.usage_report—UsageReportandOrgUsage, the one definition of the billing figures the control plane serves and the billing federation consumes. Two hand-written copies is exactly how a field rename silently deserializes to zero and bills a tenant nothing.ratelimit::RateLimiter— a dependency-light per-IP token bucket for unauthenticated public routes such as enrollment and login. It is pure: the caller extractsX-Forwarded-Forand the transport peer,client_ip()resolves them (honouring the forwarded header only whentrust_proxyis set, since it is otherwise spoofable), and the caller applies the verdict in its own middleware.error::{Error, Result},env_aliases::mirror_long_to_short()(acceptsMCPG_CONTROL_PLANE_*as a synonym for everyMCPG_CP_*variable, with the short form winning; call it as the first statement inmain), andtls_init::install_default_crypto_provider(), which pins a single rustls crypto provider at boot so a process linking bothaws-lc-rsandringstarts deterministically.migrations/sqlite/andmigrations/postgres/— the schema. The Postgres set carries the row-level-security policies that enforce per-tenant isolation against themcpg.org_idsession variable.apps/control-plane/serverembeds these directories at compile time and runs them.- Cargo features:
sqlite(default) andpostgresselect the sqlx engines, withtier0,tier1andtier2as presets over that pair;kmsadds the Vault Transit cipher and its HTTP client, and is off by default so builds that use no external KMS stay lean.
Used by
apps/control-plane/server— themcpg-cpbinary serving the HTTP API and theAgentControlgRPC service.libs/control-plane/client— the gateway-side agent, which speaks the generatedmcpg.cp.v1types.apps/gatewayunder its embedded-control-plane feature,mcpg-admin, and the Cloud-only federation and provisioner services.
Build / test
cargo build -p mcpg-control-plane-core
cargo test -p mcpg-control-plane-core
# The row-level-security suite needs a real Postgres it is allowed to wipe.
export MCPG_POSTGRES_TEST_URL=postgres://postgres:postgres@127.0.0.1:5432/mcpg_test
cargo test -p mcpg-control-plane-core --features postgres --test postgres_rls
The build script compiles the protobuf contract with a vendored protoc, so no
system protobuf installation is required.
Licence
Apache-2.0.
See also
- Cloud overview — what the Control Plane does for an operator.
mcpg cpreferencelibs/control-plane/client— the gateway side of the agent contract.libs/control-plane/license— the licensing types this crate re-exports.
mcpg-control-plane-core MCP 질문
What services are included in the gRPC contract?
The AgentControl service includes Register, Channel, PullConfig, Heartbeat, and Deregister.
How does the encryption handle multi-tenancy?
The EnvelopeCipher binds a caller-chosen context string, such as a tenant slug, into the AEAD associated data to prevent cross-tenant decryption.
What databases are supported for schema migrations?
The library supports both SQLite and PostgreSQL for schema migrations.
Does the library support HashiCorp Vault?
Yes, when the 'kms' feature is enabled, it provides the VaultTransitCipher with VaultKmsConfig.