groundlens-mcp
OfficialIntegrates with Windsurf (by Codeium) to provide hallucination detection capabilities, allowing users to check the factual grounding of AI responses.
Click on "Install 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., "@groundlens-mcpCheck this response for hallucinations."
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.
Groundlens MCP
MCP server for groundlens — LLM hallucination detection for Claude Desktop, Cursor, Windsurf, and any MCP-compatible client. No second LLM. Deterministic. Same inputs → same scores, every time.
One-click install
Tool | Install |
Cursor | |
VS Code | |
VS Code Insiders |
Related MCP server: Root Signals MCP Server
What it does
Adds three tools to your AI assistant:
Tool | What it checks | When to use it |
| Auto-selects the right method | Default — just use this one |
| Response vs. source document (SGI) | RAG pipelines, document Q&A |
| Response patterns without context (DGI) | Chat, general Q&A |
SGI (Semantic Grounding Index) measures whether the response actually used the source material or just rephrased the question. Score > 0.95 = grounded.
DGI (Directional Grounding Index) measures whether the response follows geometric patterns typical of grounded answers. Score > 0.30 = grounded.
Install
pip install groundlens-mcpOr with uv:
uv pip install groundlens-mcpMore clients
Claude Code (CLI):
claude mcp add groundlens -- uvx groundlens-mcpClaude Desktop, Windsurf, Cline, or any MCP client — add to its config:
{ "mcpServers": { "groundlens": { "command": "uvx", "args": ["groundlens-mcp"] } } }Configure your client
Claude Desktop
Add to your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"groundlens": {
"command": "groundlens-mcp"
}
}
}If you installed with uv and the command isn't on your PATH:
{
"mcpServers": {
"groundlens": {
"command": "uv",
"args": ["run", "groundlens-mcp"]
}
}
}Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"groundlens": {
"command": "groundlens-mcp"
}
}
}Example with Cursor:
Cursor self-verification loop — drop-in
.cursor/config + rule that makes Cursor verify every answer with Groundlens.
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"groundlens": {
"command": "groundlens-mcp"
}
}
}How to use
Once configured, ask your ai assistant:
"Check if this response is hallucinated"
"Is this answer grounded in the document I provided?"
"Run a hallucination check on this ChatGPT output"
The tools return JSON with a plain-language CHECK check, a numeric score, and the raw components. The wording comes from groundlens.check — the same source of truth used by the library and docs, so it reads identically everywhere.
Example output
{
"check": "Not supported by the document",
"message": "The answer stays closer to the question than to the source, so it may not come from the document. Check it before trusting it.",
"headline": "CHECK: Not supported by the document (Semantic Grounding Index - SGI=0.87)",
"level": "risk",
"method": "Semantic Grounding Index",
"score": 0.87,
"flagged": true,
"detail": "distance to source 0.49, distance to question 0.43"
}The check level is ok / review / risk (from the calibrated thresholds). For context-free DGI checks the check reads Looks grounded / Partly grounded / Not grounded, plus a note that no source was provided.
How it works
groundlens uses embedding geometry — not a second LLM — to detect hallucinations:
SGI computes
dist(response, question) / dist(response, context). If the response moved toward the context, it's grounded. If it stayed near the question, the context was likely ignored.DGI projects the question→response displacement onto the mean direction of verified grounded pairs. Positive alignment = grounded pattern.
Both methods run a single embedding call. No model inference for evaluation. Deterministic.
First-call latency
The first tool call downloads and loads the sentence-transformer model (~100MB). Subsequent calls are fast. The model is loaded lazily so your MCP client doesn't slow down on startup.
Running from source
git clone https://github.com/groundlens-dev/groundlens-mcp.git
cd groundlens-mcp
pip install -e .
groundlens-mcpOr:
python -m groundlens_mcpLinks
groundlens library —
pip install groundlens
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/groundlens-dev/groundlens-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server