npm blackwall-mcpstdioupdated 11d ago
A guardrail for AI agents, as an MCP server. Your agent calls one tool ā forecast ā before any irreversible action (send email, move money, run SQL, delete data, post content). It gets back a risk score (0ā100), a reversibility class, a GO / CAUTION / STOP recommendation, and named red flags in a few seconds (4-8s).
What can you do with blackwall?
blackwall-mcp
A guardrail for AI agents, as an MCP server. Your agent calls one tool ā forecast ā before any irreversible action (send email, move money, run SQL, delete data, post content). It gets back a risk score (0ā100), a reversibility class, a GO / CAUTION / STOP recommendation, and named red flags in a few seconds (~4-8s).
Works in any MCP host: Claude Desktop, Claude Code, Cursor, Windsurf, and any agent framework with MCP support.
The wall between your agent and disaster. A BLUETIER product.
1. Get an API key
Sign up free at https://blackwalltier.com ā Dashboard ā API keys ā Create key.
Free tier: ~100 forecasts/month, no card. Your key looks like bw_live_ā¦.
2. Add the server to your MCP host
Claude Desktop
Edit claude_desktop_config.json (Settings ā Developer ā Edit Config):
{
"mcpServers": {
"blackwall": {
"command": "npx",
"args": ["-y", "blackwall-mcp"],
"env": { "BLACKWALL_API_KEY": "bw_live_your_key_here" }
}
}
}
Restart Claude Desktop. You'll see a forecast tool available.
Cursor
Settings ā MCP ā Add new global MCP server, then in mcp.json:
{
"mcpServers": {
"blackwall": {
"command": "npx",
"args": ["-y", "blackwall-mcp"],
"env": { "BLACKWALL_API_KEY": "bw_live_your_key_here" }
}
}
}
Claude Code
claude mcp add blackwall -e BLACKWALL_API_KEY=bw_live_your_key_here -- npx -y blackwall-mcp
Run locally (any host / testing)
BLACKWALL_API_KEY=bw_live_your_key_here npx -y blackwall-mcp
3. Use it
Once added, instruct your agent: "Before any irreversible action, call the forecast tool and stop if it returns STOP." The model will call it automatically when it's about to do something risky.
The forecast tool
| Parameter | Type | Required | Description |
|---|---|---|---|
action |
string | ā | The action type, e.g. send_email, make_payment, run_sql, delete_file, post_content |
inputs |
object | ā | Concrete parameters: recipient, amount_usd, SQL statement, file path, message body, URL, etc. |
context |
object | ā | Optional: { agent_role, user_intent, environment } |
depth |
standard | deep |
ā | Analysis depth. standard is the default. |
Returns: recommendation (GO/CAUTION/STOP), risk_score (0ā100), reversibility (class + rollback cost), gate (proceed/confirm/human-required), confidence, red_flags[], predicted_result, alternative_actions[].
Example
Agent about to run DELETE FROM users; (no WHERE clause) ā
š BLACK_WALL: STOP ā risk 99/100
Red flags:
⢠[CRITICAL] SQL_NO_WHERE ā deletes the entire table, not one row
⢠[CRITICAL] INTENT_MISMATCH ā intent was "remove a single test row"
⢠[CRITICAL] IRREVERSIBLE_NO_BACKUP ā no recovery path
Guidance: DO NOT take this action. Surface the red flags to the user.
Observe mode ā try it with zero risk
Not ready to let a guardrail block your agents? Start in observe mode. It scores and logs every action but never tells the agent to stop ā your agents behave exactly as they do today. After a week, review your dashboard and see what it would have caught.
{
"mcpServers": {
"blackwall": {
"command": "npx",
"args": ["-y", "blackwall-mcp"],
"env": {
"BLACKWALL_API_KEY": "bw_live_your_key_here",
"BLACKWALL_MODE": "observe"
}
}
}
}
Then see "what your agents almost did" in your dashboard. Flip BLACKWALL_MODE to enforce (or just remove it ā enforce is the default) when you're ready to actually block.
Two tools
The server exposes two MCP tools:
forecastā pre-action risk check. ReturnsGO/CAUTION/STOP, risk score, named red flags, reversibility class, and a verifiable receipt.observeā post-action outcome report. Tells BLACK_WALL what actually happened after the action ran (or after the agent obeyed a STOP verdict). Closes the loop so the system can track prediction accuracy over time. FREE ā no tokens charged.
Wire your agent to call forecast before any irreversible action, then call observe afterwards with the forecast_id from the original response. observe accepts an outcome_class (matched / over_scope / under_scope / no_op / diverged / aborted) and optional divergence_severity and details. See the forecast example below; the same wiring applies to observe.
Use it in code ā the gate() control (any JS/TS agent)
Running an agent in Node (LangChain, a custom loop, ElizaOS, a cron job)? You don't need an MCP host ā call BLACK_WALL straight from the library, and let gate() make the check impossible to skip. One wrap forecasts the action, enforces the verdict (fails closed on STOP / unknown / unreachable), runs your side effect only when allowed, and reports the real outcome with observe automatically.
npm i blackwall-mcp
import { gate, BlackWallBlocked } from 'blackwall-mcp/lib/gate';
// Wrap ANY risky action in a few lines. BLACKWALL_API_KEY lives in the env.
try {
const { result } = await gate(
{ action: 'run_sql', inputs: { statement: sql }, context: { user_intent } },
() => db.query(sql), // your real side effect ā only runs if allowed
{ onCaution: (v) => confirmWithHuman(v) }, // CAUTION needs a yes; default = block
);
// ...use result
} catch (e) {
if (e instanceof BlackWallBlocked) {
// STOP, unconfirmed CAUTION, or forecast unavailable ā the action NEVER ran
console.error('Blocked:', e.reason, e.verdict?.red_flags);
} else throw e; // a real error thrown by your action
}
Fails closed by design. If no verdict can be obtained (network / auth / timeout), the action does not run unless you explicitly pass failOpen: true. A risk gate that fails open is not a risk gate. The loop closes itself ā gate() calls observe with the actual outcome (matched / diverged / aborted), so your forecasts sharpen over time.
Prefer the lower-level pieces? They're exported too:
import { forecast, observe } from 'blackwall-mcp/lib';
const v = await forecast({ action: 'make_payment', inputs: { amount_usd: 50000 } });
if (v.recommendation === 'STOP') throw new Error('halt');
// ... take the action ...
await observe(v.id, { outcome_class: 'matched' });
Runnable demo: examples/gate-quickstart.mjs.
Decision receipts (cryptographic, verifiable offline)
Every forecast response now includes a receipt field ā an Ed25519 signature over canonical SHA-256 hashes of the request + response. Anyone with the published public key can verify offline that BLACK_WALL signed off on a specific (request, response) pair, without trusting our servers.
- Published keys: https://blackwalltier.com/.well-known/blackwall-signing-keys.json (stable, cacheable)
- Stateless verify endpoint:
POST https://blackwalltier.com/api/v1/receipts/verifywith{ envelope, request_body, response_body } - Hashes only ā BLACK_WALL never stores the raw request/response bodies, so receipts give cryptographic audit without payload exposure
- Free-tier retention: 90 days. Paid: indefinite.
The MCP server surfaces the receipt id in its tool output so your agent can log it for later replay / audit.
Config reference
| Env var | Required | Default | Notes |
|---|---|---|---|
BLACKWALL_API_KEY |
ā | ā | bw_live_⦠from your dashboard |
BLACKWALL_BASE_URL |
ā | https://blackwalltier.com |
|
BLACKWALL_MODE |
ā | enforce |
observe = log only, never block |
Links
- Site & docs: https://blackwalltier.com
- Get a key: https://blackwalltier.com/dashboard/keys
MIT licensed.
Install
Add blackwall to your client. Pick the one you use.
claude mcp add blackwall-mcp -- npx -y blackwall-mcpcodex mcp add blackwall-mcp -- npx -y blackwall-mcpamp mcp add blackwall-mcp -- npx -y blackwall-mcp{
"mcpServers": {
"blackwall-mcp": {
"command": "npx",
"args": [
"-y",
"blackwall-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"blackwall-mcp": {
"command": "npx",
"args": [
"-y",
"blackwall-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"blackwall-mcp","command":"npx","args":["-y","blackwall-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"blackwall-mcp": {
"command": "npx",
"args": [
"-y",
"blackwall-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"blackwall-mcp": {
"command": "npx",
"args": [
"-y",
"blackwall-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"blackwall-mcp": {
"command": "npx",
"args": [
"-y",
"blackwall-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"blackwall-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"blackwall-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"blackwall-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"blackwall-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y blackwall-mcpRun `goose configure`, choose **Add Extension ā Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance25/25
- Trust6/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 3 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint ā no local install
Version history
| Versions | Published |
|---|---|
| 1.4.2Latest | Aug 25, 2026 |
| 1.4.1 | Jul 5, 2026 |
| 1.1.1 | May 30, 2026 |
| 1.1.0 | May 28, 2026 |
| 1.0.6 | May 23, 2026 |
| 1.0.5 | May 23, 2026 |
| 1.0.4 | May 23, 2026 |
| 1.0.3 | May 23, 2026 |
| 1.0.2 | May 23, 2026 |