System architecture diagram

Light mode interface Dark mode interface

Component overview

MCP client

The MCP client is the entry point of the system. It establishes a WebSocket connection, sends code execution requests, and receives results and approval decisions.

MCP server

The MCP server orchestrates communication between components. It manages WebSocket connections, registers tools, handles security tokens, and coordinates code evaluation and execution workflows.

Approver client

The approver client enables human-in-the-loop security. It receives approval requests, allows interactive review of code execution, and sends approval or rejection decisions.

Code execution environment

Code execution occurs in an isolated GitHub Codespace on your own private repo set up when getting started with Keyboard. It securely evaluates and runs interpolated code, then returns the result.

Workflow steps

  1. Initiation: MCP connects via WebSocket
  2. Planning: User creates a planning token
  3. Evaluation: Code is security evaluated
  4. Approval: Approver reviews and decides
  5. Execution: Code runs in codespace
  6. Review: User reviews and decides to send back response
  7. Response: Result returned to MCP Client

Security mechanisms

The system uses token-based authentication over WebSocket and encrypts all messages. It ensures safety through isolated execution environments, single-use tokens, and human approval for sensitive operations.

Key technologies

WebSocket enables real-time communication between components. GitHub Codespaces, a token-based security model, and Zod for runtime validation power the system’s execution and safety guarantees.

Configuration

The system supports customizable WebSocket parameters, reconnection logic, approval timeouts, and encryption settings. These options allow flexible integration into different environments and workflows.