mcp-arsr
ARSR MCP Server
Adaptive Retrieval-Augmented Self-Refinement — a closed-loop MCP server that lets LLMs iteratively verify and correct their own claims using uncertainty-guided retrieval.
What it does
Unlike one-shot RAG (retrieve → generate), ARSR runs a refinement loop:
Generate draft → Decompose claims → Score uncertainty
↑ ↓
Decide stop ← Revise with evidence ← Retrieve for low-confidence claimsThe key insight: retrieval is guided by uncertainty. Only claims the model is unsure about trigger evidence fetching, and the queries are adversarial — designed to disprove the claim, not just confirm it.
Related MCP server: Verity
Architecture
The server exposes 6 MCP tools. The outer LLM (Claude, GPT, etc.) orchestrates the loop by calling them in sequence:
# | Tool | Purpose |
1 |
| Generate initial candidate answer (returns |
2 |
| Split into atomic verifiable claims |
3 |
| Estimate confidence via semantic entropy |
4 |
| Web search for low-confidence claims |
5 |
| Rewrite draft with evidence |
6 |
| Decide: iterate or finalize |
Inner LLM: Tools 1-5 use Claude Haiku internally for intelligence (query generation, claim extraction, evidence evaluation). This keeps costs low while the outer model handles orchestration.
Refusal detection: arsr_draft_response returns a structured is_refusal flag (classified by the inner LLM) indicating whether the draft is a non-answer. When is_refusal is true, downstream tools (decompose, revise) pivot to extracting claims from the original query and building an answer from retrieved evidence instead of trying to refine a refusal.
Web Search: arsr_retrieve_evidence uses the Anthropic API's built-in web search tool — no external search API keys needed.
Setup
Prerequisites
Node.js 18+
An Anthropic API key
Install & Build
cd arsr-mcp-server
npm install
npm run buildEnvironment
export ANTHROPIC_API_KEY="sk-ant-..."Run
stdio mode (for Claude Desktop, Cursor, etc.):
npm startHTTP mode (for remote access):
TRANSPORT=http PORT=3001 npm startClaude Desktop Configuration
Add to your claude_desktop_config.json:
Npm:
{
"mcpServers": {
"arsr": {
"command": "npx",
"args": ["@jayarrowz/mcp-arsr"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"ARSR_MAX_ITERATIONS": "3",
"ARSR_ENTROPY_SAMPLES": "3",
"ARSR_RETRIEVAL_STRATEGY": "adversarial",
"ARSR_INNER_MODEL": "claude-haiku-4-5-20251001"
}
}
}
}Local build:
{
"mcpServers": {
"arsr": {
"command": "node",
"args": ["/path/to/arsr-mcp-server/dist/src/index.js"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"ARSR_MAX_ITERATIONS": "3",
"ARSR_ENTROPY_SAMPLES": "3",
"ARSR_RETRIEVAL_STRATEGY": "adversarial",
"ARSR_INNER_MODEL": "claude-haiku-4-5-20251001"
}
}
}
}How the outer LLM uses it
The orchestrating LLM calls the tools in sequence:
1. draft = arsr_draft_response({ query: "When was Tesla founded?" })
// draft.is_refusal indicates if the inner LLM refused to answer
2. claims = arsr_decompose_claims({ draft: draft.draft, original_query: "When was Tesla founded?", is_refusal: draft.is_refusal })
3. scored = arsr_score_uncertainty({ claims: claims.claims })
4. low = scored.scored.filter(c => c.confidence < 0.85)
5. evidence = arsr_retrieve_evidence({ claims_to_check: low })
6. revised = arsr_revise_response({ draft: draft.draft, evidence: evidence.evidence, scored: scored.scored, original_query: "When was Tesla founded?", is_refusal: draft.is_refusal })
7. decision = arsr_should_continue({ iteration: 1, scored: revised_scores })
→ if "continue": go to step 2 with revised text
→ if "stop": return revised.revised to userConfiguration
All settings can be overridden via environment variables, falling back to defaults if unset:
Setting | Env var | Default | Description |
|
|
| Budget limit for refinement loops |
|
|
| Claims above this skip retrieval |
|
|
| Rephrasings for semantic entropy |
|
|
|
|
|
|
| Model for internal intelligence |
Cost estimate
Per refinement loop iteration (assuming ~5 claims, 3 low-confidence):
Inner LLM calls: ~6-10 Haiku calls ≈ $0.002-0.005
Web searches: 6-9 queries ≈ included in API
Typical total for 2 iterations: < $0.02
Images
Before:
After:
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceGive brains to your small models. MCP server that enforces step-by-step Chain-of-Thought — turns 4B models into methodical reasoners.Last updated130MIT
- Alicense-qualityBmaintenanceA multi-agent verification MCP server that uses cross-family LLM critics, NLI, and consistency checks to minimize hallucinations and false claims in LLM outputs.Last updated9MIT
- Flicense-qualityBmaintenanceMCP server for a modular RAG system that enables natural language question answering over enterprise documents with intent-aware routing, adaptive retrieval, and citation-backed responses.Last updated
- Flicense-qualityBmaintenanceA self-hosted MCP server that provides tools for structured reasoning, confidence calibration, and detecting recurring gaps in AI outputs, aiming to reduce workload by improving verification and attention allocation.Last updated
Related MCP Connectors
Read-only MCP over an agentic SLR workspace with per-claim citation verification
Read-only MCP over an agentic SLR workspace with per-claim citation verification
HiveCompute MCP Server — decentralized inference router for AI agents
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/JayArrowz/mcp-arsr'
If you have feedback or need assistance with the MCP directory API, please join our Discord server