CSP builder

Build a Content-Security-Policy and a Next.js headers snippet.

Runs in browser

Use from your agent

Streamable HTTP at https://benchline.fabwaseem.com/mcp. No key. The tool name is build_csp.

mcp.jsonjson
1{
2 "mcpServers": {
3 "benchline": {
4 "url": "https://benchline.fabwaseem.com/mcp"
5 }
6 }
7}
tools/calljson
1{
2 "jsonrpc": "2.0",
3 "id": 1,
4 "method": "tools/call",
5 "params": {
6 "name": "build_csp",
7 "arguments": {
8 "upgradeInsecureRequests": true,
9 "blockAllMixedContent": false
10 }
11 }
12}

How it works

Free Content-Security-Policy generator. Fill in directives or paste a policy, then copy the header and a next.config headers() snippet. Warnings call out wildcards, unsafe-inline, and a missing object-src or frame-ancestors.

  1. 01

    Start from a preset or paste a policy

    Strict blocks by default. The Next.js preset allows what a typical app needs, and the notes say what is loose.

  2. 02

    Edit directives

    Each field is one directive. Leave a field blank to omit it.

  3. 03

    Copy the snippet

    The header line and the next.config snippet stay in sync with the fields.

FAQ