RFC-044: Prism MCP Agent Integration
Status: Proposed Author: Platform Team Created: 2025-10-22 Updated: 2025-10-22
Abstract
This RFC specifies prism-mcp, a Model Context Protocol (MCP) server that enables AI agents (like Claude) to interact with Prism as first-class data access clients. The tool provides agent-oriented APIs for publishing/subscribing to messages, using the mailbox pattern as a subscribable entity for agent-to-agent messaging, and managing namespace-scoped data access with full authentication and authorization support.
Motivation
Problem Statement
AI agents require reliable, persistent communication channels to:
- Coordinate work: Multi-agent systems need message queues for task distribution
- Store state: Agents need persistent key-value storage for context/memory
- Subscribe to events: Agents should react to events from other systems/agents
- Query history: Agents need searchable message history for context retrieval
- Maintain identity: Each agent needs authenticated identity with proper access control
Currently, agents must:
- Use ad-hoc file systems or external services for state
- Implement custom messaging infrastructure
- Handle authentication/authorization manually
- Build query interfaces from scratch
Goals
- Agent-Native Data Access: Provide MCP tools that feel natural for agent workflows
- Mailbox Pattern Integration: Enable agents to subscribe to personal mailboxes for async messaging
- Namespace Isolation: Each agent/project gets isolated namespaces with proper authorization
- TypeScript + STDIO: Leverage MCP's TypeScript ecosystem with STDIO transport
- Full Prism Integration: Expose Prism's patterns (Producer, Consumer, KeyValue, Mailbox) via MCP
- Authentication: Support OAuth2, API keys, and developer identity for local testing
- Query Capabilities: Enable agents to search mailbox history by headers (principal, topic, correlation_id)
Non-Goals
- Admin Operations: MCP tool focuses on data plane, not control plane management
- Schema Registry: Schema evolution/validation deferred to separate RFC
- Multi-Region Failover: DNS-based discovery sufficient for initial version
- Custom Serialization: JSON and protobuf only (no custom formats)
Architecture Overview
MCP Server Architecture
┌────────────────────────────────────────────────────────────┐
│ AI Agent (Claude) │
│ │
│ "Publish order-123 to orders topic" │
│ "Subscribe to my mailbox" │
│ "Query messages from user-123" │
└────────────────────────┬───────────────────────────────────┘
│ MCP Protocol (STDIO)
│
┌────────────────────────▼───────────────────────────────────┐
│ Prism MCP Server │
│ (TypeScript + STDIO) │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ MCP Tool Handlers │ │
│ │ │ │
│ │ - prism_create_namespace │ │
│ │ - prism_publish │ │
│ │ - prism_subscribe_mailbox │ │