P0 — primary MCP client. Works in Agent, Composer, and Chat across all models.
Setup
Step 1. Build packages (first time only):
pnpm install && pnpm build:packages
Step 2. Set environment variables in your shell:
export BLEKLINE_WORKSPACE_TOKEN="blw_..."
export BLEKLINE_API_URL="https://app.blekline.com"
Step 3. .cursor/mcp.json is pre-generated in the repo root. Reload Cursor: Cmd+Shift+P → Developer: Reload Window
Step 4. Verify in Settings → MCP: blekline should show green with 3 tools: blekline_mask_prompt, blekline_classify_risk, blekline_emit_event.
What the tools do in Agent mode
When your agent runs, Blekline intercepts at two points:
Before model context — blekline_mask_prompt strips PII and secrets from any text before it enters the context window.
Before tool execution — blekline_evaluate_tool_call checks the tool name and arguments against your workspace policy before the call reaches Daytona or any downstream MCP server.
You don't need to change your prompts or agent rules. The MCP server handles interception automatically when connected.
Troubleshooting
MCP shows red / disconnected
- Run
pnpm build:packages— the dist files must exist for the stdio command. - Check
BLEKLINE_WORKSPACE_TOKENis exported in your terminal session, not just in.env. - Try the npm path instead: set command to
npxand args to["-y", "@blekline/mcp-server"]. - Reload Cursor after any config change:
Cmd+Shift+P → Developer: Reload Window.
Tools show but calls fail with 401
Token scope issue. Regenerate a token in Admin → API keys with mask:write and events:write scopes.
Agent never calls the Blekline tools
In Agent mode, tools are available but the agent decides when to invoke them. Add a rule to .cursorrules or your system prompt: Always call blekline_mask_prompt before sending any text containing emails, API keys, credentials, or database connection strings to a model.
Using with Daytona sandboxes
Connect blekline-proxy as a second MCP server. It sits between Cursor and the Daytona MCP server, enforcing tool policy before sandbox execution. See MCP Proxy and Daytona Stack.
Model coverage
MCP is model-agnostic. One Blekline server covers all Cursor models: Anthropic (Opus, Sonnet, Haiku), OpenAI (GPT-4o, GPT-5, o1/o3), Google (Gemini Pro/Flash), Cursor (Composer, Auto). See Cursor Model Matrix for the enterprise QA checklist.
Next steps: Quick start · MCP Proxy · Daytona stack · Open workspace