How WCP Works
Architecture Overview
Section titled “Architecture Overview”Core Entities
Section titled “Core Entities”AppConnection
Section titled “AppConnection”Represents an MCP server process. Stores the command, args, and env needed to start it.
{ "name": "notion", "command": "npx", "args": ["-y", "mcp-notion-server"], "env": {"NOTION_TOKEN": "secret_xxx"}}CapabilityBinding
Section titled “CapabilityBinding”A classified MCP tool — WCP knows whether it reads, writes, or lists.
{ "app": "notion", "mcp_tool_name": "query_database", "capability_id": "read_database", "direction": "read"}SyncLink
Section titled “SyncLink”A directed edge: source capability → target capability.
{ "wcp_id": "notion:page_123", "source_app": "notion", "source_capability": "read_page", "target_app": "sheets", "target_capability": "write_row"}SyncLog
Section titled “SyncLog”An immutable record of each sync operation (success or error).
Sync Execution Flow
Section titled “Sync Execution Flow”SyncEngine.run()loads all active SyncLinks from the store- For each link, ConnectorHub spawns (or reuses) the source MCP process
- Calls the source MCP tool via JSON-RPC to fetch data
- ConnectorHub spawns (or reuses) the target MCP process
- Calls the target MCP tool with the transformed payload
- ConflictResolver checks for hash-based conflicts
- SyncLog is written to SQLite
- WebSocket event is broadcast to all connected dashboard clients