feat: add local tools and read-only remote MCP servers

Increment 6 of .scratch/solution-architect-agent/spec.md, test-first.

- app/tools/mcp.py: MCP client and catalog exposing only allowlisted,
  readOnlyHint tools as framework-neutral ToolSpecs; unreachable servers
  and failed calls become discovery gaps; ADC auth with quota project.
- app/tools/local.py: Mermaid structure check and Terraform fmt,
  validate and plan in a scratch copy; apply is never constructed.
- Tool factory gives roles their named local tools and bundle MCP
  servers; pillar advisors get general-tier documentation tools.
- providers/gcp.yaml: 42 allowlisted tools reviewed against live
  tools/list of 12 Google Cloud MCP servers (snapshot in
  providers/reviews/), excluding data-reading and secret-capable tools.
- scripts/list-mcp-tools.py, docs/operations/mcp-access.md (IAM deny
  policy, service account roles), cloud-discovery and iac-validation
  Skills, MCP and Terraform settings, pytest asyncio auto mode.
- 31 new tests; full suite 189 passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 10:14:05 +01:00
parent f040493583
commit ed104e5697
37 changed files with 2302 additions and 65 deletions

View File

@@ -18,14 +18,14 @@ models:
# Skills each role may load. Role files stay provider-neutral; the bundle names Skills.
role_skills:
orchestrator: [google-cloud-solution-architecture]
requirements-analyst: [google-cloud-solution-architecture]
requirements-analyst: [google-cloud-solution-architecture, cloud-discovery]
decomposer: [google-cloud-solution-architecture]
product-selector: [google-cloud-solution-architecture]
diagrammer: [google-cloud-solution-architecture]
describer: [google-cloud-solution-architecture]
design-advisor: [google-cloud-solution-architecture]
iac-author: [google-cloud-solution-architecture]
validator: [google-cloud-solution-architecture]
iac-author: [google-cloud-solution-architecture, iac-validation]
validator: [google-cloud-solution-architecture, iac-validation]
packager: [google-cloud-solution-architecture]
# One advisor per architecture-framework pillar; each loads only its pillar's Skill.
@@ -45,58 +45,104 @@ mcp_auth:
kind: google_adc # Application Default Credentials bearer token; sends X-Goog-User-Project
# Remote MCP servers hosted by Google Cloud (streamable HTTP).
# `allow` lists stay empty (nothing exposed) until each server's tools/list is
# reviewed for read-only tools in increment 6 of .scratch/solution-architect-agent/spec.md.
# `allow` lists name the only tools ever exposed. Reviewed 2026-09-16 against each
# server's live tools/list (scripts/list-mcp-tools.py): inventory and configuration
# metadata only, every tool readOnlyHint=true. Deliberately excluded even though
# read-only: data content (Cloud SQL execute_sql_readonly, Storage read_object/read_text,
# list_objects), generic Kubernetes reads that can return Secrets (get_k8s_resource,
# describe_k8s_resource), and every write. See docs/operations/mcp-access.md.
mcp_servers:
developer_knowledge:
url: https://developerknowledge.googleapis.com/mcp
tier: general # public documentation, no customer data
allow: []
allow:
- search_documents
- get_documents
- answer_query
resource_manager:
url: https://cloudresourcemanager.googleapis.com/mcp
tier: cloud_read
allow: []
allow:
- search_projects
asset_inventory:
url: https://cloudasset.googleapis.com/mcp
tier: cloud_read
allow: []
allow:
- list_assets
- analyze_iam_policy
preview: true
compute:
url: https://compute.googleapis.com/mcp
tier: cloud_read
allow: []
allow:
- list_instances
- get_instance_basic_info
- list_instance_attached_disks
- list_instance_group_managers
- get_instance_group_manager_basic_info
- list_instance_templates
- get_instance_template_properties
- list_disks
- get_disk_basic_info
- list_reservations
- list_commitments
gke:
url: https://container.googleapis.com/mcp
tier: cloud_read
allow: []
allow:
- list_clusters
- get_cluster
- list_node_pools
- get_node_pool
- get_k8s_version
cloud_run:
url: https://run.googleapis.com/mcp
tier: cloud_read
allow: []
allow:
- list_services
- get_service
cloud_sql:
url: https://sqladmin.googleapis.com/mcp
tier: cloud_read
allow: []
allow:
- list_instances
- get_instance
storage:
url: https://storage.googleapis.com/storage/mcp
tier: cloud_read
allow: []
allow:
- list_buckets
pubsub:
url: https://pubsub.googleapis.com/mcp
tier: cloud_read
allow: []
allow:
- list_topics
- get_topic
- list_subscriptions
- get_subscription
iam:
url: https://iam.googleapis.com/mcp
tier: cloud_read
allow: []
allow:
- list_roles
- get_role
- list_deny_policies
- get_deny_policy
monitoring:
url: https://monitoring.googleapis.com/mcp
tier: cloud_read
allow: []
allow:
- list_alert_policies
- get_alert_policy
- list_dashboards
- list_metric_descriptors
- list_timeseries
network_intelligence:
url: https://networkmanagement.googleapis.com/mcp
tier: cloud_read
allow: []
allow:
- list_connectivity_tests
- get_connectivity_test
preview: true
role_mcp_servers: