Use the MCP server
The Unyform MCP server lets your coding agent โ Claude Code, Codex, or any MCP client โ pull blueprints, conventions, and policy decisions straight from your org while it works. Where the gateway injects context automatically on every model request, the MCP server gives the agent tools it can call on demand: "search the blueprints," "validate this file," "is this action allowed?"
Note
This is distinct from the gateway's own managed tools (the _gw_* family). Those are injected into model requests by the gateway and never surface to you. The MCP server is a standalone process you register with your editor and its tools (search_blueprints, check_policy, โฆ) appear in your agent's tool list.
What it gives you
The server exposes 12 tools in four groups, each backed by the Unyform API:
- Blueprints โ
search_blueprints,get_blueprint,get_conventions - Policy โ
check_policy,validate_output,get_policies - Steering โ
request_approval,report_action,get_guidance - Context โ
get_ecosystem_context,get_architecture,get_recent_decisions
Several context tools are stubs today and return a "not yet available" message โ see the usage tour below for what's live.
Install
The server ships as the unyform-mcp binary:
unyform mcp status checks that the binary is on your PATH โ your MCP client
launches it by name.
Register it
The server speaks stdio by default (JSON-RPC over stdin/stdout), which is
what every MCP client expects. Pass your org with --org-id.
Register the server with the Claude Code CLI:
claude mcp add unyform -- unyform-mcp --org-id <org-id>
Or add it to your project's .claude/settings.json directly:
{
"mcpServers": {
"unyform": {
"command": "unyform-mcp",
"args": ["--org-id", "<org-id>"]
}
}
}
For Codex, add to codex.toml:
[mcp_servers.unyform]
command = "unyform-mcp"
args = ["--org-id", "<org-id>"]
Tip
Run unyform mcp config in a project that has a .unyform/config.yml and it prints these exact blocks pre-filled with your org id, detecting whichever agents it finds.
Configure
The server resolves three things from flags, environment, or project config โ in that order:
| Setting | Flag | Environment | Falls back to |
|---|---|---|---|
| Org | --org-id | UNYFORM_ORG_ID | org_id in .unyform/config.yml |
| API URL | --api-url | UNYFORM_API_URL | https://api.unyform.ai |
| Auth | โ | UNYFORM_API_KEY | ~/.unyform/credentials.json |
Authenticate once with unyform login to write the credentials file, or set
UNYFORM_API_KEY in the environment your client launches the server in. The key
is sent as a bearer token; the server never embeds it in the config you paste
into your editor.
Warning
If you launch without --org-id and there's no .unyform/config.yml to walk up to, the server exits with an error. Either pass the flag or run unyform init in the project first.
Usage tour
Once registered, ask your agent to use the tools by name or by intent. A few that are live end to end:
search_blueprintsโ "What blueprints cover error handling?" Returns the blueprints (id, name, description) whose name or description matches your query, scoped to your org.get_blueprintโ "Show me the naming section of blueprint<id>." Fetches the full blueprint by id, or just one namedsectionwhen you pass it.get_conventionsโ "What are our conventions for this file?" Returns your org's conventions compiled to markdown โ naming, structure, testing, style.check_policyโ "Can I add this dependency?" Submits anactionandcontentand returns anALLOW/BLOCKdecision with the reason and the policy names that matched.validate_outputโ "Does this file pass?" Validates afile_path+contentagainst your blueprints and policies, returning pass/fail with each violation's rule, message, severity, and suggestion.
The blueprints these tools read come from your repo analysis โ see Codegraph for how that graph is built and what the blueprints capture.
Tip
Add --debug to the args to log every tool call to stderr (stdout stays reserved for the MCP protocol) when you're troubleshooting a registration.