Skip to main content
Glama

@mhdd_24/ai-guardrail-mcp

MCP server for Input/output policy validation.

Same architecture as @mhdd_24/sublime-mcp.

Full documentation: docs/WIKI.md


How it works (30 seconds)

You (chat) → MCP client → ai-guardrail-mcp → AI Guardrail APIs / CLIs / local tools

Related MCP server: MCP Gatekeeper

Prerequisites

Requirement

Notes

Node.js 18+

ESM TypeScript MCP server

Credentials / CLIs

See environment variables below


Install

Option A — npm (after publish)

npm install -g @mhdd_24/ai-guardrail-mcp

Option B — npx

npx @mhdd_24/ai-guardrail-mcp

Option C — clone and build

git clone https://github.com/Mhdd-24/AI-Guardrail-MCP.git
cd AI-Guardrail-MCP
npm install
npm run build
node dist/index.js

Configure Cursor

Edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "aiguard": {
      "command": "npx",
      "args": ["-y", "@mhdd_24/ai-guardrail-mcp"],
      "env": {
        "_": "optional"
      }
    }
  }
}

Local development:

{
  "command": "node",
  "args": ["/absolute/path/to/AI-Guardrail-MCP/dist/index.js"]
}

Environment variables

Variable

Description

No required env


Tools

Tool

Description

aiguard_status

Show Input/output policy validation configuration / health.

aiguard_scan

Scan text for policy/safety issues.

aiguard_suite

Generate a test suite outline.


License

ISC

Available Tools

3 tools
aiguard_scanC

Scan text for policy/safety issues.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesInput/output text

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, but it only restates the tool's purpose. It does not mention whether the operation is read-only, what the output looks like, whether any side effects occur, or what happens when issues are found.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single clear sentence with no redundant words, making it easy to parse. It is appropriately front-loaded with the primary action, though it sacrifices useful details for brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description is too thin to be fully complete. An agent still needs to infer what the tool returns, whether it is safe to call, and when to prefer it over sibling tools. The simplicity of one parameter helps, but the missing behavioral context is a notable gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the input schema already documents the single 'text' parameter. The description adds no additional meaning beyond the schema's 'Input/output text,' which is adequate for this single-parameter tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear action ('Scan text') and a specific goal ('policy/safety issues'), making the tool's core purpose understandable. It does not explicitly differentiate from siblings like aiguard_status or aiguard_suite, but the distinct verb and resource provide enough separation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to choose this tool over aiguard_status or aiguard_suite, nor any exclusions or prerequisites. Usage is only vaguely implied by the verb 'scan,' so an agent has no explicit direction on selecting it among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

aiguard_statusA

Show Input/output policy validation configuration / health.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioral burden. The verb 'Show' strongly implies a read-only operation, which is the main behavioral trait. However, the description does not explicitly state side-effect-free behavior, authentication needs, or whether it only reports current state without performing validation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no filler. The key subject is front-loaded, and every word contributes to identifying what the tool shows.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter status tool, the description is largely complete: it names the subject and the nature of the output. The lack of an output schema raises the expectation for return-value detail, but the low complexity and absence of parameters keep the burden modest.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is nothing for the description to add; the baseline of 4 applies. The phrase 'Input/output policy validation configuration / health' clarifies what the status refers to, but no parameter documentation is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies a status/read operation with the verb 'Show' and names the resource: 'Input/output policy validation configuration / health.' It distinguishes from the scan/suite siblings by focusing on current configuration/health rather than an action. The slash between 'configuration' and 'health' creates slight ambiguity about what exactly is returned.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus aiguard_scan or aiguard_suite. There are no conditions, prerequisites, or exclusions. The reader can infer it is a status check from the name, but the description does not state that explicitly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

aiguard_suiteC

Generate a test suite outline.

ParametersJSON Schema
NameRequiredDescriptionDefault
policyYesPolicy summary

TDQS

C2.6/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only says 'Generate a test suite outline' without mentioning side effects, return format, required permissions, or any constraints. This is a significant gap for an un-annotated tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words, but it is under-specified rather than efficiently concise. It communicates the core action without elaboration, making it minimal but not richly informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with only one parameter and no output schema or annotations, the description is too sparse to fully inform an agent. It does not clarify how the policy input is used, what the outline contains, or what the tool returns, leaving important call-time decisions to inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the policy parameter is already documented as 'Policy summary'. The tool description adds no additional meaning beyond what the schema provides, which matches the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Generate a test suite outline'), which clearly differentiates it from the sibling tools aiguard_status and aiguard_scan by action. However, it does not explicitly name or distinguish itself from those siblings, so it falls short of full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus its alternatives. The description provides no context for when a test suite outline is needed, what prerequisites exist, or how it relates to aiguard_status or aiguard_scan.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 3 tool updatesv1.0.0
    • First observedaiguard_scan
    • First observedaiguard_status
    • First observedaiguard_suite

TDQS

B3.2/5.0

Scored across 3 tools

Disambiguation5/5

The three tools have clearly distinct purposes: status/health checking, text scanning, and test suite generation. There is no overlap or ambiguity between them, making tool selection straightforward.

Naming Consistency5/5

All tool names follow a uniform aiguard_ prefix pattern with a single lowercase descriptive word. This consistent naming convention makes the tool set predictable and easy to navigate.

Tool Count4/5

Three tools is a compact but reasonable size for a focused guardrail utility. Each tool has a distinct purpose, though the set could potentially be slightly expanded with additional related operations without feeling bloated.

Completeness3/5

The tools cover health/status, text scanning, and test outline generation, but notable gaps exist—there is no policy management or execution capability for the generated test suite. Specifically, aiguard_suite creates an outline with no way to run it, creating a dead end in the workflow.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Enables validation of commit messages, branch names, author info, push safety, and repository state using commit-check rules, accessible as MCP tools.
    8
    142 PyPI
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    This MCP server enables security auditing for MCP configurations and AI agents, including prompt injection testing, data flow tracing, and security policy generation.
    16 npm
    MIT