
nicolepcx/o_reilly_demo_day_mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
This repository contains the code and Docker setup for the session:
개요
This repository contains the code and Docker setup for the session: - generating Python solutions, - testing and benchmarking them inside a , - refining based on structured feedback, - and evolving code together toward higher quality. MCP acts as the between reasoning agents, enabling . This is a step toward . Traditional local execution (like a Python REPL) comes with risks and limitations: - : Executing arbitrary generated code on the host machine can lead to data leaks or system damage. - : Mistakes (e.g. infinite loops, recursion errors) can hang the process. - : Running code on multiple agents across nodes requires orchestration and sandboxing. - Runs Python in , sandboxed from the host OS. - Automatically into the sandbox when needed. - Captures cleanly. - Works (e.g. Kubernetes with gVisor). - Provides a , not just tool calls. This makes MCP an excellent fit for where reasoning agents collaborate safely. - installed (version 24+ recommended).
README
원문 README의 일부입니다. 원문 보기.
MCP + MCTS Coding Agents
This repository contains the code and Docker setup for the O’Reilly Demo Day session:
O’Reilly Demo Day
Building Robust AI Apps and Agents with MCP
Demo Overview
This code shows how autonomous agents can use MCP not just to connect with tools but to communicate with each other.
We run a multi-agent coding system where agents collaborate by:
- generating Python solutions,
- testing and benchmarking them inside a sandbox,
- refining based on structured feedback,
- and evolving code together toward higher quality.
MCP acts as the shared protocol between reasoning agents, enabling structured coordination, reflection, and continuous innovation.
This is a step toward self-improving AI systems.
Why MCP?
Traditional local execution (like a Python REPL) comes with risks and limitations:
- Security risks: Executing arbitrary generated code on the host machine can lead to data leaks or system damage.
- Lack of isolation: Mistakes (e.g. infinite loops, recursion errors) can hang the process.
- Difficult scaling: Running code on multiple agents across nodes requires orchestration and sandboxing.
MCP (Model Context Protocol) solves these problems:
- Runs Python in Pyodide + Deno, sandboxed from the host OS.
- Automatically installs packages into the sandbox when needed.
- Captures stdout, stderr, and return values cleanly.
- Works across nodes and clusters (e.g. Kubernetes with gVisor).
- Provides a shared protocol for inter-agent communication, not just tool calls.
This makes MCP an excellent fit for multi-agent systems where reasoning agents collaborate safely.
Prerequisites
- Docker installed (version 24+ recommended).
- An OpenAI API key stored in a
.envfile.
Your .env file should look like this:
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4o
Step 1: Build Docker image
The provided Dockerfile builds a container with:
- Python 3.11 slim
- Deno (for MCP Pyodide backend)
- mcp-run-python, treequest, langgraph, langchain-openai, and other dependencies
Build the image:
docker build -t mcp-run-python:latest .
Step 2: Start the MCP server (stdio mode)
This runs the Python MCP server inside the container:
docker run --rm -it mcp-run-python:latest /usr/local/bin/entrypoint.sh stdio
Step 3: Run the Tree Search + MCP Demo
From the project root, run:
docker run --rm -it \
--env-file .env \
-v "$PWD":/app -w /app \
mcp-run-python:latest \
python treesearch_fib.py
This executes the LangGraph + TreeQuest + MCP sandboxed agents pipeline. The system will:
- Iteratively generate Fibonacci implementations,
- Run unit tests and benchmarks in the sandbox,
- Refine the code based on structured feedback,
- Track performance improvements step by step,
설치
docker run --rm -it mcp-run-python:latest /usr/local/bin/entrypoint.sh stdio