Skip to main content
Glama
Blekline MCP Server

Blekline MCP Server

Official

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-server

Connect 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

@blekline/mcp-server

npx -y @blekline/mcp-server

AGPL-3.0

@blekline/mcp-proxy

npm i @blekline/mcp-proxy

AGPL-3.0

@blekline/client

npm i @blekline/client

Apache-2.0

@blekline/contracts

workspace / embed

Apache-2.0

@blekline/init

npx @blekline/init

Apache-2.0

@blekline/claude-sdk

npm i @blekline/claude-sdk

Apache-2.0

@blekline/cursor-hooks

npm i @blekline/cursor-hooks

AGPL-3.0

@blekline/codex-hooks

npm i @blekline/codex-hooks

AGPL-3.0

@blekline/client-hooks

workspace / hooks

Apache-2.0

@blekline/nhim-audit

npx @blekline/nhim-audit audit

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

BLEKLINE_CLIENT_SURFACE

CLI / SDK

cli/

sdk

CI

ci/

sdk

Cursor

.cursor/mcp.json.example

cursor

Claude Code

.claude/settings.json.example

claude-code

Claude Desktop

config/claude_desktop_config.json.example

claude-desktop

Codex

.codex/config.toml.example

codex

VS Code / Copilot / Continue

.vscode/

github-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.json

NHIM 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)

@blekline/mcp-server, mcp-proxy, contracts, client, cursor-hooks, codex-hooks, init, claude-sdk, client-hooks

Workspace policy, fleet SSE, Azure-backed PII masking

@blekline/nhim-audit — static K8s scan, no account

Deployment hub, posture upload, compliance export

Client config examples

app.blekline.com/docs

Deploy tracks

Track

Surface

Link

0

NHIM audit + CI gate

quickstart · ci-nhim-gate

01

Kubernetes fleet (NHIM image + Helm)

k8s-fleet

02

Docker sidecar (NHIM image)

docker-sidecar

03

MCP (Cursor, Claude, Codex)

mcp/cursor · npx -y @blekline/mcp-server

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

get-started/paths

Quick start

/docs

Eval journey

get-started/eval-journey

NHIM audit

tools/nhim-audit

Glossary

definitions

MCP proxy

mcp/proxy

Ingress proxy API

api/ingress-proxy

Community

CONTRIBUTING.md · CHANGELOG.md

Private team: develop in the blekline monorepo → pnpm audit:oss-public && pnpm sync:oss.

License

Component

License

mcp-server, mcp-proxy, ingress-proxy, nhim-audit, cursor-hooks, codex-hooks

AGPL-3.0

contracts, client, client-python, client-hooks, claude-sdk, init

Apache-2.0

Managed SaaS and the NHIM sidecar image are offered separately at app.blekline.com — not under the licenses in this repository.

Available Tools

6 tools
blekline_classify_riskA
Read-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_callA
Read-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_policyA
Read-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

    A3.8/5.0

    Scored across 6 tools

    Disambiguation3/5

    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.

    Naming Consistency5/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Protects 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.
      12
      215 npm
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides 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
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables deterministic zero-trust security for AI agents, providing prompt injection protection, PII scrubbing, and policy enforcement before agentic actions reach production systems.
      2
      Apache 2.0