Enterprise Ops MCP Gateway
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Enterprise Ops MCP Gateway
A TypeScript MCP gateway for safe AI access to mock enterprise operations data.
Milestone 1 status
The first milestone provided a local Next.js MCP endpoint with a whoami tool.
Later milestones added authentication, database access, policy enforcement, audit
logging, proposal tools, and the dashboard.
Related MCP server: MCP Playground
Milestone 2 status
The database milestone includes a PostgreSQL schema and deterministic synthetic seed data. The seed contains fictional customers, orders, tickets, and one expired pending action.
For a local synthetic database, start the container the first time with:
docker run -d --name enterprise-ops-mcp-postgres \
-e POSTGRES_DB=enterprise_ops \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-p 54329:5432 postgres:17-alpineIf the container already exists but is stopped, start it instead:
docker start enterprise-ops-mcp-postgresCheck that PostgreSQL is accepting connections, then apply the schema:
docker exec enterprise-ops-mcp-postgres pg_isready -U postgres -d enterprise_opsAfter it reports accepting connections, run:
npm run db:migrateTo load the fictional demo records, run:
npm run db:seedCaution: npm run db:seed resets the gateway's synthetic tables before
inserting demo data. npm run db:reset drops those tables. Use these only when
you are okay losing the current mock records.
Milestone 3 status
The auth and policy module provides:
Constant-time bearer-token role mapping
Role-to-tool permission checks
Refund policy boundaries
Separation-of-duties checks
24-hour expiry checks
PostgreSQL-backed per-token rate limiting
These modules are implemented, tested, and wired into the read, proposal, and manager-decision tools through the shared route guard.
Milestone 4 status
The sanitizer and audit modules provide:
Untrusted-data wrappers for ticket and customer text
Injection and exfiltration heuristics
Email and phone masking
Recursive secret-field redaction
Argument and result truncation
PostgreSQL audit-log writes
Milestone 5 status
The MCP route now exposes read tools for tickets, customers, orders, pending actions, and audit entries. Each tool uses bearer-role checks, per-token rate limits, Zod validation, PII masking, untrusted-data wrapping, and audit logging.
Milestone 5 runtime validation remaining
The automated checks pass. To finish runtime validation of the read tools:
Start or connect a PostgreSQL database and run
npm run db:migrateOptionally run
npm run db:seedif you want to reset and reload the synthetic dataStart the app with
npm run devOpen MCP Inspector and verify the read tools through HTTP with each bearer role
Exercise denied-role calls, rate limiting, audit-log writes, PII masking, and injection heuristics against the running database
Fix any issues found during Inspector or database-backed validation
Milestone 6 status
The proposal and manager-approval tools are implemented:
propose_refundandpropose_status_changecreate 24-hour pending actions and do not change orders or tickets.Managers can approve or reject pending actions. Approval applies only a simulated change to the mock database; refunds track the refunded total, and ticket status changes update the synthetic ticket.
Refund limits, remaining order balance, separation of duties, expiry, idempotency, decision reasons, and audit logging are enforced.
Proposal and decision reasons are returned as untrusted text.
Email addresses and phone numbers in returned free text are masked for non-managers.
Automated tests, lint, and production build pass. Manual runtime validation in MCP
Inspector is still required before this milestone is considered complete.
Run npm run db:migrate before restarting the app so an existing database receives
the new columns. npm run db:seed resets the synthetic tables and is optional if you
want to preserve your current demo records.
Suggested Inspector checks, using the existing bearer header for each role:
As
support_agent, callpropose_refundwithorder_id: "O-5001",amount: 10, and a reason. Confirm it returns a pending action ID. Then checkget_orderand confirmrefunded_totalhas not changed yet.As
manager, callapprove_actionwith that ID. Confirm it succeeds, then callget_orderagain and verify the simulatedrefunded_totalchanged.As
support_agent, callpropose_status_changeforT-1001, changing it toclosed. Approve it asmanagerand confirmget_ticketreturns the new status.Propose another action as
support_agentand reject it asmanager. Confirm the action is rejected and its reason is shown as untrusted text.Confirm
auditorcannot propose, approve, or reject; confirm an agent cannot approve or reject; try a refund over $500 and an approval by the action's proposer.Confirm each allowed and denied attempt appears in
get_audit_log.
Milestone 7 status
The manager dashboard is implemented at /dashboard:
Manager bearer-token login sets an HTTP-only, signed dashboard session cookie.
Pending actions can be approved or rejected using the same policy-checked handlers as the MCP tools.
The audit log supports role, tool, and outcome filters.
The dashboard shows calls today, denials today, and flagged synthetic injection data.
The UI clearly labels all records as demo data.
Later project milestones remain to be implemented:
Milestone 8: Vercel deployment
Milestone 9: Claude connector testing and scenario scorecard
Milestone 10: final customer brief, threat model, demo, and deployment documentation
Validate the dashboard locally
These steps use only the synthetic local database and do not deploy or publish anything.
Prepare local environment variables. If
.env.localdoes not exist, copy.env.exampleto.env.local. If it already exists, preserve it and check that it hasDATABASE_URL,AGENT_TOKEN,MANAGER_TOKEN,AUDITOR_TOKEN, andDASHBOARD_SESSION_SECRET. For the Docker database above,DATABASE_URLshould point topostgresql://postgres:postgres@localhost:54329/enterprise_ops. Set the role tokens to local-only synthetic values and set a strong, local-onlyDASHBOARD_SESSION_SECRET. Never commit.env.localor use real credentials. Restart the Next.js server after changing these values.Start PostgreSQL. If the container is stopped, run
docker start enterprise-ops-mcp-postgres. If it does not exist yet, use the first-timedocker runcommand in the Milestone 2 section. Wait until this reports that PostgreSQL is accepting connections:docker exec enterprise-ops-mcp-postgres pg_isready -U postgres -d enterprise_opsApply the schema. This is safe to run on an existing demo database:
npm run db:migrateIf you need the original synthetic customers, orders, tickets, and injection examples, run
npm run db:seed. It resets the synthetic tables first, so skip it if you want to preserve existing mock records. Without seeded records, the dashboard can still load but pending actions and injection indicators may be empty.Run automated checks from the repository root:
npm test npm run lint npm run buildStart the app and leave this terminal running:
npm run devOpen
http://localhost:3000/dashboardand use that same browser origin for dashboard form submissions. In Codespaces, you can instead use the forwarded application URL consistently. Avoid opening the page on one host and submitting its forms through another; Next.js checks Server Action origins.Check manager login. Sign in with the local
MANAGER_TOKEN. Verify an incorrect token is rejected, the manager sees the dashboard, and Sign out returns to the login form. The session cookie should be HTTP-only. Agent and auditor tokens must not grant dashboard access.Approve a proposal. In another terminal, launch MCP Inspector:
npx @modelcontextprotocol/inspectorConnect it to
http://localhost:3000/api/mcpwith the headerAuthorization: Bearer <AGENT_TOKEN>. Callpropose_refundwithorder_id: "O-5001",amount: 10, and a reason. Refresh the dashboard and confirm the action is pending and displays its proposal details. Approve it as the logged-in manager. Confirm the dashboard shows it approved, the audit log records the decision, andget_orderin Inspector shows the simulatedrefunded_totalincreased by$10.Reject a proposal. As the agent in Inspector, propose another small refund. Reject it in the dashboard with a reason. Confirm its status becomes rejected and the decision is present in the audit log. No real refund or external action is performed.
Check audit and indicators. Filter the audit log by role, tool, and outcome. Make a denied tool call in Inspector (for example, try
propose_refundwith the auditor token) and confirm the denial is audited and the denial counter updates. With seeded data, check the flagged-injection indicator is populated. Verify that dashboard records are clearly labelled as demo data.
If the dashboard reports that demo data is unavailable, check that PostgreSQL is
running, DATABASE_URL uses the expected host and port, and npm run db:migrate
has completed. Do not run npm run db:reset as a troubleshooting shortcut.
When finished, stop the Next.js server with Ctrl+C. You can stop, but do not
remove, the database container with docker stop enterprise-ops-mcp-postgres;
this preserves its synthetic data for the next session.
Local development
npm install
npm run devOpen http://localhost:3000/api/mcp with MCP Inspector:
npx @modelcontextprotocol/inspectorTests
npm test
npm run lint
npm run buildTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Tenant-scoped evidence intake and controlled AI context over MCP.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables policy-governed MCP interactions with deterministic authorization, tenant isolation, minimized PII exposure, and human approval gates for sensitive mutations, while producing structured audit events.3MIT
- FlicenseNot gradedqualityCmaintenanceEnables admins to author and manage persistent mock MCP servers and OpenAI-compatible endpoints through a browser UI and admin API, with REST mocks, shared datasets, and traffic logging for demos and training.-
- AlicenseNot gradedqualityDmaintenanceProvides an OAuth-protected, scoped, and audited MCP server that lets AI assistants safely query business data through a fixed set of tools without direct database access.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to call upstream MCP tools under each user's own identity, with guardrails, approvals, data filtering, and tamper-evident audit streaming to SIEM.AGPL 3.0