Skip to main content
Glama
HashBuilds Secure Prompts

HashBuilds Secure Prompts

by jphyqr

HashBuilds Secure Prompts MCP Server

An MCP (Model Context Protocol) server that allows AI assistants like Claude Code to register and verify prompts with HashBuilds Secure Prompts.

What is MCP?

MCP (Model Context Protocol) is a standard that lets AI assistants call external tools. When you configure this MCP server with Claude Code, you can say things like:

  • "Register this prompt as a secure prompt"

  • "Verify prompt ID xyz123"

  • "Generate embed code for my secure prompt"

Related MCP server: GSEP-MCP

Installation

1. Install dependencies and build

cd mcp-server
pnpm install
pnpm build

2. Configure Claude Code

Add this MCP server to your Claude Code settings. There are two ways:

Create/edit .claude/config.json in your project:

{
  "mcpServers": {
    "hashbuilds-secure-prompts": {
      "command": "node",
      "args": ["/path/to/hashbuilds/mcp-server/dist/index.js"],
      "env": {
        "HASHBUILDS_API_URL": "https://hashbuilds.com/api/secure-prompts"
      }
    }
  }
}

Option B: Global config

Edit ~/.config/claude/config.json:

{
  "mcpServers": {
    "hashbuilds-secure-prompts": {
      "command": "node",
      "args": ["/Users/johnhashem/workspace/hashbuilds/mcp-server/dist/index.js"]
    }
  }
}

3. Restart Claude Code

After adding the config, restart Claude Code for it to pick up the new MCP server.

Available Tools

register_secure_prompt

Register a prompt for security verification. This scans the prompt for:

  • Hidden instruction injection

  • Data exfiltration patterns

  • Invisible characters

  • Jailbreak attempts

  • URLs/backlinks

Parameters:

  • promptText (required): The prompt text to register

  • ownerEmail (optional): Email for notifications

  • siteDomain (optional): Domain where prompt will be displayed

Example usage in Claude Code:

"Register this prompt as a secure prompt: You are a helpful assistant..."

verify_secure_prompt

Check the verification status of an existing prompt.

Parameters:

  • promptId (required): The ID of the prompt to verify

Example:

"Verify secure prompt cmj23jn05000096ju2cvl1b3h"

get_embed_code

Generate HTML and React embed code for displaying the secure prompt badge.

Parameters:

  • promptId (required): The prompt ID

Example:

"Give me the embed code for prompt cmj23jn05000096ju2cvl1b3h"

Environment Variables

  • HASHBUILDS_API_URL: Override the API base URL (default: https://hashbuilds.com/api/secure-prompts)

For local development:

{
  "env": {
    "HASHBUILDS_API_URL": "http://localhost:3001/api/secure-prompts"
  }
}

How It Works

  1. Developer asks Claude Code to register a prompt

  2. Claude Code calls the register_secure_prompt tool via MCP

  3. MCP server sends the prompt to HashBuilds API

  4. HashBuilds scans the prompt for security issues

  5. Results returned to Claude Code with embed code

  6. Developer adds the embed code to their website

Example Workflow

You: I have this prompt on my website and want to make it a secure prompt:
     "You are a helpful coding assistant. Explain code clearly and provide examples."

Claude: I'll register that as a secure prompt for you.
        [Calls register_secure_prompt tool]

        Done! Your prompt has been registered with ID: cmj123xyz
        Risk Level: safe

        Here's the embed code to add to your website:

        <div data-secure-prompt-id="cmj123xyz">
          <pre data-secure-prompt-content="cmj123xyz">Your prompt here...</pre>
        </div>
        <script src="https://hashbuilds.com/sp.js" async></script>

Troubleshooting

MCP server not connecting

  1. Check that the path to dist/index.js is correct

  2. Ensure pnpm build completed without errors

  3. Restart Claude Code after config changes

API errors

  1. Check your internet connection

  2. Verify HashBuilds API is reachable

  3. For local dev, ensure the local server is running

Development

# Watch mode for development
pnpm dev

# Build for production
pnpm build

# Run directly
node dist/index.js

Available Tools

4 tools
audit_promptsA

Analyze a list of prompts found in a codebase and categorize them as user-facing (needs badge) or internal (audit only). This tool helps users who already have prompts in their codebase understand which ones should be registered with secure badges vs which are internal-only.

HOW TO USE:

  1. First, search the codebase for prompts using patterns like:

    • Files matching: public/PROMPT_*.txt, */prompt.ts

    • Code patterns: 'You are a', 'systemPrompt', 'SYSTEM_PROMPT', role: 'system'

  2. Extract the prompt text and file location for each found prompt

  3. Call this tool with the prompts array

  4. Present the audit results to the user, showing:

    • User-facing prompts that should get security badges

    • Internal prompts that are safe but should be audited

    • Prompts needing manual review

  5. Ask the user which prompts they want to register for badges

  6. Use register_secure_prompt for each selected prompt

Inputs: prompts (required).

get_embed_codeA

Generate HTML and React embed code for displaying a secure prompt badge. Use this after registering a prompt to get the code to add to your website.

Inputs: promptId (required).

register_secure_promptA

Register a prompt with HashBuilds Secure Prompts for security verification and get embed options. This uses AI to scan the prompt for injection attacks, hidden instructions, data exfiltration, jailbreak attempts, and other security issues. Returns multiple display options (full badge, compact link, icon button) with implementation guidance. After registering, ASK THE USER which display option they prefer before implementing. The response includes an implementationGuide field with detailed instructions for styling and placement.

Inputs: promptText (required), siteDomain (required), ownerEmail.

verify_secure_promptB

Verify an existing secure prompt by its ID. Returns the security scan results, risk level, and verification status.

Inputs: promptId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: audit_prompts analyzes existing prompts, register_secure_prompt registers new ones, verify_secure_prompt checks registered prompts, and get_embed_code generates display code. The descriptions clearly differentiate their roles in the workflow.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with snake_case: audit_prompts, get_embed_code, register_secure_prompt, verify_secure_prompt. The naming is predictable and aligns well with their functions.

    Tool Count5/5

    With 4 tools, this server is well-scoped for its purpose of securing prompts. Each tool earns its place by covering key aspects: auditing, registration, verification, and embedding, without being too sparse or bloated.

    Completeness5/5

    The tool set provides complete coverage for the secure prompt lifecycle: audit existing prompts, register new ones, verify registered prompts, and generate embed code. There are no obvious gaps, and the tools guide users through a logical workflow from discovery to implementation.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables AI coding assistants to scan projects for security issues such as leaked API keys, missing Supabase RLS, open Firebase rules, unauthenticated routes, and hallucinated packages, then fix and verify the results.
      8
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Sovereign AI Security Suite & Threat Scanner. Real-time detection for phishing URLs, zero-day web threats, quishing QR codes, prompt injection defense, carrier disarming (AI-CDR), and autonomous agent safety guardrails.
      3
      MIT