Inspect a repository with an AI client
In this tutorial, Codex launches mergeway-mcp over stdio and inspects the fixed examples/full repository. The server cannot modify records, and the allow-list exposes only User and Post.
Prerequisites
- Codex CLI with local stdio MCP support.
mergeway-cliandmergeway-mcpv0.10.0 onPATH.- A v0.10.0 source archive containing
examples/full.
1. Validate and locate the repository
From the extracted source archive:
mergeway-cli --root examples/full validate
cd examples/full
pwd
command -v mergeway-mcpExpect status: validation succeeded. Save the two absolute paths printed by pwd and command -v.
2. Add the scoped server
Replace the paths below:
codex mcp add mergeway-tutorial -- /absolute/path/to/mergeway-mcp \
--root /absolute/path/to/examples/full \
--entity User \
--entity Post
codex mcp listRestart Codex if a running session does not show the new server.
3. Discover the visible model
Ask:
Use the Mergeway tools to list the visible entities. Do not use shell commands.
The answer should identify only Post and User. Comment and Tag exist in the repository but are hidden by the allow-list.
4. Inspect records and relationships
Ask:
List the User records, get user-alice, then inspect Post post-001. Explain the author relationship using only tool results.
The tool results establish these facts:
- users
user-aliceanduser-bobexist; - Alice’s name is
Alice Exampleand her roles areadminandauthor; - post
post-001is titledLaunch Dayand itsauthorisuser-alice.
The post also contains tag-product, but Tag is not visible. The allow-list does not redact reference values inside an allowed record.
5. Test the boundary
Ask:
Show the Comment entity schema with the Mergeway tools.
The call should fail because Comment is not allowed. This verifies scope, not isolation from every Codex capability: the client may have other tools, and the server process still has its operating-system permissions.
6. Remove the tutorial connection
Use codex mcp --help to find the removal command supported by your installed client, then remove mergeway-tutorial if you no longer need it. Client configuration syntax is maintained separately; the stable Mergeway behavior is in the server and tool references.
Continue with MCP access and security before connecting a real repository.