Skip to content

Add local code execution example with cowork-to-code-bridge #153

@abhinaykrupa

Description

@abhinaykrupa

Problem

The quickstart resources could benefit from a "local code execution" example showing how agents can execute code locally using MCP servers.

Solution: cowork-to-code-bridge Quickstart Example

cowork-to-code-bridge demonstrates how to build a stateful MCP server with async escalation patterns—a pattern useful for many server types.

What This Teaches

  • JSONRPC protocol implementation via stdio
  • Tool discovery mechanism for MCP servers
  • Polling pattern for handling async operations
  • Stateful server patterns (escalation queue)
  • Local execution backends

Example Structure

examples/local-code-execution/
├── README.md (setup + usage)
├── client.py (simple agent using bridge)
├── config.json (MCP config)
└── test_integration.py (verify it works)

Why This Matters

Server authors need reference implementations showing how to handle async operations, polling, and escalation patterns. This example provides that guidance.

Reference Implementation

Happy to contribute the example if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions