MCP Verified Agent Loop
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Verified Agent LoopAdd a slugify helper with tests in the sandbox and show me the diff for approval."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Verified Agent Loop
A small, public engineering showcase for MCP, AI-agent tooling, verification gates, and human-in-the-loop review.
This project demonstrates the workflow I use when working with AI coding agents:
inspect codebase
→ plan
→ implement through bounded tools
→ lint / syntax / tests
→ inspect diff
→ human approval
→ audit trailThe important part is not that an agent can write code. The important part is that its capabilities are bounded and its changes are verifiable.
What this demonstrates
Model Context Protocol (MCP) over stdio
Tool-connected agent workflow
Sandboxed repository access
Path traversal protection
Protected-path rules
Bounded file writes
No generic shell tool
Allowlisted verification commands
Test gates before approval
Git diff inspection
Human approval
JSON audit trail
Cross-platform TypeScript / Node.js implementation
CI that runs the entire verified demo without API keys
Related MCP server: Hoplon
Architecture
flowchart LR
A[Agent / Deterministic Planner] -->|MCP stdio| B[Workspace MCP Server]
B --> C[Inspect]
B --> D[Write]
B --> E[Verify]
B --> F[Diff]
C --> G[Sandbox]
D --> G
E --> G
F --> G
F --> H[Human Approval]
A --> I[Audit Trail]
H --> ISee docs/architecture.md for the trust boundaries and design choices.
MCP tools
Tool | Purpose | Safety boundary |
| Explore repository structure | workspace only |
| Read text files | 100 KB max |
| Search source text | workspace only |
| Apply a bounded change | 50 KB max, protected paths blocked |
| Run syntax/tests | named allowlist only |
| Review resulting change | fixed git diff command |
The server intentionally does not expose arbitrary shell execution.
Run it
Requirements:
Node.js 22+
Git
npm install
npm run verifyFor an interactive human-approval prompt:
npm run demoFor CI / non-interactive demonstration:
npm run demo -- --approveWhat the demo agent does
The demo starts from a clean fixture repository that already contains a titleCase utility.
Task:
Add a production-friendly
slugify(value)helper and tests without breakingtitleCase.
The agent then:
lists the repository through MCP;
reads the relevant source and package file;
searches for an existing
slugify;produces a change plan;
writes source and tests through MCP;
runs fixed syntax verification;
runs tests;
asks the MCP server for the git diff;
requires approval;
writes an audit record.
The demo workspace is isolated under .agent-workspace/ and is rebuilt from scratch each run.
Why no LLM API key is required
This public repo uses a deterministic planner so anyone can reproduce the workflow in CI.
The engineering proof is the boundary: MCP client/server integration, tool design, sandboxing, verification, diff review, approval, and auditability.
A model adapter can replace the planning policy without changing those boundaries.
Security
Read SECURITY.md.
Highlights:
no arbitrary filesystem access
no arbitrary shell command execution
no environment-file access
no employer/private code
explicit human review before acceptance
Tech
TypeScript · Node.js 22 · MCP TypeScript SDK · Zod · Vitest · Git
Author
Yuttakan Phunkhlang
Software Engineer / Full-Stack Developer
Nuxt.js · Vue.js · TypeScript · Go · AI Coding Agents · MCP
This server cannot be deployed
Maintenance
Related MCP Connectors
Identity, authorization, audit trails, and revocable permissions for AI agents accessing MCP tools.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceProvides bounded repository context and edit-grant MCP tools to coding agents such as Codex, indexing local repositories and enabling fingerprint-checked patch application.12Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents and hosts to enforce deterministic repository boundaries via MCP, providing structured reads, supervised edits, snapshots, audits, and recovery with machine-readable evidence.MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to manage local project files and Git operations through MCP tools, including file CRUD, search, Git status, recent commits, and project summaries.-
- FlicenseNot gradedqualityBmaintenanceEnables reproducible evaluation of AI coding agents by exposing repository inspection, code editing, test running, and deterministic verification through MCP tools.-