This release is a pre-release and may not be stable for production use.
flintai-mcp
A local MCP server (stdio) that gives a coding agent read-only access to a Flint AI backend's AI-SPM issues, inventory, and remediation guidance so it can fix the flagged code.
It is a thin, authenticated REST client over the Flint AI API — no scanner runs locally and no backend changes are required. Everything valuable (AI-reasoned findings, rule-based issues, public-asset vuln enrichment, remediation guidance) is already computed server-side and served over the existing API / static assets.
The package is named for the platform (flintai-mcp) rather than AI-SPM
specifically: v1 ships the AI-SPM tools, but it is intended to grow to cover other
Flint AI product domains (guardrails, ROI, …) over time.
This repository is generated.
flintai-mcpis developed in SandboxAQ's internal monorepo and mirrored here (which also builds and publishes the wheel to PyPI). Please file issues here; seeCONTRIBUTING.mdto propose changes.
Phase 1: read-only, remote-backed. Fast verification of uncommitted fixes (a local scan + a synchronous backend "dry-run" endpoint) is a planned Phase 2 and is intentionally out of scope here.
Install & run
The idiomatic way is via the published wheel with uvx (no clone, no build step):
uvx flintai-mcp
Configuration
Set two environment variables:
| Variable | Meaning |
|---|---|
FLINTAI_API_KEY |
Flint AI API key (sk_...). |
FLINTAI_INSTANCE |
Flint instance base URL, e.g. https://app.flintai.dev. |
The instance URL is validated against a fail-closed host allowlist before any credential is attached.
The tenant and workspace are auto-discovered from the API key at startup — you do not configure any IDs. A key is pinned to exactly one tenant + active workspace by the backend.
The API key is only ever sent in the Authorization: ApiKey ... header and is
never logged.
Wiring into a coding agent
Add to your MCP client config (Claude Code .mcp.json, Cursor, etc.):
{
"mcpServers": {
"flintai-mcp": {
"command": "uvx",
"args": ["flintai-mcp"],
"env": {
"FLINTAI_API_KEY": "sk_...",
"FLINTAI_INSTANCE": "https://app.flintai.dev"
}
}
}
}
Tools
Fix-focused
get_context— show the resolved instance / tenant / workspace.list_issues(severity?, rule_id?, category?, search?, page_size?, cursor?)— list issues; paginated,page_sizecapped at 100.get_issue(issue_id)— issue detail + assembled rule-level remediation guidance- affected objects.
get_finding_detail(issue_id, object_id, detail_id?)— per-finding file path, code snippet, evidence, and inline remediation.find_issues_for_file(path, max_issues?)— issues whose findings reference a given working-tree file (client-side scan; matches by shared path suffix). The scan follows pagination but is bounded —max_issuesis capped at 500 and the call at 300 backend requests — and returns ascanblock reportingcomplete,issues_scanned,requestsanderrors.complete: falsemeans the caps were hit and the file may have findings this result omits; treat it as "unknown", not as "clean", and narrow the search withlist_issuesfilters instead.get_remediation_guidance(rule_name)— rule-level remediation markdown.
Inventory browse
list_models | list_agents | list_tools | list_mcp_servers(name?, severity?, supplier?, library?, page_size?, cursor?)get_model | get_agent | get_tool | get_mcp_server(asset_id)— detail plus attached issues, related assets, and code locations.
Remediation guidance
Rule-level remediation markdown has no dedicated API — it is served by the
instance's web server as static assets at {instance}/assets/docs-remediations/…
(the same origin and files the web UI reads). This server fetches them at runtime
over HTTP through the shared client and caches them per session; nothing is
bundled into the package. When a rule has no docs (or the assets origin is
unreachable), fall back to the per-finding remediation text from
get_finding_detail.
For offline development or tests, set FLINTAI_REMEDIATION_DIR to a local directory
laid out like the assets (rule-name-to-remediation-folder-map.json + per-rule
folders); the loader then reads from disk and never touches the network.
Development
- Layout:
src/flintai_mcp/(src/layout), tests undertest/. - Editable install:
pip install -e '.[dev]', then runflintai-mcp. - Docs are fetched from your instance at runtime; for offline work point
FLINTAI_REMEDIATION_DIRat a local copy of the docs directory.
Tests
pytest
Tests are hermetic (httpx MockTransport for the client and the remediation-docs
fetch, a fake client + FLINTAI_REMEDIATION_DIR for the tools), so they need no
network or live backend.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flintai_mcp-0.1.0rc2.tar.gz.
File metadata
- Download URL: flintai_mcp-0.1.0rc2.tar.gz
- Upload date:
- Size: 32.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0ba99e0ca8072e8fbf5377828329b43967e845b445b68ab9d337c4433b9a518
|
|
| MD5 |
690ece22c898dc0763b793c19c2da5e8
|
|
| BLAKE2b-256 |
97c999a7ae202cce6f619c3abe397434d57f68ae6b4a4de4804ea7a01e879061
|
Provenance
The following attestation bundles were made for flintai_mcp-0.1.0rc2.tar.gz:
Publisher:
publish.yml on sandbox-quantum/flintai-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flintai_mcp-0.1.0rc2.tar.gz -
Subject digest:
e0ba99e0ca8072e8fbf5377828329b43967e845b445b68ab9d337c4433b9a518 - Sigstore transparency entry: 2529770378
- Sigstore integration time:
-
Permalink:
sandbox-quantum/flintai-mcp@948ba12edd07e43398c5d8d98aa8ad3a44d867d3 -
Branch / Tag:
refs/tags/v0.1.0rc2 - Owner: https://github.com/sandbox-quantum
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@948ba12edd07e43398c5d8d98aa8ad3a44d867d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file flintai_mcp-0.1.0rc2-py3-none-any.whl.
File metadata
- Download URL: flintai_mcp-0.1.0rc2-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a0d8bf0ba7824118f72b8a411a961e62783426c40816d2c637e1323b831f028
|
|
| MD5 |
1d03c34d3f1238dfe09f01b8bc47f4f3
|
|
| BLAKE2b-256 |
1ee1f752704cdc027f78d7edc155b7436c51470e77761d241becad9924d4ac59
|
Provenance
The following attestation bundles were made for flintai_mcp-0.1.0rc2-py3-none-any.whl:
Publisher:
publish.yml on sandbox-quantum/flintai-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flintai_mcp-0.1.0rc2-py3-none-any.whl -
Subject digest:
1a0d8bf0ba7824118f72b8a411a961e62783426c40816d2c637e1323b831f028 - Sigstore transparency entry: 2529770463
- Sigstore integration time:
-
Permalink:
sandbox-quantum/flintai-mcp@948ba12edd07e43398c5d8d98aa8ad3a44d867d3 -
Branch / Tag:
refs/tags/v0.1.0rc2 - Owner: https://github.com/sandbox-quantum
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@948ba12edd07e43398c5d8d98aa8ad3a44d867d3 -
Trigger Event:
push
-
Statement type: