Skip to content

feat(mcp): add a read-only MCP server over the company spec - #12

Merged
DivitMittal merged 2 commits into
mainfrom
feat/mcp-server
Nov 17, 2026
Merged

DivitMittal merged 2 commits into
mainfrom
feat/mcp-server

Conversation

@DivitMittal

Copy link
Copy Markdown
Member

Phase 5. stdio MCP server (Python, official mcp SDK) with get_entity, list_people, get_role, who_owns, get_policy, get_process, validate_change.

  • validate_change overlays the patch as a module and runs the real evaluation + OPA. Verified live on acme: a valid hire passes; a dangling role fails with the assertion message; a production system without an SLO is denied by OPA.
  • flakeModules.company adds apps.mcp; company.mcp.module enables validate_change.
  • Checks: 9 pytest unit tests + a stdio client round trip (lists 7 tools, calls who_owns/get_entity).

Tools: get_entity, list_people, get_role, who_owns (CODEOWNERS
semantics), get_policy, get_process, and validate_change, which runs the
full Nix evaluation and OPA policies with a patch overlaid. Python on the
official mcp SDK; flakeModules.company exposes it as `nix run .#mcp`.
Unit tests plus a stdio client round trip run in nix flake check.
nixpkgs-unstable ships mcp 2.x, where FastMCP became MCPServer;
x86_64-darwin's nixpkgs 26.05 still has 1.x.
@DivitMittal
DivitMittal merged commit d9f60a9 into main Nov 17, 2026
2 checks passed
@DivitMittal
DivitMittal deleted the feat/mcp-server branch November 17, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant