list_findingsread_onlyList findings for a scan (or the whole workspace), highest risk first.
Arguments
| Name | Type | Description |
|---|---|---|
scan_id | string? | |
severity | string? |
MirrorsGET /api/v1/findings
MCP SERVER
39 tools that let Claude Code, Claude Desktop, or any other MCP-capable client read and manage this workspace directly. Every tool calls the exact same route-handler function the REST API calls for the equivalent endpoint — one business-logic layer, two transports.
The server runs as a separate local process (apps/mcp) that imports QShield's models and route handlers directly and talks to the same database — not a second implementation of the product's logic, and not an HTTP client calling the API over the network. Nothing about what a finding, a risk score, or a roadmap wave means is reimplemented for MCP; it can never silently drift from what the dashboard shows.
cd apps/api && pip install -e . cd ../mcp && pip install -e .
read_only unless the agent needs to create organizations/projects, connect AWS/GitHub/registries, or trigger scans — then choose read_write. The full key is shown exactly once.{
"mcpServers": {
"qshield": {
"command": "qshield-mcp",
"env": {
"QSHIELD_API_KEY": "qsk_...",
"DATABASE_URL": "postgresql+psycopg://..."
}
}
}
}DATABASE_URLmust point at the same database the QShield API server uses — this process talks to it directly, not through the API's HTTP layer.QSHIELD_API_KEYis read once per tool call and re-validated against the database every time. A key revoked from the Settings page stops working on this server's very next tool call.read_only keys can call any read tool. read_write keys additionally unlock create/update/archive/connect/trigger tools.admin role — the same require_admincheck the REST API enforces, reproduced exactly (this does not happen automatically; calling a route function directly, as every MCP tool does, skips FastAPI's dependency-injection checks unless the bridge re-applies them).mcp_tool_calls audit table (workspace, key, tool name, a hash of the arguments, and outcome).QSHIELD_MCP_RATE_LIMIT (0 disables it).connect_github and connect_container_registryaccept a real bearer secret (a PAT, a registry password) as a tool argument. It passes through this process's memory exactly once, gets encrypted at rest with the same envelope encryption the REST API uses, and is never written to the audit log (which stores only a hash of the argument set). Prefer connect_github's github_app auth method (installation ID only, no PAT) where possible.
Available to any valid key, including read_only. Three of these (explain_finding, draft_remediation, ask_qshield) call QShield's AI-assist layer and always return a non-authoritative draft.
list_findingsread_onlyList findings for a scan (or the whole workspace), highest risk first.
Arguments
| Name | Type | Description |
|---|---|---|
scan_id | string? | |
severity | string? |
MirrorsGET /api/v1/findings
get_finding_migration_changeread_onlyDeterministic suggested diff, Jira ticket draft, and GitHub PR draft for one finding.
Arguments
| Name | Type | Description |
|---|---|---|
finding_idrequired | string |
MirrorsGET /api/v1/findings/{id}/migration-change
explain_findingread_onlyAI-drafted plain-language explanation of a finding, for both an engineer and an executive audience.
Non-authoritative — always a draft requiring human review.
Arguments
| Name | Type | Description |
|---|---|---|
finding_idrequired | string |
MirrorsPOST /api/v1/findings/{id}/explain
draft_remediationread_onlyAI-drafted migration backlog item: acceptance criteria, rollback plan, open questions.
Arguments
| Name | Type | Description |
|---|---|---|
finding_idrequired | string |
MirrorsPOST /api/v1/findings/{id}/draft-remediation
ask_qshieldread_onlyTurn a natural-language question into a validated, structured finding filter.
Never generates or executes raw SQL.
Arguments
| Name | Type | Description |
|---|---|---|
questionrequired | string |
MirrorsPOST /api/v1/findings/query-plan
list_assetsread_onlyList discovered assets for a scan.
Arguments
| Name | Type | Description |
|---|---|---|
scan_idrequired | string |
MirrorsGET /api/v1/assets
list_crypto_occurrencesread_onlyList every observed cryptographic algorithm occurrence for a scan, with purpose/confidence/quantum-status.
Arguments
| Name | Type | Description |
|---|---|---|
scan_idrequired | string |
MirrorsGET /api/v1/crypto-occurrences
list_relationshipsread_onlyList asset dependency-graph edges for a scan.
Arguments
| Name | Type | Description |
|---|---|---|
scan_idrequired | string |
MirrorsGET /api/v1/relationships
get_evidenceread_onlyFetch one raw evidence record plus everything derived from it.
Arguments
| Name | Type | Description |
|---|---|---|
evidence_idrequired | string |
MirrorsGET /api/v1/evidence/{id}
get_scan_roadmapread_onlyMigration roadmap (prioritized waves of remediation actions) for a scan.
Arguments
| Name | Type | Description |
|---|---|---|
scan_idrequired | string |
MirrorsGET /api/v1/scans/{id}/roadmap
get_dependency_graphread_onlyAsset dependency graph for a scan, optionally rooted at one asset.
Arguments
| Name | Type | Description |
|---|---|---|
scan_idrequired | string | |
root | string? | |
depth | int | 1–5, default 2 |
limit | int | 1–1000, default 500 |
MirrorsGET /api/v1/graph
list_modulesread_onlyStatus/coverage of every assessment module for a project's latest real scan.
Arguments
| Name | Type | Description |
|---|---|---|
project_id | string? |
MirrorsGET /api/v1/modules
list_scansread_onlyList scan jobs for the workspace (or one project).
Arguments
| Name | Type | Description |
|---|---|---|
project_id | string? |
MirrorsGET /api/v1/scans
get_scanread_onlyFetch one scan job's status/coverage/summary.
Arguments
| Name | Type | Description |
|---|---|---|
scan_idrequired | string |
MirrorsGET /api/v1/scans/{id}
get_portfolioread_onlyList every organization and its projects, with each project's latest assessment status.
Arguments
| Name | Type | Description |
|---|---|---|
include_archived | boolean | default false |
MirrorsGET /api/v1/portfolio
get_organization_dashboardread_onlyDashboard summary (average risk, per-project status) for one organization.
Arguments
| Name | Type | Description |
|---|---|---|
organization_idrequired | string |
MirrorsGET /api/v1/clients/{id}/dashboard
get_project_risk_historyread_onlyRisk-score trend for a project over a date range.
Arguments
| Name | Type | Description |
|---|---|---|
project_idrequired | string | |
date_from | string? | ISO date |
date_to | string? | ISO date |
MirrorsGET /api/v1/projects/{id}/risk-history
get_project_crypto_agilityread_onlyCrypto-agility score for a project.
Arguments
| Name | Type | Description |
|---|---|---|
project_idrequired | string |
MirrorsGET /api/v1/projects/{id}/crypto-agility
Create, update, and archive organizations and projects. Requires a read_write key.
create_organizationread_writeCreate a new organization in the current workspace.
Arguments
| Name | Type | Description |
|---|---|---|
namerequired | string | |
industryrequired | string | |
description | string |
MirrorsPOST /api/v1/clients
update_organizationread_writeUpdate an organization's name/industry/description.
Arguments
| Name | Type | Description |
|---|---|---|
organization_idrequired | string | |
namerequired | string | |
industryrequired | string | |
description | string |
MirrorsPATCH /api/v1/clients/{id}
archive_organizationread_writeArchive an organization (soft-delete; all history is kept).
Arguments
| Name | Type | Description |
|---|---|---|
organization_idrequired | string |
MirrorsPOST /api/v1/clients/{id}/archive
restore_organizationread_writeRestore a previously archived organization.
Arguments
| Name | Type | Description |
|---|---|---|
organization_idrequired | string |
MirrorsPOST /api/v1/clients/{id}/restore
create_projectread_writeCreate a new project under an organization.
No connector is attached automatically.
Arguments
| Name | Type | Description |
|---|---|---|
organization_idrequired | string | |
namerequired | string | |
description | string | |
environment | string | default "demo" |
risk_profile | string | default "moderate" |
MirrorsPOST /api/v1/clients/{id}/projects
update_projectread_writeUpdate a project's name/description/environment/risk profile.
Arguments
| Name | Type | Description |
|---|---|---|
project_idrequired | string | |
namerequired | string | |
description | string | |
environment | string | |
risk_profile | string |
MirrorsPATCH /api/v1/projects/{id}
archive_projectread_writeArchive a project (soft-delete).
Arguments
| Name | Type | Description |
|---|---|---|
project_idrequired | string |
MirrorsPOST /api/v1/projects/{id}/archive
restore_projectread_writeRestore a previously archived project.
Arguments
| Name | Type | Description |
|---|---|---|
project_idrequired | string |
MirrorsPOST /api/v1/projects/{id}/restore
Create and validate AWS/GitHub/git/container-registry connectors. Requires a read_write key AND the acting user must hold QShield's admin role — the same require_admin check the REST API enforces, reproduced exactly (calling a route function directly, as every MCP tool does, does not get this check for free).
connect_awsread_write · admin roleCreate and validate (real STS call) an AWS connector.
Arguments
| Name | Type | Description |
|---|---|---|
namerequired | string | |
mode | string | "moto" | "aws", default "moto" |
endpoint_url | string? | |
regions | string[]? | |
role_arn | string? | |
external_id | string? | |
project_id | string? |
MirrorsPOST /api/v1/connectors/aws
get_aws_terraform_templateread_write · admin roleGenerate the least-privilege cross-account role Terraform file, plus a fresh external_id.
Arguments
| Name | Type | Description |
|---|---|---|
role_name | string | default "qshield-pqc-readonly" |
MirrorsGET /api/v1/connectors/aws/terraform-template
validate_aws_connectorread_write · admin roleRe-run STS validation for an existing AWS connector.
Arguments
| Name | Type | Description |
|---|---|---|
connector_idrequired | string |
MirrorsPOST /api/v1/connectors/{id}/validate
connect_githubread_write · admin roleCreate and validate a GitHub connector (PAT or GitHub App installation).
Arguments
| Name | Type | Description |
|---|---|---|
namerequired | string | |
auth_methodrequired | string | "pat" | "github_app" |
ownerrequired | string | |
reporequired | string | |
branch | string? | |
personal_access_token | string? | |
installation_id | string? | |
project_id | string? |
MirrorsPOST /api/v1/connectors/github
validate_github_connectorread_write · admin roleRe-run validation for an existing GitHub connector.
Arguments
| Name | Type | Description |
|---|---|---|
connector_idrequired | string |
MirrorsPOST /api/v1/connectors/{id}/github-validate
connect_git_repositoryread_write · admin roleCreate a generic git repository connector.
Arguments
| Name | Type | Description |
|---|---|---|
namerequired | string | |
repository_urlrequired | string | |
branch | string? | |
access_token_env_var | string? | |
project_id | string? |
MirrorsPOST /api/v1/connectors/git-repository
sync_git_connectorread_write · admin rolePull the latest commit for a git repository connector.
Arguments
| Name | Type | Description |
|---|---|---|
connector_idrequired | string |
MirrorsPOST /api/v1/connectors/{id}/git-sync
connect_container_registryread_write · admin roleCreate and validate a container registry connector.
Arguments
| Name | Type | Description |
|---|---|---|
namerequired | string | |
registry_urlrequired | string | |
username | string? | |
password_or_token | string? | |
project_id | string? |
MirrorsPOST /api/v1/connectors/container-registry
list_connectorsread_write · admin roleList connectors in the workspace (or one project).
Arguments
| Name | Type | Description |
|---|---|---|
project_id | string? |
MirrorsGET /api/v1/connectors
update_connectorread_write · admin roleUpdate a connector's name/regions/enabled state.
Arguments
| Name | Type | Description |
|---|---|---|
connector_idrequired | string | |
namerequired | string | |
regionsrequired | string[] | |
enabled | boolean | default true |
MirrorsPATCH /api/v1/connectors/{id}
Trigger and run assessments. Requires a read_write key.
trigger_scanread_writeStart an assessment for a connector.
Async — poll get_scan for status.
Arguments
| Name | Type | Description |
|---|---|---|
connector_idrequired | string | |
modules | string[]? | default ["aws_discovery"] |
idempotency_key | string? |
MirrorsPOST /api/v1/connectors/{id}/scans
run_scanner_moduleread_writeRun one local scanner module against a target and attach the result to an existing scan.
Arguments
| Name | Type | Description |
|---|---|---|
scan_idrequired | string | |
modulerequired | string | |
target_kindrequired | string | |
referencerequired | string | |
options | object? |
MirrorsPOST /api/v1/scanners/run
run_derived_moduleread_writeRun a derived module (key_management, crypto_graph, migration_lab).
Arguments
| Name | Type | Description |
|---|---|---|
scan_idrequired | string | |
module_keyrequired | string |
MirrorsPOST /api/v1/scans/{id}/derived-modules/{module_key}
"QSHIELD_API_KEY is not set"— the environment variable wasn't passed to the server process. Check your MCP client's server config.
"QSHIELD_API_KEY is invalid, unknown, or has been revoked" — generate a new key from Settings → API keys.
"This API key is read_only; this action requires a read_write key" — generate a new key with the read_write scope.
"This action requires an admin role" — only connector tools require this; the account that created the key must have the admin role in QShield.
"Rate limit exceeded" — wait a moment, or raise QSHIELD_MCP_RATE_LIMIT on the server process.