microsoft / microsoft/agent-framework

Python: Integration: cowork-to-code-bridge for local Claude Code execution in agents

Open
#6,541 0 comments 0 reactions 1 assignee View on GitHub

@sphenry is already working on this.

Since Jun 17, 2026.

agents python
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

## Problem

Agent Framework users building enterprise agents need reliable local execution for code-heavy tasks without:
- Separate API key management
- Cloud-only execution models
- Additional billing outside existing subscriptions

## Solution: cowork-to-code-bridge MCP Provider

**cowork-to-code-bridge** provides exactly that: agents escalate to Claude Code on the user's infrastructure using their existing subscription.

### Key Features

- ✅ **No API keys** — uses Claude subscription on the user's machine
- ✅ **Full local context** — agent has access to repos, shell, MCPs, environment
- ✅ **MCP standard** — JSONRPC 2.0 over stdio (native protocol)
- ✅ **Zero network ports** — file-based queue, token-authenticated
- ✅ **Production-ready** — 570 lines + 9 unit tests

### How It Works

**Agent Framework config:**
```json
{
"providers": {
"claude-code-bridge": {
"type": "mcp",
"command": "cowork-to-code-bridge-mcp",
"args": ["--stdio"],
"env": {"BRIDGE_ROOT": "$HOME/.cowork-to-code-bridge"}
}
}
}
```

**Agent escalates work:**
```python
result = agent.escalate(
tool="escalate_to_claude",
request="Debug the API failure and propose fix",
wait_seconds=600
)
```

## Why This Matters

Agent Framework users building enterprise agents need reliable local execution for code-heavy tasks. cowork-to-code-bridge provides that without API key management: agents escalate to Claude Code on the user's infrastructure using their existing subscription.

Cost-effective, local-first alternative to cloud APIs.

## Reference Implementation

- **GitHub:** https://github.com/abhinaykrupa/cowork-to-code-bridge
- **MCP Docs:** https://github.com/abhinaykrupa/cowork-to-code-bridge/blob/main/docs/MCP_SERVER_IMPLEMENTATION.md
- **Live examples:** Crew.ai, Hermes, Open Claw

## Proposed Action

Options:
1. Integration example showing MCP bridge provider in Agent Framework config
2. Use case: "Build → test → debug workflow with local Claude Code execution"
3. Or link from docs to our starter repo

(Happy to contribute any of these.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.