Hardened, self-hosted MCP server that lets your AI agent query and govern your Infraveil control plane in-loop — signed both ways, human-approval-gated.
Project description
Infraveil MCP server
A hardened, self-hosted Model Context Protocol server that lets your own AI agent query and govern your Infraveil control plane in-loop — read the governed state of your backend, and file deploy and remediation requests that always pass through human approval.
It is built on the same principle as the rest of Infraveil: trust by inspection, not assertion. This server adds no new authority and no new auth surface. It signs every request with the token your agent already holds, and it verifies the control plane's signed responses in return — so neither side can be forged on the wire. You can read every line here and diff the signing code against the published agent source; they are the same scheme.
Why this exists
The MCP ecosystem's security is, bluntly, bad — most public MCP servers require no auth at all. An MCP server that hands an AI agent operational reach into your backend is exactly the thing that should not be unauthenticated. This one:
- Signs both directions (HMAC-SHA256 over a canonical request/response, keyed by your per-agent token; nonce + timestamp replay protection).
- Cannot apply a change by itself.
request_deployandremediateenqueue a request into the control plane's human-approval queue and return the approval URL. There is no code path here that mutates your infrastructure. - Is least-privilege. The token is scoped to one client/agent; tenancy is enforced by the control plane. This process holds no more authority than the agent already running on the host.
Install
pip install infraveil-mcp
Configure
The server reuses your existing Infraveil agent identity — it never mints credentials. Either set the environment variables:
export INFRAVEIL_BASE_URL=https://api.infraveil.com
export INFRAVEIL_CLIENT_ID=...
export INFRAVEIL_AGENT_ID=...
export INFRAVEIL_AGENT_TOKEN=... # your agent's existing token
…or point it at your rendered agent source and let it read the ids and token straight out of the file you can already inspect:
export INFRAVEIL_AGENT_FILE=/opt/infraveil/agent.py
Claude Desktop / Claude Code
{
"mcpServers": {
"infraveil": {
"command": "infraveil-mcp",
"env": {
"INFRAVEIL_BASE_URL": "https://api.infraveil.com",
"INFRAVEIL_CLIENT_ID": "...",
"INFRAVEIL_AGENT_ID": "...",
"INFRAVEIL_AGENT_TOKEN": "..."
}
}
}
}
Tools
Read (no side effects):
| Tool | What it returns |
|---|---|
get_agent_status |
Fleet/agent state: online/offline, heartbeats, CPU/mem/disk, deploy state |
get_security_findings |
Active security policy + recent security events |
get_request_trace |
Recent request/operation traces and outcomes |
query_runtime_truth_graph |
Authoritative host ↔ agent ↔ service ↔ policy snapshot |
Governed (enqueue for human approval — never auto-applied):
| Tool | What it does |
|---|---|
evaluate_deploy_gate |
Reports whether a proposed change would pass policy. Read-only. |
request_deploy |
Files a deploy request into the approval queue; returns request id + approval URL |
remediate |
Files a remediation proposal (respects your blocked categories); returns id + approval URL |
Verify it yourself
- Read
infraveil_mcp/client.py. The request-signing and response-verification code is plain stdlibhmac/hashlib. - Diff it against the published Infraveil agent source (
_signed_headers,verify_response_signature). They implement the same protocol. - Run the test suite:
pytest tests/. It transcribes the server's verifier and asserts this client's signatures are accepted and tampering is rejected.
License
AGPL-3.0-or-later. The control plane (central authority graph, multi-tenant policy, audit/evidence store) is the commercial product; the code that runs on your machine is open because you should never have to trust code you can't read.
Project details
Release history Release notifications | RSS feed
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 infraveil_mcp-0.1.1.tar.gz.
File metadata
- Download URL: infraveil_mcp-0.1.1.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94df753b0e7a62bf6afcf2985cdc9997869cabf9cd80ba3d95d22c9544099af7
|
|
| MD5 |
26d7faaedfb334fe4c67f0fab096b43d
|
|
| BLAKE2b-256 |
829f1c3206fc6fedc45a0cbbdf47b401be89bcc17327462e366b54de45e3e22c
|
Provenance
The following attestation bundles were made for infraveil_mcp-0.1.1.tar.gz:
Publisher:
publish.yml on infraveilhq/infraveil-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
infraveil_mcp-0.1.1.tar.gz -
Subject digest:
94df753b0e7a62bf6afcf2985cdc9997869cabf9cd80ba3d95d22c9544099af7 - Sigstore transparency entry: 1873685895
- Sigstore integration time:
-
Permalink:
infraveilhq/infraveil-mcp@16189f326c27616a20e3b7a0f3524f702f93ef47 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/infraveilhq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@16189f326c27616a20e3b7a0f3524f702f93ef47 -
Trigger Event:
release
-
Statement type:
File details
Details for the file infraveil_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: infraveil_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d46128b51931527c6abde1f63fceed64a6d9dfa677e9775ff3dea450e228b1b3
|
|
| MD5 |
f87d444485f01cbeeca9c9af27051d1f
|
|
| BLAKE2b-256 |
8d2ecc687909e67ec570554c57eb2a570c7e967f5b99196e6c8ad5c94c5ce2c1
|
Provenance
The following attestation bundles were made for infraveil_mcp-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on infraveilhq/infraveil-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
infraveil_mcp-0.1.1-py3-none-any.whl -
Subject digest:
d46128b51931527c6abde1f63fceed64a6d9dfa677e9775ff3dea450e228b1b3 - Sigstore transparency entry: 1873685945
- Sigstore integration time:
-
Permalink:
infraveilhq/infraveil-mcp@16189f326c27616a20e3b7a0f3524f702f93ef47 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/infraveilhq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@16189f326c27616a20e3b7a0f3524f702f93ef47 -
Trigger Event:
release
-
Statement type: