Labs AgentGate
- SpecShield Labs
- Internal demo
- Synthetic data
- Status: planned
AgentGate
Letting AI agents use a service-operations API safely
A field-service ticketing API with a secured MCP server, so AI agents can act on tickets while humans keep approval rights.
1. Engagement type and status
- Engagement type
- Internal engineering demonstration (SpecShield Labs). Built in the open, with synthetic data only.
- Comparable client offer
- Engineering sprint (2–3 weeks)
- Status
- planned
2. Problem and intended buyer
- Customers want to connect AI agents such as Claude or Cursor to your product, but an agent with a broad API token can do anything a user can.
- Content inside tickets can carry prompt-injection instructions aimed at the agent.
- A tool description can be changed after it was approved (a "rug pull").
- When something goes wrong, you need to know whether a human or an agent did it.
Who this is for: A product or engineering leader at a US SaaS company who is being asked for an MCP server or agent integration and needs it to pass a security review.
3. Scope and exclusions
In scope
- Field-service approval portal for requesters, staff and supervisors, with tickets, RBAC and a state machine.
- MCP server over Streamable HTTP so agents can search and create tickets, assign them, and request closure.
- OAuth 2.1 resource server with Protected Resource Metadata (RFC 9728), audience-bound tokens, per-tool scopes and Origin checks.
- Human in the loop. Agents can never approve, close or delete; a supervisor approves in the UI.
- Prompt-injection and tool-poisoning defenses. Untrusted content is wrapped, the tool manifest is pinned, and outputs are limited and masked.
- Audit trail tagging every action HUMAN or AGENT, a kill switch, rate limits, and an eval suite.
Excluded
- No real customer tickets, people or credentials. All data is synthetic and resets daily.
- Not a general-purpose agent platform. One domain, one MCP server.
- Model behavior is not guaranteed. Guardrails reduce risk; they do not remove it.
4. Architecture and key decisions
[React Portal] ─REST (session/JWT)─▶ [AgentGate Core API]
requester · staff · supervisor tickets · RBAC · state machine
approvals · audit · CSV export
[Agent Playground UI] ─▶ [Playground BFF] ─Anthropic API + MCP connector─┐
trace panel spend cap · Turnstile │
▼
[Any MCP client: Claude, Cursor, Inspector] ─Streamable HTTP─▶ [AgentGate MCP Server]
OAuth RS · scopes · guards · audit
[Auth Server (Spring Authorization Server)] issues audience-bound JWTs
PostgreSQL 17 · OTel · one deployable, 3 modulesKey decisions
Audience-bound tokens, no token passthrough
The MCP server only accepts tokens issued for it and never forwards a client token to another API.
Agents can request, humans approve
Approve, close and delete are not exposed as tools at all, so no prompt can unlock them.
Pinned tool manifest
Tool names and descriptions are fixed at release. A change fails a contract test instead of silently reaching agents.
5. Video and screenshots
The 2-minute walkthrough video is published when the demo is live.
Screenshots are added when the ops console ships.
6. Tests and measured results
Numbers below come from the repository's CI evidence file. A metric without a published run reads "not measured".
| Metric | Value |
|---|---|
| Last build | not measured |
| Tests (total / failed) | not measured |
| Unit / integration / end-to-end | not measured |
| Line coverage (overall / domain) | not measured |
| Mutation score | not measured |
| Load test p95 | not measured |
| Load test environment | not measured |
| CodeQL | not measured |
| Trivy critical vulnerabilities | not measured |
| ZAP high alerts | not measured |
| SBOM | not published |
| Commit | not published |
| Built at | not measured |
What the test suite proves
- [PLACEHOLDER]Test catalogue (AG-*) is published with the B1–B8 build steps.
7. Security and limitations
Security controls
- OAuth 2.1 resource server with per-tool scopes and RFC 9728 metadata.
- Requests with an unexpected Origin header are rejected with 403.
- Every action is audited and tagged HUMAN or AGENT; a kill switch disables agent access.
- Untrusted ticket content is wrapped before it reaches the model, and outputs are length-limited and masked.
Known limitations
- MCP specification revisions are changing quickly; the README names the revision the server targets.
- Prompt-injection defenses are layered but not complete. The red-team write-up lists what was tried.
- The live playground has a spend cap and may be unavailable when the cap is reached.
8. Code tour
Files worth reading first. Links go live when the repository is public.
[PLACEHOLDER] agentgate-mcp tool definitionsPublished with the repository.
Asked to let AI agents into your product?
Book a 20-minute engineering call. We will talk through scopes, approvals and audit for your API.