Skip to main content
Glama

Aggrete

PyPI version Python versions License Glama quality FOSSA Status

An MCP proxy that enforces a code-of-conduct document across connectors, with per-user memory that accumulates across calls.

Four individually-authorized questions can assemble a layoff list — no single one is sensitive, so no guardrail fires. Aggrete is the layer that catches the combination: is this call, together with everything this person already pulled today, something the code of conduct forbids?

Try it live — nothing to install · or uvx aggrete --demo

Start with a scan

pip install aggrete && aggrete scan

Finds every MCP server your clients use, connects to each, and prints what no per-server scanner does: tool combinations across servers that form a leak path, hidden instructions in descriptions, secrets in client configs, servers that bypass the proxy. --fix writes the config and policy that close them. Details.

Related MCP server: agentguard

Install

pip install aggrete                 # or: uv tool install aggrete
uvx aggrete --demo                  # the walkthrough — no config, auth, or network
aggrete --config proxy.config.yaml  # run it for real

The one example

The check tool dry-runs a plan and returns the verdict before anything is fetched:

Plan check: REFUSED.
  1. hr__recent_joiners     [hr-personnel]  ->  allowed
  2. finance__budget_roles  [finance-comp]  ->  allowed
  3. ops__oncall_draft      [ops-rota]      ->  REFUSED   COC-HR-004
     Personnel, compensation, and operational rosters may not be combined to
     derive the planned departure of identifiable individuals.

Each call is fine alone. The third completes a forbidden set across three domains that overlap on the same people, so it's denied before the upstream call — the data is never fetched.

What it does

  • Refuses before fetching, using a YAML policy and per-user memory across calls and sessions — not single-call authorization.

  • Redacts emails, SSNs, cards, and tokens from results before they reach the model; hides walled tools from users who can't call them.

  • Shields against prompt injection — any write after a session reads untrusted content is refused — and against tool poisoning, flagging hidden instructions in tool descriptions.

  • Holds upstream credentials itself (confused-deputy safe), with optional per-user on-behalf-of access.

  • Audits tamper-evidently — every decision is one hash-chained JSON line (aggrete-audit), forwarded to a SIEM or an OpenTelemetry collector, with Prometheus metrics and health endpoints for operations.

  • Ask before you act — check previews any sequence, scenarios lists things to try.

  • Hold for a human — action: approve pauses a call until the clause owner approves it, from Slack, the terminal, or the console; the approval is a time-limited, audited grant.

Learn more

  • Writing policy — the coc.yaml schema, rule types, arg_match, and drafting from your handbook with aggrete-ingest

  • Deploying — architecture, the deploy matrix, HTTP + OAuth, connecting Claude, and per-user credentials

  • Building a connector — expose read/write tools and govern any system (Google Drive is the reference)

  • Adapter mode — run the engine inside agentgateway (native ExtMCP over gRPC, aggrete extmcp), Docker MCP Gateway, IBM ContextForge or any AuthZEN-speaking gateway

  • What it does not stop — supply chain, host execution, client bugs, memory poisoning: where a proxy is the wrong control and what is

  • Scanning — aggrete scan hardens an existing MCP setup: cross-server leak paths, poisoned descriptions, secrets in configs, proxy bypasses, and a one-command fix

  • Conformance — aggrete conformance runs sixteen checks against the real components and maps them onto the OWASP MCP Top 10, OWASP Agentic Top 10, CoSAI and AIUC-1; --url runs the same scenarios black-box against any gateway (latest report)

  • Roadmap — shipped, in progress, and planned

  • Agent skill — teach Claude Code or any MCP client to set up and operate Aggrete: /plugin marketplace add aggrete/aggrete, or read skill://aggrete/SKILL.md from a running proxy

Honest limitations

  • Post-call denial redacts, it does not un-fetch — prefer rules decidable pre-call.

  • stdio identity is advisory — real enforcement needs streamable HTTP with OAuth and IdP-level blocking of direct connector grants, so the proxy is the only path.

  • Aggregation can only be narrowed, not solved — a user who spaces requests beyond the window, or paraphrases across systems the proxy doesn't front, gets through. This raises the cost and creates the audit trail; it isn't a ceiling.

  • Not a gateway — no multi-tenancy, token vault, or HA. For production, run it behind agentgateway, Docker's gateway or IBM ContextForge and let them call it (adapter mode).


mcp-name: io.github.aggrete/aggrete

Available Tools

12 tools
aggrete__checkCheck a plan against the code of conductA

Ask whether a sequence of tool calls would be allowed before running any of them. Returns the decision (allowed, allowed-with-alert, or refused), the rule that applies, its clause, and the remediation. Nothing is fetched. Use this to answer 'can I do X?' questions: translate the request into the tool calls it would take, then pass them as tools in order.

Inputs: tools (required), entities.

aggrete__scenariosThings to try in this demoA

List concrete things to try here, each showing a different kind of policy decision (redaction, refusing a combination, individual pay, comparing colleagues, the prompt-injection shield, hidden tools). Takes no arguments. Start here if you are new.

Inputs: no named parameters.

corp__post_noteA

[shared-notes] Post a note to the shared team space. This writes to the outside world, so it is governed as egress: fine on its own, but refused if the session has already read untrusted content (the prompt-injection shield).

Inputs: text (required).

corp__read_public_postA

[untrusted-web] Fetch the text of a public web page or forum post. The content is untrusted: it can carry instructions aimed at your assistant. In this demo, once a session has read from here, Aggrete refuses any later tool that would send data out (COC-SEC-002).

Inputs: url (required).

finance__budget_rolesA

[finance-comp] Budget lines for one team, per role, including whether each role is backfill-only and the email of the role owner. In this demo, Aggrete refuses combining these budget records with HR personnel records to profile individuals (a code-of-conduct rule).

Inputs: team (required).

finance__headcount_planA

[finance-planning] Aggregate headcount plan for one team: approved, filled and open role counts. Returns totals only, never individual people. Use it to see how many roles a team is budgeted for and how many are still open.

Inputs: team (required).

finance__pay_bandA

[pay-aggregates] Average pay for a category of workers. Pay may be shared only as averages for large enough groups: a category describing fewer than ten people resolves to individual pay and Aggrete refuses it (COC-HR-031). A broad category (a job family or location) is fine.

Inputs: category (required).

hr__leave_balanceA

[hr-personnel] Look up the remaining leave and absence balance for one person by email. In this demo, Aggrete redacts the email in the result before it reaches the model.

Inputs: email (required).

hr__recent_joinersA

[hr-personnel] List the people who joined a team within the last N months, with each person's email, employee id and start date. Use it to find recent hires on a team.

Inputs: team (required), months.

hr__start_hereA

[hr-personnel] Start here. Explains what this demo is and points you at the guided menu. Takes no arguments.

Inputs: no named parameters.

hr__timecardA

[timesheets] Timecard for one person by email: hours logged per week this month. In this demo, putting your own timecard next to a colleague's to compare is refused (COC-HR-021); reviewing your team's cards is fine.

Inputs: email (required).

ops__oncall_draftA

[ops-rota] Draft an on-call rotation for one team and quarter: one shift per week with the assigned person's email. Use it to propose who is on call, week by week.

Inputs: team (required), quarter (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 12 tools

    Disambiguation5/5

    Each tool maps to a distinct resource or action: HR person-level lookups, finance aggregate views, ops drafting, external web read/write, and policy meta-tools. The domain prefixes and bracketed categories make it easy to tell timecard, leave balance, headcount plan, budget roles, and pay band apart.

    Naming Consistency3/5

    All names use a domain__snake_case prefix, which provides a consistent overall structure. However, the action part is mixed: several tools are bare noun phrases (timecard, headcount_plan, pay_band), while others are verb phrases (read_public_post, post_note, start_here) or single verbs (check, scenarios).

    Tool Count5/5

    Twelve tools is well within the ideal range, and each tool earns its place: data sources across HR, finance, ops, and external web, plus guidance and policy-checking tools. The count is large enough to demonstrate multiple policy scenarios without becoming a sprawling surface.

    Completeness5/5

    For a policy-decision demo, the surface is complete: start_here and scenarios orient the agent, check lets it test policy decisions before acting, and the data/web tools cover the described policy cases including redaction, comparing colleagues, individual pay, combination refusals, and the prompt-injection shield. No obvious dead-end workflow or missing operation exists for the stated purpose.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      A governance proxy for AI tools — every MCP/agent tool call is policy-gated, secret-redacted, and written to a hash-chained, offline-verifiable audit trail.
      13
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enforces policy controls for AI agents, including spend limits, action approvals, kill switch, scoped credentials, dry-run diffs, loop prevention, and auditable hash-chained logs.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to reach upstream MCP tool servers through a central policy gateway that authenticates each agent, enforces least-privilege and default-deny rules, and applies response obligations such as redaction, inference stripping, PII masking, and truncation. It also records every decision in a tamper-evident, hash-chained audit log that can be verified later.
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Acts as an MCP gateway between AI agents and upstream tool servers, evaluating YAML policies on every tool call, injecting real credentials at the last mile, scanning requests and responses for secrets, PII, and prompt injection, and recording each action in a tamper-evident audit log. Also supports HTTP forward-proxy governance with rate limiting, cost tracking, and policy replay against historical audit data.
      4
      Apache 2.0