Agent Q
Reviews GitHub pull requests (added lines), commits and whole repositories through the GitHub API, returning policy findings with rule identifiers, severities and file/line locations, plus a verdict of APPROVE, COMMENT or CHANGES REQUESTED. Optionally accepts a caller-supplied GitHub token to raise rate limits and reach private repositories, and can list the repositories of an account.
Provides a drop-in workflow template that runs Agent Q on every pull request using the job's own GITHUB_TOKEN, keeps a single review comment up to date, and fails the job when the verdict is CHANGES REQUESTED.
Provides a Copilot custom agent definition that can be copied into a repository's .github/agents/ directory, making Agent Q's review tools available in that repository's Copilot agents list.
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.
Agent Q
Agent Q is a Model Context Protocol (MCP) review server for repository governance. It applies a deterministic policy to pull requests, commits and repositories, and returns findings by rule identifier.
1. Scope
Item | Value |
Runtime | Supabase Edge Functions (Deno) |
Protocol | MCP, Streamable HTTP transport, stateless |
Libraries |
|
Clients | GitHub Copilot custom agent, GitHub Actions, any MCP client |
Endpoint |
|
Related MCP server: shipcheck-mcp
2. Conventions
The key words MUST, MUST NOT, SHALL, SHALL NOT, SHOULD and MAY are to be read as described in RFC 2119 and RFC 8174.
3. Requirements
ID | Requirement |
AQ-SRV-01 | The server SHALL expose its tools over the MCP Streamable HTTP transport at |
AQ-SRV-02 | The server SHALL hold no session state between requests. |
AQ-SRV-03 | Every tool SHALL be read only with respect to the reviewed repository. |
AQ-SRV-04 | The server SHALL reject requests without the bearer token when |
AQ-SRV-05 | The server MUST NOT return a detected credential in any response. |
AQ-SRV-06 | Findings SHALL carry a rule identifier, a severity and a file and line location. |
AQ-SRV-07 | A caller MAY supply a GitHub token in the |
4. Tools
Tool | Purpose |
| Returns the review policy and its rule identifiers. |
| Reviews supplied file content. |
| Reviews the added lines of a pull request. |
| Reviews the added lines of a commit and reports signature verification. |
| Audits required files, CI, signing key and the README. |
| Lists the repositories of an account. |
The policy is also published as the MCP resource agentq://policy.
5. Policy
ID | Severity | Requirement |
AQ-SEC-01 | error | Changes MUST NOT introduce credentials, tokens or private key material. |
AQ-SEC-02 | error | Changes MUST NOT introduce Supabase service role keys or JWT secrets. |
AQ-DOC-01 | error | Documentation MUST NOT contain em dashes or en dashes. |
AQ-DOC-02 | warning | Requirements SHOULD use upper case RFC 2119 keywords unless the document declares its conventions. |
AQ-DOC-03 | warning | Normative documents SHOULD give each requirement a stable identifier. |
AQ-DOC-04 | warning | Sentences SHOULD NOT exceed 35 words. |
AQ-DOC-05 | warning | Documentation SHOULD NOT use filler or hedging vocabulary. |
AQ-DOC-06 | warning | Documentation MUST NOT make unqualified assurance claims. |
AQ-EVD-01 | info | Quantitative claims SHOULD cite the command, seed or artefact that reproduces them. |
AQ-HYG-01 | warning | Changes SHOULD NOT add unresolved work markers. |
AQ-REP-01 | warning | Repositories SHOULD contain README.md, LICENSE, SECURITY.md and a CI workflow. |
AQ-REP-02 | info | Repositories SHOULD publish a signing key as |
A verdict of CHANGES REQUESTED follows from any error finding, COMMENT from any warning, and APPROVE otherwise.
6. Integration
6.1 Copilot custom agent
Copy templates/.github/agents/agent-q.agent.md to .github/agents/ in the target repository. Agent Q then appears in the Copilot agents list for that repository.
6.2 GitHub Actions
Copy templates/.github/workflows/agent-q.yml to .github/workflows/. The workflow reviews each pull request with the job's own GITHUB_TOKEN, maintains one review comment and fails on CHANGES REQUESTED.
6.3 Other MCP clients
claude mcp add --transport http agent-q https://tcaefdirgffncwfwrlbe.supabase.co/functions/v1/agent-q/mcp --header "apikey: sb_publishable_KpeKmqmnbI9lTj_eu98nzA_tGUOMtBC"6.4 Cloudflare Workers
The same application runs as a Worker (worker/index.ts, wrangler.jsonc), served at the Worker root: /, /health and /mcp.
Dashboard: Workers and Pages, Create, Import a repository, select this repository. Build command: none. Deploy command: npx wrangler deploy. Root directory: /.
CLI:
npm ci
npx wrangler deploy
npx wrangler secret put AGENT_Q_TOKEN6.4.1 Single-step AI reviewer
POST /review on the Worker runs one pass per request: it fetches the pull request or commit from GitHub, reads the repository's data points from Supabase with @supabase/supabase-js, applies the Agent Q rules, makes one Workers AI call (@cf/meta/llama-3.1-8b-instruct-fast by default, override with AGENT_Q_MODEL) and saves the result to public.reviews. The rule verdict is authoritative; the model only explains and prioritises.
curl -X POST https://agent-q.itsdhruvsetty.workers.dev/review \
-H "apikey: <publishable key>" -H "content-type: application/json" \
-d '{"owner":"whatheheckisthis","repo":"agent-q","number":1}'GET /reviews/<owner>/<repo> returns the saved history. The Worker needs the secret SUPABASE_SERVICE_ROLE_KEY (npx wrangler secret put SUPABASE_SERVICE_ROLE_KEY); without it the review still runs but is not saved. Tables are created by supabase/migrations/20261115000000_agent_q_reviews.sql, with RLS on and no public policies.
6.5 Web console
docs/index.html is a browser console for the server, served as static assets by the Cloudflare Worker at https://agent-q.itsdhruvsetty.workers.dev/. It reviews pasted code, pull requests, commits and repositories, and shows the policy. Settings hold the endpoint, the gateway key and an optional GitHub token, all kept in the browser.
6.6 Deployment
The Supabase GitHub integration deploys supabase/functions/agent-q to project tcaefdirgffncwfwrlbe on every push to main.
7. Configuration
Secret | Location | Effect |
| Edge Function secret | API gateway key. When set, |
| Edge Function secret or Worker secret | Enables private bearer authentication on |
| Edge Function secret or Worker secret | Raises the GitHub API rate limit and allows private repositories. |
| Repository Agents secret | Bearer token sent by the Copilot agent. |
| Repository Actions secret | Bearer token sent by the workflow. |
8. Local verification
deno check supabase/functions/agent-q/index.ts
supabase functions serve agent-q
npm ci && npx wrangler dev9. Limitations
The policy is lexical. It does not establish the truth of a claim, only the presence of its evidence reference.
Pull request review covers added lines only. Context outside the diff is not evaluated.
Without
GITHUB_TOKEN, the server reads public repositories only, within the unauthenticated GitHub API rate limit.
Tool 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
Zero-log MCP server with 49 tools for AI guardrails, secret scanning, MCP linting & EU compliance.
491Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Scan any public GitHub MCP-server repo for security issues. 37 MCP-specific L1 rules, 8 languages.
Related MCP Servers
- AlicenseCqualityDmaintenanceA policy-aware MCP server for GitHub and GitHub Actions that enables safe AI-assisted infrastructure workflows—inspecting repositories, preparing branches and pull requests, and constrained remote mutations behind explicit preview-bound approval tokens.18MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI agents to scan code for leaked secrets, copyleft licenses, unprotected routes, missing privacy policies, and risky card handling before committing or shipping.70 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to run security and code review on pull requests and diffs, exposing review_pr and review_diff capabilities with local-first analyzers and LLM explanations.2MIT
- AlicenseBqualityCmaintenanceEnables automated pull request review, security vulnerability analysis, and code quality improvement suggestions through any MCP client.323 npmMIT