Blekline MCP Server

Blekline MCP Server

Provides AI ingress governance by masking prompts, classifying risk, and enforcing tool policies before agent calls reach model providers or sandboxes.

Category
访问服务器

README

 

<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/Blekline/blekline-oss/raw/main/assets/images/blekline-logo-dark.svg" /> <source media="(prefers-color-scheme: light)" srcset="https://github.com/Blekline/blekline-oss/raw/main/assets/images/blekline-logo-light.svg" /> <img alt="Blekline — mark and wordmark" src="https://github.com/Blekline/blekline-oss/raw/main/assets/images/blekline-logo-light.svg" width="46%" /> </picture> </div>

<h3 align="center"> Run secure AI agents and code. <br /> <sub>AI ingress control plane — mask prompts, enforce MCP tool policy, and audit every agent call before models and sandboxes.</sub> </h3>

<p align="center"> <a href="docs/introduction/quick-start.md">Documentation</a> · <a href="https://github.com/Blekline/blekline-oss/issues">Report Bug</a> · <a href="https://github.com/Blekline/blekline-oss/issues">Request Feature</a> · <a href="SECURITY.md">Security</a> · <a href="https://app.blekline.com">app.blekline.com</a> </p>

<p align="center"> <a href="LICENSE"><img src="https://img.shields.io/badge/License-AGPL%20v3-blue.svg" alt="License: AGPL v3" /></a> <a href="LICENSE-APACHE"><img src="https://img.shields.io/badge/Contracts%20%26%20SDK-Apache%202.0-green.svg" alt="Apache-2.0 SDK" /></a> <a href="https://www.npmjs.com/package/@blekline/mcp-server"><img src="https://img.shields.io/npm/v/@blekline/mcp-server?label=npm" alt="npm @blekline/mcp-server" /></a> </p>


Blekline is the ingress governance layer for enterprise AI adoption. Agents in Cursor, Claude Desktop, and Codex call Blekline to redact sensitive data, classify risk, and enforce workspace MCP tool policy before traffic reaches LLM providers or Daytona sandboxes.

The open-source packages in this repository cover local enforcement, MCP tools, SDK clients, and an optional Docker ingress sidecar. The managed control plane at app.blekline.com adds Azure-backed PII masking, fleet policy, investigations, and billing.

Features

Area Capabilities
Ingress OpenAI/Anthropic-compatible proxy paths, regional edge sidecar (Helm)
MCP blekline_mask_prompt, blekline_classify_risk, blekline_evaluate_tool_call, blekline_emit_event
MCP proxy Intercept downstream tool calls → allow / mask / block → forward to Daytona or other MCP
SDK TypeScript (@blekline/client) and Python (blekline-client)
Local Secret scan + tool policy in @blekline/contracts (no cloud required for dev)
Audit Metadata-oriented events; client surface labels (cursor, claude-desktop, codex)

Platform comparison

Capability OSS (this repo) Cloud (app.blekline.com)
MCP server / proxy Yes Yes
Local tool enforce Yes Yes
Azure authoritative PII — Yes
Workspace fleet policy (SSE) — Yes
Investigations / billing — Yes
Browser extension wedge — Yes (proprietary)

Architecture

[ Cursor | Claude Desktop | Codex ]
           │ MCP (stdio / SSE)
           ▼
[ @blekline/mcp-server | @blekline/mcp-proxy ]
           │ HTTPS (optional)
           ▼
[ Blekline control plane — mask · enforce · audit ]
           ├──────────────► [ Model providers ]
           └──────────────► [ Daytona sandbox — approved tools only ]

Details: docs/introduction/architecture.md · Daytona stack

Packages

Runnable packages live under packages/:

Package npm / PyPI License
@blekline/contracts (workspace) Apache-2.0
@blekline/client @blekline/client Apache-2.0
blekline-client PyPI (optional) Apache-2.0
@blekline/mcp-server @blekline/mcp-server AGPL-3.0
@blekline/mcp-proxy @blekline/mcp-proxy AGPL-3.0
ingress-proxy Docker image AGPL-3.0

OpenAPI spec: packages/contracts/openapi.yaml

Client libraries

TypeScript

npm install @blekline/client @blekline/mcp-server
import { BleklineClient } from "@blekline/client";

const blekline = new BleklineClient({
  workspaceToken: process.env.BLEKLINE_WORKSPACE_TOKEN!,
  metadata: { clientSurface: "sdk" },
});

const { maskedText, decision } = await blekline.mask({
  text: "Contact alice@corp.com — key AKIAIOSFODNN7EXAMPLE",
  platform: "MyAgent",
});

const tool = await blekline.enforceToolCall({
  toolName: "run_shell",
  arguments: { cmd: "curl https://api.internal/deploy" },
});

Python

pip install blekline-client
import os
from blekline_client import BleklineClient

client = BleklineClient(workspace_token=os.environ["BLEKLINE_WORKSPACE_TOKEN"])
print(client.mask(text="alice@corp.com")["maskedText"])

MCP (Cursor, Claude, Codex)

npx -y @blekline/mcp-server

Generate example configs:

cp .env.example .env
pnpm install && pnpm build:packages
node scripts/generate-mcp-configs.mjs

See docs/mcp/cursor.md, docs/mcp/claude-desktop.md, docs/mcp/codex.md.

Local-only (no API token)

import { enforceToolCallLocally, scanTextForSecrets } from "@blekline/contracts";

scanTextForSecrets("export AWS_KEY=AKIAIOSFODNN7EXAMPLE");
enforceToolCallLocally({
  toolName: "run_shell",
  arguments: { cmd: "export AWS_KEY=AKIAIOSFODNN7EXAMPLE" },
  requestId: "local-1",
});

Deployments

Mode Description
Cloud app.blekline.com — workspace tokens, Azure mask, audit
OSS MCP npx @blekline/mcp-server with BLEKLINE_WORKSPACE_TOKEN
Edge sidecar packages/ingress-proxy Docker + Helm — docs
Daytona stack Proxy → Daytona MCP — docs/integrations/daytona-stack.md
pnpm build:packages
docker build -t blekline-ingress -f packages/ingress-proxy/Dockerfile .

Quick start

  1. Create a workspace API token at app.blekline.com (scopes: mask:write, events:write).

  2. Set env:

    export BLEKLINE_WORKSPACE_TOKEN=blw_...
    export BLEKLINE_API_URL=https://app.blekline.com
    
  3. Install MCP in Cursor (.cursor/mcp.json):

    {
      "mcpServers": {
        "blekline": {
          "command": "npx",
          "args": ["-y", "@blekline/mcp-server"],
          "env": {
            "BLEKLINE_WORKSPACE_TOKEN": "blw_...",
            "BLEKLINE_CLIENT_SURFACE": "cursor"
          }
        }
      }
    }
    
  4. In the agent: "Use blekline_mask_prompt on: Contact John at john@acme.com"

REST

curl -s https://app.blekline.com/api/mask \
  -H "Content-Type: application/json" \
  -H "x-blekline-workspace-token: $BLEKLINE_WORKSPACE_TOKEN" \
  -d '{"text":"Contact john@acme.com","platform":"CLI"}'

Development

git clone https://github.com/Blekline/blekline-oss.git
cd blekline-oss
pnpm install
pnpm build:packages
pnpm demo:mcp-smoke
pnpm --filter @blekline/mcp-proxy test

Benchmark local enforce latency:

pnpm demo:latency

Documentation

Doc Topic
Quick start Tokens, first mask
Architecture Ingress vs runtime
Latency SLO p99 enforce, fast mask
MCP server Tools reference
MCP proxy Daytona downstream
TypeScript SDK @blekline/client
Python SDK blekline-client

Contributing

Blekline OSS is open source under AGPL-3.0 (server/proxy) and Apache-2.0 (contracts/SDK). See CONTRIBUTING.md, CODE_OF_CONDUCT.md, and COPYRIGHT.

Note: Blekline OSS uses a multi-license layout. GitHub shows AGPL-3.0 as the repository default (LICENSE). Apache-2.0 components are under LICENSE-APACHE — see NOTICE.

License

Component License
packages/mcp-server, packages/mcp-proxy, packages/ingress-proxy GNU AGPL v3
packages/contracts, packages/client, packages/client-python Apache 2.0

Managed SaaS at app.blekline.com is not licensed under this repository.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选