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.

Live demo: not deployed yetGitHub: not public yetVideo: not recorded yet

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

Container view (text diagram)
[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 modules
A React portal for requesters, staff and supervisors calls the AgentGate core API. An agent playground goes through a backend-for-frontend with a spend cap. Any MCP client connects over Streamable HTTP to the AgentGate MCP server, which is an OAuth resource server with per-tool scopes, guardrails and audit. A separate Spring Authorization Server issues audience-bound tokens. Data is stored in PostgreSQL 17 with OpenTelemetry tracing.

Key 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".

specshield-io/agentgate CI evidence · no CI run published yetLast verified: never (no CI run published yet)
MetricValue
Last buildnot measured
Tests (total / failed)not measured
Unit / integration / end-to-endnot measured
Line coverage (overall / domain)not measured
Mutation scorenot measured
Load test p95not measured
Load test environmentnot measured
CodeQLnot measured
Trivy critical vulnerabilitiesnot measured
ZAP high alertsnot measured
SBOMnot published
Commitnot published
Built atnot 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.

  1. [PLACEHOLDER] agentgate-mcp tool definitions

    Published 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.