mcp-llm-behave
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-llm-behaveRun a behavior test: prompt='Explain AI', expected='define AI', output='AI is...'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-llm-behave
MCP server exposing llm-behave behavioral regression testing as callable tools inside Claude Desktop, Claude Code, and any MCP-compatible client.
Runs offline — no API calls, no external services. Uses sentence-transformers for embedding-based similarity.
Tools
Tool | What it does |
| Assert that a model output matches an expected behavior description |
| Detect semantic drift between a baseline and a new LLM output |
| Browse the built-in behavioral checks shipped with llm-behave |
Related MCP server: eval-mcp-server
Quickstart — Claude Desktop
Add to your claude_desktop_config.json (no install needed, uvx handles it):
{
"mcpServers": {
"mcp-llm-behave": {
"command": "uvx",
"args": ["mcp-llm-behave"]
}
}
}Config file location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after editing. The first run downloads the sentence-transformers model (~80 MB) once and caches it.
Quickstart — Claude Code (CLI)
claude mcp add mcp-llm-behave uvx mcp-llm-behaveInstall via pip / uv
pip install mcp-llm-behave
# or
uv add mcp-llm-behaveRun the server directly:
mcp-llm-behaveTool reference
run_behavior_test
Check whether a model output semantically satisfies an expected behavior.
Arguments
Name | Type | Description |
| str | The original prompt sent to the LLM (used for context/logging) |
| str | Plain-language description of what the output should do |
| str | The actual text returned by the LLM |
Returns
{
"score": 0.82,
"passed": true,
"threshold": 0.45
}compare_outputs
Detect semantic drift between a known-good baseline and a new output. Useful in CI after prompt or model changes.
Arguments
Name | Type | Description |
| str | The reference / previous LLM output |
| str | The new LLM output to compare |
Returns
{
"similarity_score": 0.91,
"drift_detected": false,
"interpretation": "Outputs are nearly identical — no drift."
}list_builtin_behaviors
Returns the catalog of pre-defined behavioral checks available in llm-behave, with method signatures and descriptions.
Returns — list of objects with name, method, and description keys.
Requirements
Python 3.10+
No API keys needed
~80 MB disk for the sentence-transformers model (downloaded once on first run)
Development
git clone https://github.com/Swanand33/mcp_llm_behave
cd mcp-llm-behave
uv sync
uv run pytestLicense
MIT — see LICENSE.
Available Tools
3 toolscompare_outputsA
Compare two LLM outputs for semantic similarity (regression detection).
Useful for catching silent model regressions: run this in CI against a known-good baseline output to detect drift when you change prompts or models.
| Name | Required | Description | Default |
|---|---|---|---|
| baseline | Yes | The reference/previous LLM output. | |
| candidate | Yes | The new LLM output to compare against baseline. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must convey behavioral traits. It describes the tool as performing semantic comparison (likely read-only) without side effects, but it does not disclose potential behaviors like auth needs, rate limits, or error handling. The description is adequate but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (two sentences) and front-loaded with the core purpose, followed by a usage hint. Every sentence adds value with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, two parameters, and output schema existence, the description covers the essential context (purpose, usage scenario) without needing to explain return values. It is sufficiently complete for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with both parameters described. The description does not add additional meaning beyond the schema (e.g., expected format or constraints), so it meets the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: compare two LLM outputs for semantic similarity (regression detection). The verb 'compare' and resource 'outputs' are specific, and it distinguishes from sibling tools like list_builtin_behaviors and run_behavior_test, which serve different functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context: run in CI against a known-good baseline to detect drift when changing prompts or models. It implies when to use but does not explicitly state when not to use or name alternatives, though the sibling tools hint at different purposes.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_builtin_behaviorsA
Return the catalog of built-in behavioral checks available in llm-behave.
Returns: list of dicts, each with 'name', 'method', and 'description' keys.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses the return format (list of dicts with 'name', 'method', 'description') adequately, but does not mention behavioral traits like read-only nature, performance, or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero waste. The purpose is stated first, followed by concise return structure. Ideal length and structure for a simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and an existing output schema, the description provides the return keys. However, it lacks usage context (e.g., when to list vs. run tests) and does not cover edge cases or failure modes. Adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage. The description adds no parameter info because none exists, which is appropriate. Baseline of 4 for zero-parameter tools.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Return' and the resource 'catalog of built-in behavioral checks.' It immediately differentiates from sibling tools 'compare_outputs' and 'run_behavior_test' which involve executing or comparing tests rather than listing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is provided. While the zero-parameter signature implies it is a simple retrieval tool, the description does not mention it as a prerequisite for other tools or give any context for decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_behavior_testA
Run a single behavioral assertion using llm-behave embedding similarity.
Checks whether the model output semantically satisfies the expected behavior. Uses sentence-level max similarity so long outputs are handled correctly.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The original prompt sent to the LLM (used for context/logging). | |
| expected_behavior | Yes | A plain-language description of what the output should do. | |
| model_output | Yes | The actual text returned by the LLM. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries the full burden. It discloses that the tool uses 'embedding similarity' and handles long outputs via 'sentence-level max similarity'. This gives meaningful insight into behavior beyond basic expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise: two short sentences plus a line. Each sentence provides distinct value: purpose, mechanism, and handling of long outputs. No wasted words. Front-loaded with the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given three clearly documented parameters in the schema, an output schema (per context), and helpful behavioral details, the description is complete. It covers what the tool does, how it works, and a key edge case (long outputs). No obvious gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and each parameter already has a clear schema description. The tool description restates the purpose of 'prompt' (context/logging) and the nature of 'expected_behavior' (plain-language), but adds no new semantics beyond the schema. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clear verb and resource: 'Run a single behavioral assertion'. It explains the technique (embedding similarity) and goal (check semantic satisfaction). However, it does not explicitly differentiate from sibling tools 'compare_outputs' and 'list_builtin_behaviors', which would help selection.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for checking expected behavior semantically, but lacks explicit guidance on when to use this tool versus alternatives like 'compare_outputs', or when not to use it. No prerequisites or exclusions stated.
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.
3 tool updates
v0.1.0- First observed
compare_outputs - First observed
list_builtin_behaviors - First observed
run_behavior_test
TDQS
Scored across 3 tools
Each tool has a distinct and clearly separated purpose: comparing outputs, listing built-in behaviors, and running a behavior test. No overlap or ambiguity.
All tool names follow the same verb_noun pattern in snake_case: compare_outputs, list_builtin_behaviors, run_behavior_test. Perfectly consistent.
Three tools is small but sufficient for the server's focused domain of LLM behavior testing. The set covers the essential operations without being overly minimal.
The tools cover listing available behaviors, running a test, and comparing outputs. While additional features like adding custom behaviors could be useful, the core workflow is complete.
Maintenance
Related MCP Connectors
MCP-native AI evaluation: rubric audits, eval suites, and proof reports for AI/LLM output.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
3rd Generation Testing (3TG) — generate deterministic test suites from Markdown spec tables via MCP.
Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceEnables running LLM evaluations, experiments, and custom evaluators through a standardized MCP interface.16Apache 2.0- FlicenseNot gradedqualityBmaintenanceExposes a deterministic AI-slop scanner and RAG grounding grader as MCP Tools, Resource, and Prompt, enabling any MCP client to evaluate text quality and context faithfulness.-
- AlicenseNot gradedqualityBmaintenanceProvides MCP tools for semantic search over personal knowledge sources using pluggable embeddings and local vector indexing.1MIT
- AlicenseAqualityCmaintenanceMCP server exposing statistical regression testing for LLM agents as a "run" tool: p-value, effect size, and confidence interval on whether agent behavior actually changed.174 PyPIApache 2.0