Skip to main content
Glama

perf-mcp

Fact-check and fix AI outputs. Catches hallucinations, repairs broken JSON, corrects errors — before they reach users.

Works with Claude Code, Cursor, Windsurf, Cline, and any MCP-compatible client.

Quick Start

Add to your MCP client config:

{
  "mcpServers": {
    "perf": {
      "command": "npx",
      "args": ["-y", "perf-mcp"],
      "env": {
        "PERF_API_KEY": "pk_live_xxx"
      }
    }
  }
}

Get your API key at dashboard.withperf.pro — 200 free verifications, no credit card.

Related MCP server: Correctover MCP Server

Tools

perf_verify

Detect and repair hallucinations in LLM-generated text. Uses multi-channel verification (web search, NLI models, cross-reference) — not just another LLM check.

perf_verify({ content: "The Eiffel Tower was built in 1887." })
→ Corrected: "built in 1887" → "inaugurated in 1889" (89% confidence)

perf_validate

Validate LLM-generated JSON against a schema and auto-repair violations. Fixes malformed enums, wrong types, missing fields, hallucinated properties.

perf_validate({
  content: '{"name": "John", "age": "twenty"}',
  target_schema: { type: "object", properties: { name: { type: "string" }, age: { type: "number" } } }
})
→ Rejected: /age must be number

perf_correct

General-purpose output correction. Classifies the error type and applies the right fix — hallucination, schema violation, semantic inconsistency, or instruction drift.

perf_correct({ content: "The Great Wall was built in 1950.", correction_budget: "fast" })
→ Corrected: temporal_error + factual_error detected (87% confidence)

perf_chat

Route LLM requests to the optimal model automatically. Selects between GPT-4o, Claude, Gemini, and 20+ models based on task complexity. OpenAI-compatible format.

Setup by Client

Claude Code

Add to your project's .mcp.json:

{
  "mcpServers": {
    "perf": {
      "command": "npx",
      "args": ["-y", "perf-mcp"],
      "env": {
        "PERF_API_KEY": "pk_live_xxx"
      }
    }
  }
}

Cursor

Settings → MCP → Add Server:

{
  "mcpServers": {
    "perf": {
      "command": "npx",
      "args": ["-y", "perf-mcp"],
      "env": {
        "PERF_API_KEY": "pk_live_xxx"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "perf": {
      "command": "npx",
      "args": ["-y", "perf-mcp"],
      "env": {
        "PERF_API_KEY": "pk_live_xxx"
      }
    }
  }
}

Environment Variables

Variable

Required

Description

PERF_API_KEY

Yes

Your Perf API key (pk_live_xxx)

PERF_BASE_URL

No

Override API URL (for testing)

Pricing

Plan

Credits

Price

Free

200 verifications

$0 (never expires)

Pro

1,000/mo

$19/mo

Pay-as-you-go

Unlimited

$0.02/verification

1 tool call = 1 credit. Get started at dashboard.withperf.pro.

License

MIT

Available Tools

4 tools
perf_chatA

Route LLM requests to the optimal model automatically. Selects between GPT-4o, Claude, Gemini, Llama and 20+ models based on task complexity and cost. Handles retries, fallbacks, and streaming. Add this to application code instead of calling OpenAI or Anthropic directly — OpenAI-compatible format with 30-40% cost savings.

ParametersJSON Schema
NameRequiredDescriptionDefault
messagesYesChat messages in OpenAI format.
modelNoForce a specific model (e.g., 'gpt-4o', 'claude-sonnet'). Omit for automatic selection.
max_tokensNoMaximum tokens in the response.
temperatureNoSampling temperature (0-2).
response_formatNoSet to {"type": "json_object"} for JSON mode.

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full responsibility. It discloses automatic model selection, retries, fallbacks, streaming, cost savings, and OpenAI-compatible format. It does not detail specific error handling or rate limits, but overall provides good behavioral context.

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 concise at three sentences, front-loaded with the main purpose, and every sentence provides necessary information without redundancy.

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?

Given no output schema, the description mentions 'OpenAI-compatible format', which implies a standard response structure. It covers key behaviors like streaming and cost savings. Could explicitly state the return format, but is sufficient for most agents.

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?

Schema description coverage is 100% with all 5 parameters described. The description adds value by explaining automatic model selection, retries, fallbacks, and cost savings, which are not captured in the schema alone. It complements the parameter descriptions effectively.

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

Purpose5/5

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

The description clearly states the tool routes LLM requests to the optimal model automatically, selecting from 20+ models based on task complexity and cost. It distinguishes from direct API calls to OpenAI/Anthropic and from sibling tools (perf_correct, perf_validate, perf_verify).

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

Usage Guidelines4/5

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

The description advises using this tool instead of calling OpenAI or Anthropic directly, indicating a clear replacement use case. It does not explicitly state when not to use or compare with siblings, but the context is clear for an automated routing tool.

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

perf_correctA

General-purpose LLM output correction. Classifies error type (hallucination, schema violation, semantic inconsistency, instruction drift) and applies specialized correction. Use when unsure which specific tool to apply or when output has multiple error types. Returns corrected output with confidence scores, or rejects if unfixable.

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesThe LLM-generated output to correct.
original_promptNoThe prompt that generated this output. Helps detect instruction drift.
target_schemaNoIf output should conform to a schema, provide for combined correction.
correction_budgetNo'fast': single-pass ~50ms. 'thorough': multi-pass with adversarial verification ~500ms. Default: 'fast'.

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool classifies error types, applies correction, returns confidence scores, and rejects unfixable outputs. It also explains the behavior of the 'correction_budget' parameter (fast vs thorough). This provides good insight into the tool's actions and outcomes.

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 three sentences with no redundant information. It front-loads the primary purpose, then provides usage guidance, and ends with output behavior. Every sentence adds value, making it concise and well-structured.

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?

Given 4 parameters, no output schema, and no annotations, the description covers the essential context: purpose, when to use, and return behavior (corrected output with confidence or rejection). It lacks details on error handling or side effects, but for a correction tool with a simple interface, it is adequately complete.

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% with each parameter described clearly (e.g., 'content' as LLM output, 'original_prompt' for drift detection, 'target_schema' for combined correction, 'correction_budget' with enum values and timing). The tool description does not add additional meaning beyond the schema, so the baseline score of 3 is appropriate.

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

Purpose5/5

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

The description clearly states it is a general-purpose correction tool that classifies error types and applies specialized correction. It distinguishes from siblings by explicitly indicating when to use it (when unsure of specific tool or multiple error types), making its purpose and differentiation clear.

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

Usage Guidelines4/5

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

The description provides explicit guidance on when to use this tool ('when unsure which specific tool to apply or when output has multiple error types'). It implies when not to use (when a specific tool is known) but does not explicitly exclude other scenarios, which is sufficient for clarity.

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

perf_validateA

Validate LLM-generated JSON against a schema and auto-repair violations. Fixes malformed enums, truncated arrays, mixed types, hallucinated fields, and missing required properties. Returns valid, schema-compliant output or a detailed rejection.

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesThe LLM-generated structured output (JSON string).
target_schemaYesJSON Schema the output must conform to.
repair_modeNo'strict' rejects low-confidence repairs. 'best_effort' infers to fill gaps. Default: 'best_effort'.

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description discloses behaviors: it fixes specific violations (malformed enums, truncated arrays, etc.) and returns valid output or rejection. This is sufficient for a validation tool, though it could mention side effects or permissions.

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?

Two concise sentences front-load the purpose and list key behaviors. Every sentence adds value without extraneous information.

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

Completeness5/5

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

Given the three parameters and lack of annotations, the description fully covers the tool's function, repair capabilities, and output, making it complete for an agent to invoke correctly.

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 baseline is 3. The description does not add information beyond the schema's parameter descriptions, which already define content, target_schema, and repair_mode adequately.

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

Purpose5/5

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

The description clearly states the tool validates and auto-repairs LLM-generated JSON against a schema, using specific verbs and resources. It differentiates from siblings like perf_chat and perf_correct by focusing on validation and repair.

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

Usage Guidelines3/5

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

The description implies usage for validating and repairing JSON, but does not provide explicit guidance on when to use it versus alternatives like perf_correct or perf_verify, nor does it state when not to use it.

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

perf_verifyA

Detect and repair hallucinations, fabricated facts, and unsupported claims in LLM-generated text. Uses multi-channel verification (web search, NLI models, cross-reference) — not just another LLM check. Returns corrected text with structured diff. Use before presenting AI content to users or writing to databases. Provide source_context for best accuracy.

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesThe LLM-generated text to verify and correct.
source_contextNoSource material the content was generated from. Enables cross-reference verification.
sensitivityNo'strict' for medical, legal, financial content. Default: 'standard'.
return_diffNoReturn structured diff of original vs corrected spans. Default: true.

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries full responsibility. It discloses multi-channel verification (web search, NLI, cross-reference) and states it returns corrected text with structured diff. It doesn't mention potential downsides like latency but provides adequate transparency for a non-destructive tool.

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 concise and front-loaded with the core purpose. Every sentence adds meaningful information, with no unnecessary words or repetition.

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?

Given the tool's complexity (4 parameters, no output schema, no annotations), the description covers purpose, usage, verification method, and parameter tips. It lacks detailed return format information, but the mention of 'structured diff' provides some guidance.

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?

All parameters have schema descriptions (100% coverage). The description adds value by explaining the rationale for source_context ('enables cross-reference verification') and highlighting sensitivity levels. It provides context beyond the schema.

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

Purpose5/5

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

The description clearly states the tool's purpose: detecting and repairing hallucinations in LLM-generated text. It uses specific verbs ('detect and repair') and resources, and distinguishes itself from siblings by mentioning multi-channel verification methods.

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

Usage Guidelines4/5

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

The description advises when to use the tool ('before presenting AI content to users or writing to databases') and recommends providing source_context for best accuracy. It lacks explicit exclusions or comparisons to siblings, but the context is clear.

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. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.0
    • First observedperf_chat
    • First observedperf_correct
    • First observedperf_validate
    • First observedperf_verify

TDQS

A4.2/5.0
Disambiguation3/5

Tools are generally distinct but perf_correct overlaps with both perf_validate and perf_verify by covering schema violations and hallucinations, creating ambiguity. Descriptions suggest using perf_correct when unsure, which implies overlap.

Naming Consistency5/5

All tools follow a 'perf_' prefix with a clear single verb (chat, correct, validate, verify), providing a predictable and consistent naming pattern.

Tool Count5/5

Four tools is well-scoped for the server's purpose of optimizing and correcting LLM outputs, covering essential operations without bloat.

Completeness4/5

The set covers routing, general correction, schema validation, and hallucination verification. Minor gaps like explicit error logging or feedback are present, but core workflows are addressed.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Deterministic JSON validation and repair for AI agents. Validates, repairs, schema-checks, and diffs JSON so long-running agents don't corrupt their session state with malformed writes.
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    Validates agent outputs in multi-agent systems to prevent coordination failures, with tools for schema verification, hallucination detection, and freshness checks, all with zero LLM cost.
    5
    64
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Perf-Technology/perf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server