Evidence-backed web research for AI agents with citations and confidence scores.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Research infrastructure for AI agents with Grounded Intelligence β real-time web search, evidence extraction, verification, and structured citations. Every claim is backed by a URL. Every answer has a confidence score.
Website Β· Playground Β· API Docs Β· Alternatives Β· Discord
Package names: npm:
lastsearchΒ· PyPI:lastsearchΒ· LangChain:langchain-lastsearchβ Previouslylastsearchandlastsearch. Old names still work and redirect automatically.
Every answer goes through a multi-step verification pipeline. No hallucination. Every claim is backed by a real source.
Confidence scores are evidence-based β not LLM self-assessed. After the LLM extracts claims and sources, a post-extraction verification engine checks every claim against the actual source page text:
.gov/.edu β major news β tech journalism β community β low-quality). Dynamic scoring that improves from real verification data.Claims include verified, verificationScore, consensusCount, and consensusLevel fields. Sources include verified and authority. Detected contradictions are returned at the top level. Agents can use these fields to make trust decisions programmatically.
Graceful fallback: When premium keys are not set, the system runs keyword-only verification. Semantic retrieval and reranking are transparent premium enhancements β no degradation, no errors.
Three depth levels control research thoroughness:
| Depth | Behavior | Use case |
|---|---|---|
fast (default) | Single search β extract β verify pass | Quick lookups, real-time agents |
thorough | Iterative confidence-gated loop (up to 3 passes), per-claim evidence retrieval, counter-query verification, multi-pass consistency checking | Important research, fact-checking |
deep | Premium multi-step agentic research: iterative think-search-extract-evaluate cycles (up to 4 total steps). Gap analysis identifies missing info, generates follow-up queries. Claims/sources merged across steps with final re-verification. Target confidence: 0.85. Requires LastSearch key + sign-in. Falls back to thorough when quota exhausted. | Complex research questions, comprehensive analysis |
Deep mode runs iterative think-search-extract-evaluate cycles: each step performs gap analysis to identify what's missing, generates targeted follow-up queries, and merges claims/sources across steps with a final re-verification pass. It targets a confidence threshold of 0.85 (DEEP_CONFIDENCE_THRESHOLD) and runs up to 3 follow-up steps (MAX_FOLLOW_UP_STEPS, 4 total including the initial pass). Uses semantic reranking, multi-provider search, and multi-pass consistency. Each deep query costs 3x quota (100 deep queries/day). When quota is exhausted, deep mode gracefully falls back to thorough. Without a LastSearch key, deep mode also falls back to thorough.
Deep mode responses include reasoningSteps showing the multi-step research process (step number, query, gap analysis, claim count, confidence per step).
Get real-time progress with per-token answer streaming. The streaming endpoint sends Server-Sent Events (SSE) as each pipeline step completes. Deep mode steps are grouped by research pass for clean progress display:
Events: trace (progress), sources (discovered early), token (streamed answer text), result (final answer), done.
All external API calls (search providers, LLM, page fetching) automatically retry on transient failures (429 rate limits, 5xx server errors) with exponential backoff and jitter. Auth errors (401/403) fail immediately β no wasted retries.
Persistent research sessions that accumulate knowledge across multiple queries. Later queries automatically recall prior verified claims, building deeper understanding over time.
Sessions require a LastSearch API key (
ls_xxx) for identity and ownership. Get a free key at lastsearch.ai/dashboard. For MCP, setLASTSEARCH_API_KEYenv var. For Python SDK, passapi_key="ls_xxx". For REST API, useAuthorization: Bearer ls_xxx.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/lastsearch)<a href="https://allmcps.com/mcp/lastsearch"><img src="https://allmcps.com/api/badge/lastsearch?style=directory" alt="LastSearch on AllMCPs" /></a>