A hardened MCP (Model Context Protocol) server that provides dev-only proxies, contract tools, and inter-agent communication for A1 (Astro), A2 (Flutter), and A3 (Backend) to collaborate seamlessly.
- Contract-first API: OpenAPI spec as source of truth
- Schema validation: JSON Schema validation with AJV before proxying
- Dev-only proxies: Secure proxy mode that blocks production calls
- Inter-agent communication: Messages, shared state, and task coordination
- PII redaction: Safe logging with email/amount redaction
- Environment management: Separate dev (emulator) and prod base URLs
- Health checks: Built-in health monitoring for both environments
- TypeScript: Full type safety with structured error responses
# Install dependencies
npm install
# Copy environment template (optional - only for log level)
cp .env.example .env
# Build the server
npm run build
# Start the server
npm run devcontracts_read_openapi- Returns OpenAPI specification with version and changelogcontracts_read_schema- Returns JSON schema for specific endpoints (order.create,subscribe.create)
env_get_api_base(target)- Get API base URL for dev (emulator) or prod environment
api_orders_create(payload, target)- Create order with validation (dev-only proxy)api_subscribe_create(payload, target)- Create subscription with validation (dev-only proxy)healthz(target)- Health check for target environment
agents_send_message(from, to, content)- Send message to another agentagents_get_messages(agentId, unreadOnly)- Get messages for your agentagents_mark_read(messageId, agentId)- Mark message as readagents_list_active()- List currently active agents
state_set(key, value, updatedBy)- Set shared state for other agentsstate_get(key)- Get shared state by keystate_list_keys()- List all available shared state keys
tasks_create(title, description, createdBy, priority)- Create coordination tasktasks_assign(taskId, assignedTo, assignedBy)- Assign task to agenttasks_update_status(taskId, status, updatedBy)- Update task statustasks_get_queue(status, assignedTo)- Get tasks (with optional filters)
- A1: Astro frontend agent
- A2: Flutter mobile agent
- A3: Backend/coordination agent
- "all": Broadcast to all agents
A1 ↔ A2: Frontend coordination (UI consistency, shared components)
A1 ↔ A3: Backend integration, API changes, deployment coordination
A2 ↔ A3: Mobile-specific backend needs, push notifications, offline sync
A1 ↔ A2 ↔ A3: Project-wide announcements, major changes, task coordination
- Message:
agents_send_message("A3", "A1", "API endpoint updated, please test") - Shared State:
state_set("current_api_version", "1.2.0", "A3") - Task:
tasks_create("Update mobile UI", "Implement new design system", "A1", "high")
| Tool | Arguments | Description |
|---|---|---|
contracts_read_openapi |
None | Returns full OpenAPI spec |
contracts_read_schema |
name: "order.create" | "subscribe.create" |
Returns specific JSON schema |
env_get_api_base |
target: "dev" | "prod" |
Returns base URL for environment |
api_orders_create |
payload: object, target: "dev" | "prod" |
Creates order (prod blocked) |
api_subscribe_create |
payload: object, target: "dev" | "prod" |
Creates subscription (prod blocked) |
healthz |
target: "dev" | "prod" |
Health check for environment |
Development (target: "dev"): ✅ Allowed
- Proxies to emulator base URL
- Full validation and error handling
- Safe for development and testing
Production (target: "prod"): ❌ Blocked
- Returns structured error with clear message
- Prevents accidental production calls from MCP
- Forces proper authentication in app clients
{
"ok": false,
"status": 403,
"body": {
"error": "Proxy disabled in prod; call from app clients with App Check/Auth",
"target": "prod",
"proxyMode": "dev-only"
}
}Add to your VS Code settings:
{
"augment.mcpServers": {
"roze-bridge": {
"command": "node",
"args": ["c:\\repos\\roze-mcp\\dist\\server.js"],
"env": {
"API_BASE_DEV": "http://127.0.0.1:5001/PROJECT_ID/us-central1",
"API_BASE_PROD": "https://REGION-PROJECT_ID.cloudfunctions.net",
"PROXY_MODE": "dev-only",
"LOG_LEVEL": "info"
}
}
}
}Or in Augment Settings UI:
- Name:
roze-bridge - Command:
node c:\repos\roze-mcp\dist\server.js - Environment Variables:
API_BASE_DEV:http://127.0.0.1:5001/PROJECT_ID/us-central1API_BASE_PROD:https://REGION-PROJECT_ID.cloudfunctions.netPROXY_MODE:dev-only(recommended)LOG_LEVEL:info(optional)
npm run dev # Start with hot reload
npm run build # Build TypeScript
npm run start # Run built server
npm run check:schemas # Validate schemassrc/server.ts- MCP server entrypointsrc/mcp.ts- Tool registration and validationsrc/http.ts- HTTP client helperssrc/config.ts- Environment configurationschemas/- JSON Schema definitionscontracts/- OpenAPI specifications