Blekline MCP Server
OfficialThis server provides AI agent governance by enforcing non-human identity and runtime governance at the execution boundary. It offers tools to:
Mask PII and secrets in prompts before sending to LLMs (
blekline_mask_prompt), with an optional platform label for context.Simulate redaction policies for dry-run previews without applying masking or storing content (
blekline_simulate_policy).Evaluate tool calls against workspace policies to allow, mask, or block them before execution (
blekline_evaluate_tool_call).Log governance audit events with metadata only (no raw content) for compliance (
blekline_log_governance_event).
Deprecated tools (blekline_classify_risk and blekline_emit_event) are available for backward compatibility but should be replaced with the simulation and logging tools respectively. Read-only tools do not modify state.
Enforces MCP tool policy and masks prompts before traffic reaches OpenAI's models.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Blekline MCP Server mask PII in this prompt before sending to Claude"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Blekline governs agent traffic — MCP tool calls, prompt ingress, and sidecar hops — before models or sandboxes act.
This is Blekline’s open-core repository: npm packages, client integrations, and the NHIM audit CLI. Hosted docs and the control plane live on app.blekline.com. Start on Free — choose your path (Individual / Team / Enterprise / API), then Claude Code, Desktop, or Cursor. You do not need to clone this repo first.
Quick start (60 seconds)
No clone. Create a Free workspace, copy a token from Admin → API keys, then:
npx -y @blekline/init
export BLEKLINE_WORKSPACE_TOKEN="blw_..."
export BLEKLINE_API_URL="https://app.blekline.com"
export BLEKLINE_CLIENT_SURFACE="sdk"
npx -y @blekline/mcp-serverConnect a client: Claude Code · Claude connector (OAuth) · Cursor · Codex
CLI: cli/README.md · CI: ci/ · 3-minute product path: Quick Start
Related MCP server: safeguard-mcp
Packages
Package | Install | License |
|
| AGPL-3.0 |
|
| AGPL-3.0 |
|
| Apache-2.0 |
| workspace / embed | Apache-2.0 |
|
| Apache-2.0 |
|
| Apache-2.0 |
|
| AGPL-3.0 |
|
| AGPL-3.0 |
| workspace / hooks | Apache-2.0 |
|
| AGPL-3.0 |
MCP tools: blekline_mask_prompt · blekline_evaluate_tool_call · blekline_simulate_policy · blekline_log_governance_event — MCP server docs
OpenAPI: packages/contracts/openapi.yaml
Connect a client
Surface | Path |
|
CLI / SDK |
| |
CI |
| |
Cursor |
| |
Claude Code |
| |
Claude Desktop |
| |
Codex |
| |
VS Code / Copilot / Continue |
|
Full matrix: integrations/README.md · pnpm generate:mcp-configs · pnpm verify:integrations
Depth: Cursor and Codex ship hooks + plugins in this repo. Claude Code ships MCP + @blekline/claude-sdk. VS Code Copilot is MCP-only here — the @blekline extension is cloud/Marketplace (see integrations/README.md).
NHIM audit (cluster scan)
No Blekline account required. Use this when you are evaluating Kubernetes posture — not as step 1 for IDE governance.
kubectl apply -f https://raw.githubusercontent.com/Blekline/blekline-oss/main/packages/nhim-audit/deploy/rbac/nhim-audit-reader-namespaced.yaml -n nhim-eval
kubectl apply -f https://raw.githubusercontent.com/Blekline/blekline-oss/main/packages/nhim-audit/deploy/rbac/nhim-audit-reader-cluster.yaml
npx @blekline/nhim-audit audit --profile generic --namespace nhim-eval --plain --json -o nhim-audit.jsonNHIM audit quickstart · CI NHIM gate · Eval journey (K8s / Docker / MCP tracks)
Track 01 / 02 deploy the NHIM sidecar image (ghcr.io/blekline/sidecar) — Trust Vault, Lineage Firewall, admission — documented under Docker sidecar and K8s fleet. That image is not built from this repository.
Why packages/ingress-proxy is still open source
This folder is a reference sidecar — source you can audit, fork, and run locally:
Tool-call enforcement and model ingress using
@blekline/contracts(same policy primitives as MCP)Helm chart as a starting layout for sidecar injection (values default vault/lineage off)
For contributors and self-hosters who want contracts-level enforcement without pulling the NHIM image
It is not a stand-in for the production sidecar on eval tracks. If you only need MCP, use npx @blekline/mcp-server. If you need Trust Vault or Lineage, use the NHIM image from the deploy guides — not a DIY build of this package alone.
Details: packages/ingress-proxy/README.md · Ingress proxy API
What lives here vs on blekline.com
Open source (this repo) | Hosted product (app.blekline.com) |
| Workspace policy, fleet SSE, Azure-backed PII masking |
| Deployment hub, posture upload, compliance export |
Client config examples |
Deploy tracks
Track | Surface | Link |
0 | NHIM audit + CI gate | |
01 | Kubernetes fleet (NHIM image + Helm) | |
02 | Docker sidecar (NHIM image) | |
03 | MCP (Cursor, Claude, Codex) | mcp/cursor · |
Integration guides (L1 sandboxes, model providers, LangSmith, etc.): app.blekline.com/docs/integrations
Architecture
flowchart LR
Agents[L5 Agents] --> L4[Blekline L4]
L4 --> MCP[MCP / tools]
L4 --> Models[Model APIs]
L4 --> Vault[Trust Vault — NHIM image]Layer 4 ingress between agents and tools/models. Architecture · Trust boundaries · Runtime simulator
Documentation
Topic | Link |
Choose your path | |
Quick start | |
Eval journey | |
NHIM audit | |
Glossary | |
MCP proxy | |
Ingress proxy API |
Community
Questions — GitHub Discussions
Design partners / platform eval — design partner issue (Track 01/02/03)
Security — SECURITY.md (no public issues for vulns)
CONTRIBUTING.md · CHANGELOG.md
Private team: develop in the blekline monorepo → pnpm audit:oss-public && pnpm sync:oss.
License
Component | License |
| |
|
Managed SaaS and the NHIM sidecar image are offered separately at app.blekline.com — not under the licenses in this repository.
Available Tools
6 toolsblekline_classify_riskARead-only
[Deprecated — use blekline_simulate_policy] Read-only simulation of Blekline redaction policy on a prompt without applying masking or persisting content.
Inputs: prompt (required), platform, sourceHost.
blekline_emit_eventA
[Deprecated — use blekline_log_governance_event] Write a metadata-only governance audit event to the Blekline workspace. Does not store raw prompt content.
Inputs: kind (required), action, platform, riskTier, +1 more.
blekline_evaluate_tool_callARead-only
Read-only evaluation of MCP tool name and arguments against Blekline workspace tool policy (allow, mask, or block).
Inputs: toolName (required), arguments (required), platform.
blekline_log_governance_eventB
Write a metadata-only governance audit event to the Blekline workspace. Does not store raw prompt content.
Inputs: kind (required), action, platform, riskTier, +1 more.
blekline_mask_promptA
Mask PII and secrets in prompt text via the Blekline control plane before sending content to an LLM.
Inputs: text (required), platform.
blekline_simulate_policyARead-only
Read-only simulation of Blekline redaction policy on a prompt without applying masking or persisting content.
Inputs: prompt (required), platform, sourceHost.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The set includes two pairs of deprecated duplicates (classify_risk mirrors simulate_policy, emit_event mirrors log_governance_event), which creates some overlap. However, the deprecation notes explicitly point to the replacements, so an agent can disambiguate with careful attention.
All tools share the consistent 'blekline_' prefix and follow a clear verb_noun snake_case pattern (mask_prompt, simulate_policy, log_governance_event, evaluate_tool_call, classify_risk, emit_event). The naming is uniform and predictable.
Six tools total is within the typical well-scoped range, though two are deprecated, leaving four active tools. This is slightly thin for a governance surface but still reasonable for the narrow purpose of masking and policy evaluation.
The active tools cover core needs: masking, policy simulation, governance event logging, and tool-call evaluation. Missing capabilities like policy management or retrieving audit logs are minor gaps, but the primary workflow is well covered.
Maintenance
Related MCP Connectors
Security gateway for AI agents: policy, approval, and audited execution, no secrets shared.
Zero-trust gateway for AI agents: score tool calls, verify agent cards, enforce policy, audit.
Real-time prompt injection filtering, MCP payload inspection, and A2A trust scoring.
Real-time MCP & A2A prompt-injection, jailbreak, and tool-schema poisoning firewall for AI agents.
Related MCP Servers
- AlicenseAqualityBmaintenanceProtects AI agents from threats like prompt injection, jailbreaks, and SQL injection through a multi-layer scanning pipeline. It also enables PII redaction and rehydration to ensure data privacy during LLM interactions.12215 npm2Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to scan, redact, and govern sensitive data before sending it to external tools through DLP, secure chat, and shadow AI discovery tools.AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceProvides a governance gateway for LLM and agent traffic via MCP, blocking prompt injection, redacting PII, enforcing per-tenant token budgets, and caching repeat questions semantically. Enables AI agents to route model calls through the same guardrails instead of calling providers directly.MIT
- AlicenseNot gradedqualityDmaintenanceEnables deterministic zero-trust security for AI agents, providing prompt injection protection, PII scrubbing, and policy enforcement before agentic actions reach production systems.2Apache 2.0