mcp server
Cybernetics
Google Cloud Rapid Agent Hackathon
Set up
Runs on your computer. Pick your agent and operating system.
Before you start
- uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
{
"mcpServers": {
"cybernetics": {
"command": "uvx",
"args": [
"cybernetics"
]
}
}
}same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12
Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs
README
synced Oct 22, 2026Quick Start (Docker Compose)
# 1. Configure (optional — defaults to PORT=4001, GEMINI_API_KEY empty)
cp .env.example.compose .env
# 2. Build & run
docker compose up --build
# 3. Open
open http://localhost:4001
The composer container serves both the built React frontend and the Go /api/*
backend on the port set by $COMPOSER_PORT (default 4001). All ports are
env-overridable — no values are hardcoded in the image.
Local dev (no Docker)
# Backend (Go) — defaults to :4001, override with PORT=...
go run ./cmd/composer
# Frontend (Vite) — defaults to :4000, proxies /api -> BACKEND_URL (default http://localhost:4001)
cd frontend && npm install && npm run dev
Classification: OPEN SOURCE
Authors: plasmaraygun, GoryGrey, royhodge812, sebuh-infsol (strawberryfield)
Version: 0.1.1
Status: Production-Ready
1. Executive Summary
Cybernetics is a composable Model Context Protocol (MCP) meta-broker designed for Google Cloud enterprise environments. It aggregates 56 third-party MCP servers into a unified, authenticated, auditable control plane and exposes composable agent templates that execute multi-phase autonomous workflows on top of that plane.
The project ships two surfaces:
- Cybernetics MCP broker — a single stdio-based MCP peer (
cybernetics-mcp) that aggregates 56 adapters into one tool namespace. Drop it into Claude, Cursor, Codex, Antigravity, Devin, or Vims and you get every tool the broker advertises. - Composer service — the Go HTTP + React UI in this repo. Generates Python agent code via Gemini, serves the public catalog at
/api/templates, and is the operational dashboard.
See the Quick Start above for the composer; section 3 for the broker.
Key Differentiators
- Zero Trust by default — every request authenticated, no anonymous endpoints beyond health probes
- Defense in depth — circuit breakers, input sanitization, sentinel middleware, structured logging
- Multi-tenant ready — per-adapter isolation, API-key scoping, audit trails
- Operational hardening — non-root containers, Cloud IAM binding, Secret Manager injection, VPC-SC compatible
2. Architecture
┌───────────────────────────────────────────────────────────────────┐
│ Google Cloud (VPC-SC) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ Cloud Run │◄──►│ Cloud SQL │◄──►│ Secret Manager │ │
│ │ (Broker) │ │ (Postgres) │ │ │ │
│ └──────┬──────┘ └─────────────┘ └─────────────────┘ │
│ │ │
│ ┌──────┴─────────────────────────────────────────────────────┐ │
│ │ Cybernetics Broker │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────┐ │ │
│ │ │ Auth MW │ │ Registry │ │Circuits │ │Health │ │ │
│ │ │ (Bearer) │ │ (Adapters│ │(CBs) │ │Probes │ │ │
│ │ └──────────┘ └──────────┘ └──────────┘ └────────┘ │ │
│ │ ┌───────────────────────────────────────────────────────┐ │ │
│ │ │ Agent Template Engine │ │ │
│ │ │ Sentinel │ DeployAgent │ FinanceAgent │ InfraAgent │ │ │
│ │ └───────────────────────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌──────┴─────────────────────────────────────────────────┐ │
│ │ MCP Adapter Layer │ │
│ │ Dynatrace Elastic Postgres GitLab Arize Fivetran │ │
│ │ GitHub Stripe AWS Vercel Supabase │ │
│ │ Cloudflare Browser (Playwright CDP) │ │
│ └────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────────────────────┘
│
┌────┴──────────────────────────────────────┐
│ Google ADK / Vertex AI │
│ (Agent orchestration, LLM-as-a-Judge) │
└───────────────────────────────────────────┘
Data Flow
- Request → Cloud Run →
APIKeyAuthmiddleware validates Bearer token - Routing → FastAPI dispatches to
/mcp/invoke,/mcp/tools, or/mcp/sse - Sentinel Pipeline →
Auditor.before()logs call,Guard.before()blocks sensitive keys - Registry →
auto_discover()scanscybernetics/adapters/and registers all concreteMCPAdaptersubclasses dynamically; executes tool via circuit breaker - Adapter → Async HTTP/SQL client calls downstream MCP server
- Response →
Auditor.after()logs result, circuit breaker state updated
3. Cybernetics MCP Server — Usage Guide
Cybernetics is a first-class MCP server that exposes its adapters and agent templates as tools over the Model Context Protocol. Any MCP client (Antigravity, Claude Code, Cursor, Devin, Vims etc.) can connect to it.
3.1 What Is the Cybernetics MCP Server?
The Cybernetics MCP server is a single stdio-based MCP peer that aggregates all configured adapters into one unified tool namespace. Instead of installing 20 separate MCP servers, you install one:
{
"mcpServers": {
"cybernetics": {
"command": "python",
"args": ["-m", "cybernetics.mcp"],
"env": {
"BROKER_API_KEY": "your-broker-key",
"POSTGRES_DSN": "postgresql+asyncpg://user:pass@localhost/sentinel"
}
}
}
}
Once connected, your MCP client sees all tools from all enabled adapters as a flat list:
| Tool | What it does |
|---|---|
dynatrace_get_problems | Fetch active problems from Dynatrace |
github_create_issue | Create a GitHub issue |
slack_post_message | Post to a Slack channel |
browser_screenshot | Take a browser screenshot via CDP |
sentinel_run | Execute the full Sentinel agent workflow |
deploy_trigger_pipeline | Trigger a GitLab CI/CD pipeline |
3.2 How It Works
┌─────────────┐ stdio ┌──────────────────────────────────────────┐
│ AntiGravity │ ◄──────────────► │ Cybernetics MCP Server │
│ Desktop │ JSON-RPC 2.0 │ ┌─────────────┐ ┌──────────────────┐ │
└─────────────┘ │ │ Registry │ │ Dynatrace │ │
│ │ (loads │──►│ GitHub │ │
│ │ adapters) │ │ Slack │ │
│ └─────────────┘ │ Browser... │ │
│ └──────────────────┘ │
└──────────────────────────────────────────┘
You do not configure each adapter individually. Adapters are loaded from the Cybernetics broker's registry based on the environment variables already set on the host.
3.3 Required Environment (Preset by Ops)
These are connection settings that your platform team configures once:
| Variable | Purpose | Example |
|---|---|---|
POSTGRES_DSN | Database connection | postgresql+asyncpg://... |
DYNATRACE_BASE_URL | Dynatrace tenant URL | https://xyz.live.dynatrace.com |
ELASTIC_CLOUD_ID | Elastic Cloud deployment ID | my-deployment:ZXUta2... |
GITLAB_URL | GitLab instance | https://gitlab.com |
ARIZE_ENDPOINT | Arize Phoenix URL | https://app.phoenix.arize.com |
DATADOG_SITE | Datadog region | datadoghq.com |
BROWSER_CDP_HOST | Browser CDP host | localhost |
BROWSER_CDP_PORT | Browser CDP port | 9222 |
3.4 Secret Keys (Injected per User / Team)
Set only the keys for the adapters you actually use. Adapters with no key
required (browser, chrome, firefox, brave, docker, postgres) are
omitted; they rely on preset connection settings from § 3.3.
Core
| Variable | Adapter | Where to get it |
|---|---|---|
BROKER_API_KEY | Cybernetics broker | Self-generated shared secret — openssl rand -hex 32. Set the same value on the broker process and in every MCP client config. |
GEMINI_API_KEY | Composer (Gemini) | https://aistudio.google.com/apikey |
Observability & Incident
| Variable | Adapter | Where to get it |
|---|---|---|
DYNATRACE_API_TOKEN | Dynatrace | Settings → Access tokens |
DATADOG_API_KEY / DATADOG_APP_KEY | Datadog | Org Settings → API Keys / Application Keys |
ELASTIC_API_KEY | Elastic | Stack Management → API Keys |
PAGERDUTY_API_KEY | PagerDuty | Profile → User Settings → API Access |
ARIZE_API_KEY | Arize | Settings → API Keys |
Source Control & CI/CD
| Variable | Adapter | Where to get it |
|---|---|---|
GITHUB_TOKEN | GitHub | Settings → Developer settings → PAT (fine-grained) |
GITLAB_TOKEN | GitLab | User Settings → Access Tokens |
VERCEL_TOKEN | Vercel | Account Settings → Tokens |
Cloud Infrastructure
| Variable | Adapter | Where to get it |
|---|---|---|
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY | AWS | IAM → Users → Security credentials |
CLOUDFLARE_API_TOKEN | Cloudflare | My Profile → API Tokens (Custom or "Edit zone") |
GOOGLE_SERVICE_ACCOUNT_KEY | All google-* adapters (25 services) | GCP → IAM → Service Accounts → Keys → Create (JSON) |
Productivity & Workspace
| Variable | Adapter | Where to get it |
|---|---|---|
SLACK_BOT_TOKEN | Slack | api.slack.com/apps → OAuth & Permissions (xoxb-…) |
NOTION_TOKEN | Notion | https://www.notion.so/my-integrations |
CONFLUENCE_API_TOKEN | Confluence | id.atlassian.com → Security → API tokens |
JIRA_API_TOKEN | Jira | id.atlassian.com → Security → API tokens |
ASANA_TOKEN | Asana | Profile Settings → Apps → Manage Developer Apps → PAT |
LINEAR_API_KEY | Linear | Settings → API |
AIRTABLE_API_KEY | Airtable | airtable.com/create/tokens |
Data & Databases
| Variable | Adapter | Where to get it |
|---|---|---|
MONGODB_URI | MongoDB | Atlas → Database Access → connection string |
REDIS_URL | Redis | redis://:<pass>@host:port/db |
SUPABASE_KEY | Supabase | Project Settings → API → service_role key |
SNOWFLAKE_ACCOUNT / SNOWFLAKE_USER / SNOWFLAKE_PASSWORD | Snowflake | Account admin |
FIVETRAN_API_KEY / FIVETRAN_API_SECRET | Fivetran | Account → API Config |
Commerce & Finance
| Variable | Adapter | Where to get it |
|---|---|---|
STRIPE_API_KEY | Stripe | Developers → API Keys (use restricted keys in prod) |
SHOPIFY_ACCESS_TOKEN / SHOPIFY_SHOP_DOMAIN | Shopify | Admin → Apps → Develop apps → Access token |
QUICKBOOKS_ACCESS_TOKEN / QUICKBOOKS_COMPANY_ID | QuickBooks | Intuit Developer → My Apps → OAuth 2.0 Playground |
Automation
| Variable | Adapter | Where to get it |
|---|---|---|
N8N_API_KEY | n8n | Settings → API → Create API key |
No-key adapters (preset config from § 3.3 only):
airtableconnection,brave,browser,chrome,docker,firefox,postgres.
3.5 Example: Using Cybernetics from Antigravity
Google Antigravity inherits VS Code's MCP wiring under the mcp.servers key.
Step 1: Install the broker:
pip install cybernetics-mcp
Step 2: Add to Antigravity's settings.json (Command Palette → Preferences: Open User Settings (JSON)):
{
"mcp.servers": {
"cybernetics": {
"command": "cybernetics-mcp",
"args": [],
"env": {
"BROKER_API_KEY": "$(openssl rand -hex 32)",
"GEMINI_API_KEY": "<aistudio-key>",
"POSTGRES_DSN": "postgresql+asyncpg://user:pass@localhost/cybernetics",
"DYNATRACE_BASE_URL": "https://xyz.live.dynatrace.com",
"DYNATRACE_API_TOKEN": "dt0c01.xxx"
}
}
}
}
Step 3: Ask the agent to use it:
"Check Dynatrace for active problems on the
apiservice, then post a summary to Slack#incidents."
The Antigravity agent will:
- Call
tools/listand seedynatrace_get_problems+slack_post_message. - Call
dynatrace_get_problemswith{ "service": "api" }. - Call
slack_post_messagewith the results.
3.6 Other clients
The broker speaks vanilla MCP — same JSON schema in Claude Desktop / Claude Code
(mcpServers), Cursor (.cursor/mcp.json), Codex CLI (~/.codex/config.toml, TOML),
Devin (dashboard), and Vims (vims_mcp_add_server). The Composer UI's
MCP Control Plane page renders copy-pasteable boilerplate for each.
3.7 Protocol Details
Implements MCP protocol 2024-11-05 over stdio (JSON-RPC 2.0):
| Method | Purpose |
|---|---|
initialize | Handshake + capability exchange |
tools/list | Discover all tools from all adapters |
tools/call | Invoke any tool by adapter_tool name |
Tool names are namespaced: dynatrace_get_problems, github_create_issue, browser_screenshot, etc.
4. Adapter Catalog (56 Adapters)
Non-Google Adapters
| Adapter | Protocol | Auth | Circuit | Tools (complete) |
|---|---|---|---|---|
airtable | REST | Bearer | airtable | airtable_list_bases, airtable_get_base, airtable_create_record |
arize | REST | Bearer | arize | arize_run_judge (Gemini), arize_log_eval |
asana | REST | Bearer | asana | asana_list_projects, asana_get_task, asana_create_task |
aws | boto3 | IAM / keys | aws | aws_s3_list_buckets, aws_s3_list_objects, aws_ec2_describe_instances, aws_lambda_list_functions, aws_lambda_invoke, aws_cloudwatch_get_metrics |
brave | Playwright | N/A | brave | brave_navigate, brave_evaluate, brave_screenshot, brave_click, brave_type, brave_set_viewport, brave_pdf, brave_check_shields |
browser | WebSocket CDP | N/A | browser | browser_navigate, browser_evaluate, browser_screenshot, browser_get_network_log, browser_get_console_log, browser_clear_cache |
chrome | WebSocket CDP | N/A | chrome | chrome_navigate, chrome_evaluate, chrome_screenshot, chrome_get_network, chrome_get_console, chrome_clear_cache, chrome_set_viewport, chrome_click, chrome_type, chrome_pdf |
cloudflare | REST | Bearer | cloudflare | cloudflare_list_zones, cloudflare_list_dns, cloudflare_create_dns, cloudflare_list_workers, cloudflare_deploy_worker |
confluence | REST | Api-Token | confluence | confluence_search_pages, confluence_get_page, confluence_create_page |
datadog | REST | DD-API-Key | datadog | datadog_query_metrics, datadog_list_monitors, datadog_get_monitor, datadog_mute_monitor, datadog_list_incidents, datadog_search_logs, datadog_post_event |
docker | REST / socket | N/A | docker | docker_list_containers, docker_run, docker_build, docker_logs |
dynatrace | REST | Api-Token | dynatrace | dynatrace_get_problems, dynatrace_get_traces, dynatrace_run_dql |
elastic | REST | ApiKey | elastic | elastic_search_incidents, elastic_search_runbooks, elastic_write_insight |
fivetran | REST | Basic | fivetran | fivetran_list_connectors, fivetran_get_connector_status, fivetran_sync_connector, fivetran_create_log_pipeline |
firefox | Playwright | N/A | firefox | firefox_navigate, firefox_evaluate, firefox_screenshot, firefox_get_console, firefox_click, firefox_type, firefox_set_viewport, firefox_pdf |
github | REST | token | github | github_create_issue, github_get_issue, github_create_pr, github_list_repos, github_trigger_workflow, github_search_code |
gitlab | REST | PRIVATE-TOKEN | gitlab | gitlab_create_issue, gitlab_create_mr, gitlab_get_file, gitlab_trigger_pipeline |
jira | REST | Api-Token | jira | jira_create_issue, jira_search_issues, jira_get_sprint, jira_transition_issue |
linear | GraphQL | Bearer | linear | linear_create_issue, linear_list_issues, linear_update_issue, linear_get_teams, linear_search_issues, linear_create_comment |
mongodb | TCP | URI | mongodb | mongodb_find, mongodb_insert, mongodb_aggregate, mongodb_index |
n8n | REST | Api-Key | n8n | n8n_list_workflows, n8n_trigger, n8n_get_execution |
notion | REST | Bearer | notion | notion_search, notion_get_page, notion_create_page, notion_query_database, notion_update_page, notion_get_database |
pagerduty | REST | Token | pagerduty | pagerduty_list_incidents, pagerduty_acknowledge, pagerduty_get_oncall |
postgres | TCP | DSN | postgres | postgres_recall_pattern, postgres_store_pattern, postgres_log_incident, postgres_get_recent_incidents |
quickbooks | REST | OAuth | quickbooks | qb_list_customers, qb_get_customer, qb_create_invoice, qb_list_invoices, qb_get_report |
redis | TCP | URI | redis | redis_get, redis_set, redis_publish, redis_stream_read |
shopify | REST | Access-Token | shopify | shopify_list_products, shopify_get_order, shopify_create_draft, shopify_update_inventory |
slack | REST | Bearer | slack | slack_post_message, slack_get_channel_history, slack_list_channels, slack_search_messages, slack_upload_file, slack_get_user_info |
snowflake | JDBC/REST | Key-pair | snowflake | snowflake_query, snowflake_list_warehouses, snowflake_share |
stripe | REST | Bearer | stripe | stripe_create_customer, stripe_get_customer, stripe_create_charge, stripe_list_invoices, stripe_create_subscription |
supabase | REST | apikey | supabase | supabase_select, supabase_insert, supabase_update, supabase_delete, supabase_rpc |
vercel | REST | Bearer | vercel | vercel_list_projects, vercel_get_deployment, vercel_list_deployments, vercel_add_env_var |
Google MCP Hub (25 Servers)
4.1 MCP Server Sources
| Adapter | Official MCP Server / Source |
|---|---|
airtable | Airtable MCP Server |
arize | Arize-ai/arize-tracing-assistant |
asana | Asana MCP Server |
aws | awslabs/mcp |
brave | brave/brave-search-mcp-server |
confluence, jira | Atlassian MCP Server |
browser / playwright | microsoft/playwright-mcp |
chrome | ChromeDevTools/chrome-devtools-mcp |
cloudflare | cloudflare/mcp-server-cloudflare |
datadog | datadog-labs/mcp-server |
dynatrace | dynatrace-oss/dynatrace-mcp |
elastic | elastic/mcp-server-elasticsearch |
fivetran | fivetran/fivetran-mcp |
firefox | mozilla/firefox-devtools-mcp |
github | github/github-mcp-server |
gitlab | GitLab MCP Server |
linear | Linear MCP Docs |
mongodb | MongoDB MCP Server Docs |
n8n | n8n MCP Server |
notion | makenotion/notion-mcp-server |
pagerduty | PagerDuty/pagerduty-mcp-server |
postgres | prisma/mcp |
quickbooks | intuit/quickbooks-online-mcp-server |
redis | redis/mcp-redis |
shopify | Shopify MCP Storefront |
slack | Slack MCP Server |
snowflake | Snowflake-Labs/mcp |
stripe | mcp/com.stripe/mcp |
supabase | Supabase MCP Guide |
vercel | vercel-labs/mcp-on-vercel |
Google MCP Servers — see the Google MCP Hub table above for all 24 individual server sources.
5. Agent Templates
5.1 Sentinel — Self-Healing SRE
Adapters: dynatrace, elastic, postgres, gitlab, arize, fivetran
Phases:
- Detect — Fetch active problems from Dynatrace
- Investigate — Hybrid search incidents + runbooks in Elastic
- Reason — Recall pattern from Postgres; if unknown, generate diagnosis
- Act — Create GitLab issue with auto-labels
- Verify — Poll Dynatrace traces with exponential backoff until error rate < 1%
- Evaluate — Gemini LLM-as-a-Judge scores diagnosis/action quality
- Learn — Upsert pattern + log incident to Postgres; trigger Fivetran sync
5.2 DeployAgent — CI/CD Orchestrator
Adapters: github, vercel, aws, postgres
Phases:
- Validate — Verify latest commit on branch
- Build — Trigger GitHub Actions workflow
- Deploy — Vercel deployment + S3 artifact sync
- Verify — Smoke test deployed URL via
httpx - Learn — Log deployment outcome to Postgres
5.3 FinanceAgent — Payment Anomaly Detection
Adapters: stripe, supabase, postgres
Phases:
- Detect — Flag invoices > $1,000 or duplicate charges in 24h window
- Investigate — Pull customer tier/history from Supabase
- Reason — Tier-based decision: flag_for_review / partial_refund / notify
- Act — Execute Stripe refund or insert review ticket
- Learn — Store pattern + log incident
5.4 InfraAgent — Infrastructure Optimization
Adapters: dynatrace, cloudflare, aws, postgres
Phases:
- Detect — Dynatrace latency spikes on service
- Investigate — DNS records (Cloudflare) + EC2 instances (AWS)
- Reason — Under-provisioned? Deploy CF Worker cache? Scale EC2?
- Act — Deploy Worker script or scale compute
- Verify — Poll Dynatrace traces until error rate < 1%
- Learn — Store remediation pattern
5.5 SecurityAgent — Vulnerability & Secret Scanning
Adapters: github, slack, postgres, cloudflare, datadog
Phases:
- Scan — Dependency checks + secret detection in GitHub repos
- Assess — Severity scoring (critical/high/medium/low)
- Triage — Slack alerts for critical findings
- Remediate — Auto-fix low-severity, ticket rest
- Verify — Re-scan to confirm remediation
- Learn — Store scan patterns in Postgres
5.6 DataAgent — ETL Pipeline Orchestration
Adapters: postgres, supabase, fivetran, slack
Phases:
- Extract — Pull from Supabase tables
- Validate — Quality scoring (nulls, duplicates)
- Transform — Deduplicate, normalize
- Load — Upsert into Postgres destination
- Monitor — Slack notification on completion
- Learn — Store pipeline patterns
5.7 OpsAgent — General DevOps Orchestration
Adapters: datadog, slack, github, linear, postgres
Phases:
- Observe — Datadog metrics + system health checks
- Diagnose — Crash loop? Memory pressure? Latency spike?
- Act — Restart deployment, scale replicas, create Linear ticket
- Notify — Slack #ops-alerts with diagnosis + actions
- Learn — Store remediation patterns in Postgres
5.8 ContentAgent — Content Operations
Adapters: notion, linear, slack
Phases:
- Plan — Outline content from Linear roadmap
- Draft — Generate in Notion
- Review — Slack approval workflow
- Publish — Schedule via Notion API
- Distribute — Cross-post to channels
- Learn — Engagement analytics → content strategy
5.9 CommerceAgent — E-commerce Operations
Adapters: stripe, supabase, aws, slack
Phases:
- Catalog — Sync product data from Supabase
- Pricing — Dynamic pricing rules
- Checkout — Stripe payment flow monitoring
- Fulfillment — AWS Lambda order processing
- Reconcile — Daily Stripe payout audit
- Notify — Slack revenue digest
5.10 GoogleWorkspaceAgent — Workspace Automation
Adapters: google-workspace, slack
Phases:
- Monitor — Scan Gmail for priority threads
- Triage — Label & route via Drive docs
- Draft — Compose Calendar invites + replies
- Schedule — Auto-book meetings from email context
- Notify — Slack summary of day's actions
- Archive — Move resolved threads to Drive folder
5.11 AtlassianAgent — Engineering Project Management
Adapters: jira, confluence, github, slack
Phases:
- Backlog — Jira grooming from Confluence specs
- Sprint — Auto-assign from GitHub commit velocity
- Review — PR checklist from Jira acceptance criteria
- Deploy — GitHub Actions → Jira transition
- Retro — Confluence retro doc + Slack poll
- Learn — Sprint velocity trend analysis
5.12 BrowserQAAgent — Frontend QA Automation
Adapters: browser, chrome, firefox, slack
Phases:
- Scan — Crawl sitemap for changes
- Test — Playwright regression suite
- Screenshot — Visual diff across Chrome + Firefox
- Compare — Baseline vs current pixel match
- Report — Slack #qa-alerts with diff links
- Learn — Flaky test pattern detection
5.13 CRMAgent — Sales Operations
Adapters: airtable, google-workspace, slack
Phases:
- Lead — Ingest leads from Gmail signature capture
- Qualify — Airtable scoring + Drive proposal lookup
- Proposal — Generate quote from Drive template
- Close — Gmail follow-up sequence + Slack win channel
- Onboard — Drive welcome kit + Calendar kickoff
- Nurture — Airtable campaign enrollment
5.14 ShopifyAgent — Shopify Store Ops
Adapters: shopify, stripe, postgres, slack
Phases:
- Inventory — Shopify stock sync to Postgres
- Pricing — Dynamic margin rules
- Order — Shopify webhook → Stripe charge verify
- Fulfill — Shipping label + tracking update
- Refund — Stripe refund → Shopify order adjust
- Review — Slack daily P&L digest
5.15 DatabaseOpsAgent — Polyglot Database Ops
Adapters: mongodb, redis, postgres, datadog, slack
Phases:
- Monitor — Datadog slow query alerts
- Diagnose — Explain plan + index health across all DBs
- Migrate — Postgres → MongoDB schema mapping
- Optimise — Redis eviction + MongoDB index rebuild
- Backup — Cross-DB snapshot verification
- Learn — Query pattern + cache hit rate trends
5.16 SREObservabilityAgent — Full-Stack Observability
Adapters: dynatrace, elastic, datadog, pagerduty, slack
Phases:
- Detect — Dynatrace anomaly + Elastic error spike correlation
- Correlate — Datadog cross-service trace linking
- Escalate — PagerDuty severity + on-call routing
- Remediate — Auto-runbook execution
- Verify — Dynatrace/Elastic post-fix metrics
- Learn — Incident post-mortem → runbook update
5.17 InfrastructureAgent — IaC & Container Ops
Adapters: docker, gitlab, aws, cloudflare, slack
Phases:
- Plan — GitLab CI pipeline + drift detection
- Build — Docker image build + scan
- Test — GitLab plan against AWS staging
- Deploy — Cloudflare Worker + ECS rollout
- Monitor — AWS CloudWatch + CF analytics
- Learn — Cost + performance delta analysis
6. Production Deployment
For local development see the Quick Start (Docker Compose) at the top of this document — that's the canonical entry point for both the composer service and the broker.
6.1 GCP Production (Cloud Run)
Prerequisites:
- GCP project with Cloud Run, Cloud SQL (Postgres 15+), Secret Manager enabled
- Service account with
roles/cloudsql.client,roles/secretmanager.secretAccessor
# 1. Create secrets
gcloud secrets create broker-api-key --data-file=<(openssl rand -hex 32)
gcloud secrets create gemini-api-key --data-file=<(echo -n YOUR_GEMINI_KEY)
gcloud secrets create postgres-dsn --data-file=<(echo -n "postgresql+asyncpg://user@/sentinel?host=/cloudsql/PROJECT:REGION:INSTANCE")
# 2. Build & deploy
gcloud builds submit --config cloudbuild.yaml
# 3. Verify
gcloud run services describe cybernetics-composer --region=us-central1
curl https://<URL>/healthz
curl https://<URL>/readyz
6.2 Cloud SQL Migration
# Apply schema
psql "host=/cloudsql/PROJECT:REGION:INSTANCE dbname=sentinel user=postgres" \
-f migrations/001_init.sql
6.3 Hardening Checklist
The composer image already enforces the in-container half (distroless nonroot,
read-only FS, cap_drop: ALL, cosign-signed, SBOM-attested). The deployment
half is the operator's responsibility:
- Cloud Run
--no-allow-unauthenticatedenforced (or OIDC viaOIDC_ISSUER/OIDC_AUDIENCE) - Cloud Armor WAF + rate-limit policy in front of Cloud Run
- VPC-SC perimeter restricts egress to approved APIs only
- Cloud SQL private IP + IAM database authentication
- Secret Manager rotation policy (90 days)
- Cloud Audit Logs enabled for
data_access,admin_activity -
govulncheck+trivy fsgates pass in CI (.github/workflows/composer-security.yml) - Container scanning via Artifact Registry + Container Analysis
Full control mapping in docs/CONTROLS_NIST_800_53.md;
threat model in docs/THREAT_MODEL.md.
7. Operations
7.1 Health & Readiness
# Liveness
curl https://<URL>/healthz
# Readiness (also verifies GEMINI_API_KEY presence)
curl https://<URL>/readyz
# Tool discovery
curl -H "Authorization: Bearer $API_KEY" https://<URL>/mcp/tools
# Circuit breaker status
curl -H "Authorization: Bearer $API_KEY" https://<URL>/mcp/circuits
# SSE health stream
curl -H "Authorization: Bearer $API_KEY" https://<URL>/mcp/sse
7.2 Structured Logging
Both surfaces emit JSON to stdout, captured by Cloud Logging.
Composer (Go, slog) — one line per HTTP request, correlation via X-Request-ID:
{
"time": "2026-05-19T14:32:01Z",
"level": "INFO",
"msg": "http.request",
"request_id": "3f8a1c2b9e0d",
"method": "POST",
"path": "/api/compose",
"status": 200,
"bytes": 4823,
"duration": 612,
"remote": "10.0.0.42"
}
Broker (Python) — one line per tool invocation, correlation via correlation_id:
{
"timestamp": "2026-05-19T14:32:01Z",
"level": "info",
"event": "tool_executed",
"adapter": "dynatrace",
"tool": "dynatrace_get_problems",
"latency_ms": 145,
"session_id": "a1b2c3",
"correlation_id": "req-xyz"
}
7.3 Runbook: Adapter Circuit Open
# 1. Diagnose
curl -H "Authorization: Bearer $API_KEY" https://<URL>/mcp/circuits
# → {"circuits": {"dynatrace": "OPEN"}}
# 2. Inspect Cloud Logging for failure reason
gcloud logging read "jsonPayload.breaker=dynatrace AND severity>=ERROR" --limit=10
# 3. Manual reset (if operator-verified)
# Restart Cloud Run revision to reset breaker state
gcloud run services update cybernetics-composer --region=us-central1
8. Testing
Composer (Go)
go vet ./...
go test -race -count=1 -coverprofile=cover.out ./...
go tool cover -func=cover.out | tail -1
# Static analysis & vulnerability gates (same as CI)
golangci-lint run # config: .golangci.yml
gosec -severity medium -confidence medium ./...
govulncheck ./...
trivy fs --severity CRITICAL,HIGH --ignore-unfixed .
Broker (Python)
pytest tests/ -v
pytest tests/ --cov=cybernetics --cov-fail-under=80
pip-audit --requirement requirements.txt
bandit -r cybernetics/
Container scan
gcloud artifacts docker images scan us-central1-docker.pkg.dev/PROJECT/cybernetics/composer:latest
CI runs the full composer gate on every push/PR — see .github/workflows/composer-security.yml.
9. Google ADK Integration
from cybernetics.adk.bridge import cybernetics_adk_agent
from google.adk.runners import Runner
runner = Runner(agent=cybernetics_adk_agent)
for event in runner.run("Deploy my-app to production"):
print(event)
10. Agent Composer
The React + TypeScript UI and Go backend that generate Python agent code via
Gemini, serve the public adapter catalog at /api/templates, and expose the
operational dashboard. See the Quick Start at
the top of this document for setup instructions — it is the canonical entry point.
Runtime config is fully env-driven; the composer-side env-var matrix is
documented in AGENTS.md (project-wide AI-agent guide) and
SECURITY.md (control posture).
Workflow:
- Pick Template — Choose from 18 agent templates (Sentinel, Deploy, Finance, Infra, Security, Data, Ops, Content, Commerce, Analytics, Google Workspace, Atlassian, Browser QA, CRM, Shopify, Database Ops, SRE Observability, Infrastructure)
- Select Adapters — Toggle any of the 56 MCP adapters
- Configure Keys — Enter API keys for selected adapters
- Compose — Gemini generates a custom Python agent class
- Deploy — One-click deploy to Google Cloud Run
API Endpoints:
| Endpoint | Method | Description |
|---|---|---|
/api/templates | GET | List all 18 templates + 56 adapters |
/api/compose | POST | Generate agent code via Gemini |
/api/deploy | POST | Return Cloud Run deployment command |
Example compose request:
curl -X POST http://localhost:4001/api/compose \
-H "Content-Type: application/json" \
-d '{
"template": "sentinel",
"adapters": ["dynatrace", "slack", "datadog"],
"env_vars": {"DYNATRACE_API_TOKEN": "xxx", "SLACK_BOT_TOKEN": "xoxb-xxx"},
"prompt": "Add a custom phase that posts a daily digest to Slack"
}'
11. Google ADK A2A, A2P & ERC-8004 Integration
Cybernetics agents implement Google's Agent-to-Agent (A2A) and Agent-to-Protocol (A2P) patterns for cross-agent interoperability.
11.1 A2A — Agent-to-Agent
Agents register capabilities in a shared A2ARegistry. Other agents can discover and invoke those capabilities dynamically.
from cybernetics.a2a.hooks import A2ACapability, get_a2a_registry
cap = A2ACapability(
id="sentinel_detect",
name="Sentinel Problem Detection",
description="Fetch active Dynatrace problems for a service",
input_schema={"service": {"type": "string"}},
output_schema={"problems": {"type": "array"}},
)
get_a2a_registry().register_capability(cap)
11.2 A2P — Agent-to-Protocol
Agents can subscribe to or emit protocol events for decoupled coordination.
from cybernetics.a2a.hooks import A2PProtocol, get_a2a_registry
proto = A2PProtocol(
id="incident_v1",
name="Incident Stream",
version="1.0",
schema_uri="https://cybernetics.dev/schemas/incident.json",
event_types=["detected", "resolved", "escalated"],
)
get_a2a_registry().register_protocol(proto)
11.3 ERC-8004 (8004.org)
ERC-8004 is an Ethereum standard for agent capability discovery and identity, authored by Google. Cybernetics implements the on-chain resolution contract via ERC8004Resolver.
from cybernetics.a2a.hooks import get_erc8004_resolver
resolver = get_erc8004_resolver()
# Query which capabilities are available
resolver.resolve(["sentinel_detect", "deploy_trigger"])
# → {"sentinel_detect": {"available": true, ...}, ...}
# Negotiate intersecting capabilities with a remote agent
resolver.negotiate([{"id": "sentinel_detect"}, {"id": "unknown_cap"}])
# → ["sentinel_detect"]
Reference: 8004.org
12. Extending Cybernetics
Cybernetics is designed to be easily extensible. Adapters placed in cybernetics/adapters/ are automatically discovered and registered at startup via auto_discover(). To add a new MCP adapter, follow these steps:
1. Create the Adapter Class
Create a new file in cybernetics/adapters/ (e.g., my_service.py). Inherit from MCPAdapter and implement the required methods:
from typing import Dict, Any
from cybernetics.adapters.base import MCPAdapter
from cybernetics.config.settings import settings
class MyServiceAdapter(MCPAdapter):
name = "myservice"
description = "Integration with MyService API"
def __init__(self):
super().__init__()
self._api_key = settings.myservice_api_key
# Initialize your client (e.g., httpx.AsyncClient)
self._setup_tools()
def _setup_tools(self):
self.register_tool(
"myservice_get_data",
"Fetch data from MyService",
{"id": {"type": "string"}},
["id"],
self._get_data,
)
async def _get_data(self, id: str):
# Implementation logic
return {"id": id, "data": "..."}
async def health(self) -> Dict[str, Any]:
return {"status": "healthy"}
2. Add Configuration
Add any required environment variables to cybernetics/config/settings.py using Pydantic Field with an alias:
# MyService
myservice_api_key: str = Field("", alias="MYSERVICE_API_KEY")
3. Auto-Registration (No manual step needed)
Because auto_discover() scans cybernetics/adapters/ at startup, your adapter will be picked up automatically. No imports or manual registration required.
If your adapter lives outside the standard directory, register it explicitly:
from cybernetics.adapters.my_service import MyServiceAdapter
from cybernetics.registry.manager import register_adapter
register_adapter("myservice", MyServiceAdapter)
4. Verify
Run the integration tests and ensure your new adapter is listed in /mcp/tools.
13. Threat Model & Security Posture
Full STRIDE analysis lives in docs/THREAT_MODEL.md. Per-surface highlights:
Composer service (Go, cmd/composer/)
| Threat | Mitigation | Verification |
|---|---|---|
| Anonymous API access | BearerAuth (constant-time) or OIDCAuth (RS256 JWT) | internal/middleware/middleware_test.go, internal/oidc/oidc_test.go |
| CSRF / hostile origin | Strict CORS allowlist; no wildcard echo | TestCORS_AllowlistOnly |
| Body-size DoS | MaxBody (1 MiB default, env-tunable) | TestMaxBody_Enforces413OnOversize |
| Per-IP request flood | Token-bucket rate limiter | TestRateLimiter_* |
| Panic stack-trace leak | Recover middleware → generic 500 | TestRecover_TurnsPanicInto500 |
| Container escape | Distroless nonroot, cap_drop: ALL, no-new-privileges, read-only FS | Dockerfile, docker-compose.yml |
| Supply-chain compromise | stdlib-only Go, cosign keyless sign, CycloneDX SBOM attest, govulncheck + Trivy CI gates | .github/workflows/composer-security.yml |
| Missing audit trail | slog JSON with X-Request-ID correlation on every request | internal/middleware/middleware.go |
Broker service (Python, cybernetics/broker/)
| Threat | Mitigation | Verification |
|---|---|---|
| Secret exfiltration from image | Multi-stage build; .env excluded; secrets via --set-secrets | docker inspect shows no Env secrets |
| Unauthorized broker access | --no-allow-unauthenticated + Identity-Aware Proxy (IAP) | gcloud run services describe |
| Timing attacks on API key | hmac.compare_digest + random delay on mismatch | Static analysis via bandit |
| DQL / SQL injection | Regex allow-list sanitization (_sanitize_dql) + parameterized queries | Unit test test_dql_sanitization |
| SSRF via adapter callbacks | URL prefix validation, no redirects, httpx timeout caps | Respx mock tests |
| ReDoS in regex filters | Bounded regex (^...$), no .* backtracking | Code review |
| Credential leakage in logs | Guard sentinel blocks keys named password, secret, token | test_guard_blocks_sensitive |
| Async blocking I/O | All clients are httpx.AsyncClient, asyncpg, etc. | pytest-asyncio coverage |
Compliance Mapping
Full control-by-control coverage is in docs/CONTROLS_NIST_800_53.md (38 controls across 9 NIST 800-53 Rev 5 families, 66% fully implemented). Highlights:
- NIST 800-53 Rev 5: AC-3, AU-2/3/10, CM-2/6/7/8, SC-5/7/8/13/17, SI-7/10/11 — all ✅. Full STRIDE analysis in
docs/THREAT_MODEL.md. - FedRAMP Moderate: in-container controls covered; deployment controls (TLS, IdP, log storage) are operator-supplied via Cloud Run + Cloud SQL + Secret Manager.
- SOC 2 Type II: structured JSON audit logs with
X-Request-IDcorrelation, captured by Cloud Logging.
14. License & Attribution
Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
See LICENSE for the full text and NOTICE for third-party attributions.
Network use is distribution under the AGPL: anyone who interacts with this software over a network is entitled to receive the corresponding source.
Authors: plasmaraygun, GoryGrey, royhodge812, sebuh-infsol
For operational issues, contact the maintainers via GitHub Security Advisories. Do not open public issues for security-sensitive topics.