LastSearch

io.github.LastSearch-HQPublished by GitHub account LastSearch-HQv1.4.3Updated Nov 7, 2026

Evidence-backed web research for AI agents with citations and confidence scores.

Overview

AI-generated overview

LastSearch gives an assistant evidence-backed web research: cited answers, per-claim verification, confidence scores and persistent research sessions.

What you can do
  • Search the web and fetch pages as clean text, then extract structured claims with sources and confidence
  • Run a full research pipeline that returns a cited answer with confidence, contradictions and an execution trace, in fast, thorough or deep modes
  • Fact-check a document or URL claim by claim, and compare a raw model answer against an evidence-backed one
  • Generate anti-hallucination prompts or verified answers through the clarity engine
  • Create, query, recall, export, share and fork persistent research sessions
  • Retrieve a signed evidence record for a previous answer and submit accuracy feedback
When to use it
Useful when an assistant needs current web facts with citations and confidence rather than unsourced model output, or when you want to fact-check reports, articles and market research. Also fits multi-step research that should build on earlier findings within a session.
Requirements
Runs locally via npx (Node.js) over stdio, or as a local HTTP server with a bearer token. Requires a LastSearch API key in the LASTSEARCH_API_KEY environment variable; all tools need it. Network access to the hosted LastSearch API is required.
Before you install
Queries, URLs and documents you ask it to verify, plus the API key, are sent to the hosted LastSearch API and stored there, with aggregate non-identified use to improve verification. Deep mode costs 3x quota and needs sign-in; free quota is limited and falls back to lighter verification. Sharing a session publishes it publicly. Output is AI-generated research, not professional advice.

Installation

In SourceWeft

  1. Open LastSearch in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

lastsearch

Reliable research infrastructure for AI agents. The research layer your agents are missing.

MCP server with real-time web search, evidence extraction, and structured citations. Drop into Claude Desktop, Cursor, Windsurf, LangChain, CrewAI, or any agent pipeline.

What it does

Instead of letting your AI hallucinate, lastsearch gives it real-time access to the web with structured, cited answers:

Your question → Web search → Neural rerank → Fetch pages → Extract claims → Verify → Cited answer (streamed)

Every answer includes:

  • Claims with source URLs, verification status, and consensus level
  • Evidence-based confidence score (0-1), not LLM self-assessed, auto-calibrated from feedback
  • Source quotes verified against actual page text
  • Atomic claim decomposition — compound facts split and verified independently
  • Execution trace with timing
  • 3 depth modes — "fast" (default), "thorough" (auto-retry with rephrased queries), "deep" (premium multi-step agentic research: iterative think-search-extract-evaluate cycles with gap analysis, up to 4 steps, targets 0.85 confidence — requires LastSearch key + sign-in, 3x quota cost, falls back to thorough when exhausted)

Premium Features (with LASTSEARCH_API_KEY)

Users with a LastSearch API key (ls_xxx) get enhanced verification:

  • Semantic re-ranking — search results re-scored by semantic query-document relevance
  • Semantic reranking — evidence matched by meaning, not just keywords
  • Multi-provider search — parallel search across multiple sources for broader coverage
  • Multi-pass consistency — claims cross-checked across independent extraction passes
  • Deep reasoning mode — multi-step agentic research with iterative think-search-extract-evaluate cycles, gap analysis, and cross-step claim merging (up to 4 steps, 3x quota cost, 100 deep queries/day)
  • Research Sessions — persistent memory across queries

Free LastSearch key users get a generous daily quota (100 premium queries/day, or ~33 deep queries/day at 3x cost each). When exceeded, queries gracefully fall back to keyword verification (deep falls back to thorough). Quota resets every 24 hours.

Sign up at lastsearch.ai for a free API key — 100 premium queries/day with full verification pipeline.

Quick Start

bash
npx lastsearch setup

This auto-configures Claude Desktop. You'll need a LastSearch API key — get one free at lastsearch.ai/dashboard.

Manual Setup

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "lastsearch": {      "command": "npx",      "args": ["-y", "[email protected]"],      "env": {        "LASTSEARCH_API_KEY": "ls_xxx"      }    }  }}

Cursor / Windsurf

Add to your MCP settings:

json
{  "lastsearch": {    "command": "npx",    "args": ["-y", "[email protected]"],    "env": {      "LASTSEARCH_API_KEY": "ls_xxx"    }  }}

HTTP Transport

Run as an HTTP server for browser-based clients, Smithery, or any HTTP-capable agent:

bash
# Start with HTTP transport (listens on 127.0.0.1 only)npx lastsearch --http
# Or set the port via environment variableMCP_HTTP_PORT=3100 npx lastsearch --http

Every request needs a bearer token. By default a random token is generated at each launch and printed once to stderr; set LASTSEARCH_HTTP_TOKEN (16+ characters) to use your own:

bash
export LASTSEARCH_HTTP_TOKEN="$(openssl rand -base64 32)"npx lastsearch --http
curl -H "Authorization: Bearer $LASTSEARCH_HTTP_TOKEN" http://127.0.0.1:3100/health

The server exposes:

  • POST /mcp — MCP Streamable HTTP endpoint
  • GET /health — Health check

By default the server only accepts requests addressed to 127.0.0.1, localhost or ::1, and refuses requests from browser pages on other origins. To listen on another interface, pass --host <address> explicitly (a warning is printed); the token is still required. Request bodies are limited to 1 MB.

Docker

Inside a container the server must listen on 0.0.0.0, so pass --host 0.0.0.0 explicitly, set a token, and publish the port on the host's loopback interface only:

bash
docker build -t lastsearch ./apps/mcpdocker run -p 127.0.0.1:3100:3100 \  -e LASTSEARCH_API_KEY=ls_xxx \  -e LASTSEARCH_HTTP_TOKEN="$(openssl rand -base64 32)" \  lastsearch --host 0.0.0.0

Clients send Authorization: Bearer <LASTSEARCH_HTTP_TOKEN> with every request.

MCP Tools

ToolDescription
searchSearch the web via multi-provider search
openFetch and parse a page into clean text
extractExtract structured knowledge from a page
answerFull pipeline: search + extract + cite. depth: "fast", "thorough", or "deep"
compareCompare raw LLM vs evidence-backed answer
clarityClarity — anti-hallucination answer engine. Three modes: mode: "prompt" (enhanced prompts only), mode: "answer" (LLM answer, default), mode: "verified" (LLM + web fusion)
session_createCreate a research session (persistent memory across queries)
session_askResearch within a session (recalls prior knowledge, stores new claims)
session_recallQuery session knowledge without new web searches
session_shareShare a session publicly (returns share URL)
session_knowledgeExport all claims from a session
session_forkFork a shared session to continue the research
feedbackSubmit accuracy feedback on a result

Note: All tools require a LastSearch API key (ls_xxx). Get a free one at lastsearch.ai/dashboard.

Examples

Quick lookup:

"Use answer to explain what causes aurora borealis"

Higher accuracy:

"Use answer with depth thorough to research quantum computing"

Deep research (multi-step, requires LastSearch key):

"Use answer with depth deep to compare CRISPR approaches for sickle cell disease"

Deep mode runs iterative think-search-extract-evaluate cycles: gap analysis identifies missing info, follow-up queries fill the gaps, and claims/sources are merged across steps with final re-verification. Targets 0.85 confidence across up to 4 steps. Falls back to thorough without a LastSearch key or when quota is exhausted.

Contradiction detection:

"Use answer with depth thorough to check if coffee is good for health, and show me any contradictions"

Research session:

"Create a session called quantum-research, then ask about quantum entanglement, then ask how entanglement is used in computing"

Enterprise search:

"Use answer to search our Elasticsearch at https://es.company.com/kb/_search for our refund policy"

Response structure

json
{  "answer": "Aurora borealis occurs when charged particles from the Sun...",  "confidence": 0.92,  "claims": [    {      "claim": "Aurora borealis is caused by solar wind particles...",      "sources": ["https://en.wikipedia.org/wiki/Aurora"],      "verified": true,      "verificationScore": 0.82,      "consensusLevel": "strong"    }  ],  "sources": [    {      "url": "https://en.wikipedia.org/wiki/Aurora",      "title": "Aurora - Wikipedia",      "domain": "en.wikipedia.org",      "quote": "An aurora is a natural light display...",      "verified": true,      "authority": 0.70    }  ],  "contradictions": [],  "reasoningSteps": []}

Why lastsearch?

FeatureRaw LLMlastsearch
SourcesNoneReal URLs with quotes
CitationsHallucinatedVerified from pages
ConfidenceUnknownEvidence-based score
DepthSingle pass3 modes: fast, thorough, deep reasoning
FreshnessTraining dataReal-time web
ClaimsMixed in textStructured + linked

Reliability

All API calls include automatic retry with exponential backoff on transient failures (429 rate limits, 5xx server errors). Auth errors fail immediately — no wasted retries.

Tech Stack

  • Search: Multi-provider (parallel search across sources)
  • Parsing: @mozilla/readability + linkedom
  • AI: OpenRouter (100+ models)
  • Verification: Hybrid keyword and semantic verification
  • Protocol: Model Context Protocol (MCP)

Agent Skills

Pre-built skills that teach coding agents when to use LastSearch tools:

bash
npx skills add lastsearch-hq/lastsearch-skills

Skills work with Claude Code, Codex CLI, Gemini CLI, Cursor, and more. View skills →

Community

License

Apache 2.0

Data, privacy and terms

This package sends your requests (queries, URLs and documents you ask it to verify) and your LastSearch API key to the hosted LastSearch API at lastsearch.ai. Queries and results are stored there and used, in aggregate and without identifiers, to improve verification, as described in the Privacy Policy. The package itself collects no telemetry. Use of the hosted API is subject to the Terms.

LastSearch is a free, non-commercial passion project run by an individual developer. Answers, citations and confidence scores are AI-generated research, not professional advice; verify anything important against primary sources.

Source: apps/mcp/README.md at commit 4d25e7c

Tools

15

evidence

Fetch the signed evidence record for a previous answer (pass the result's shareId). Returns a typed record (retrieval → verification → decision) with per-source content hashes, the exact canonical bytes that were signed, their SHA-256, and an Ed25519 signature verifiable against GET /browse/evidence/public-key. Attests what LastSearch retrieved, verified, and returned — not what your agent did with it; not a compliance guarantee.

ParametersresultIdrequired

open

Fetch and parse a web page into clean text using Readability. Strips ads, nav, and boilerplate.

Parametersurlrequired

extract

Extract structured knowledge (claims + sources + confidence) from a single web page using AI.

Parametersurlrequiredquery

answer

Full deep research pipeline: search the web, fetch pages, extract claims, build evidence graph, and generate a structured answer with citations and confidence score. Use depth='thorough' for auto-retry with rephrased queries when confidence is low. Use depth='deep' for multi-step agentic research that identifies knowledge gaps and runs follow-up searches. On thorough/deep, every cited URL is probed for liveness: each source carries a urlHealth field (live | stale | dead | unchecked) and the result includes a citationHealth summary, so you can spot broken or likely fabricated links (checks fail open to 'unchecked'). Every fetched page is also scanned for hidden / non-rendered content (where most real-world prompt injections live) before extraction: hidden content is stripped, instruction-shaped text is counted, and each source carries an integrity signal plus a result-level contentRisk summary — a signal for your policy layer, not a guarantee. Instruction-directed spans are redacted from page text before extraction; pass strict=true to drop high-risk sources entirely. Every stored result has a signed evidence record — call the evidence tool with the result's shareId. Enterprise: use searchProvider to search internal data instead of the public web. DISCLAIMER: Results are AI-generated for informational purposes only — not financial, medical, or legal advice. Confidence scores are algorithmic estimates, not accuracy guarantees. Always verify critical information from primary sources.

ParametersdepthqueryrequiredstrictsearchProvider

compare

Compare a raw LLM answer (no sources) vs an evidence-backed answer. Shows the difference between hallucination-prone and grounded responses.

Parametersqueryrequired

verify_document

Fact-check an entire document (AI-generated report, competitive analysis, market research, news article). Pass either raw text OR a URL — we'll extract every atomic claim and verify each against live web sources. Returns per-claim verification status with sources, NLI scores, and an overall A-F grade. Use for auditing the accuracy of long-form content from other AI agents.

ParametersurltextdepthtitlemaxClaims

clarity

Clarity — anti-hallucination answer engine. Three modes: (1) mode='prompt': Returns only enhanced system + user prompts with anti-hallucination techniques. No LLM call, no internet. Use this when you want YOUR OWN LLM (e.g. Claude) to answer using the enhanced prompts. (2) mode='answer' (default): Rewrites prompt, calls LLM with grounding instructions, returns answer with extracted claims. Fast, no internet. (3) mode='verified': Does #2, then runs full browse pipeline (search + extract + verify), fuses best of both — source-backed claims, evidence-based confidence. Use for maximum accuracy.

Parametersmodedepthintentpromptrequiredverifycontext

session_create

Create a new research session. Sessions persist knowledge across multiple queries — each query builds on prior research.

Parametersnamerequired

session_ask

Research a question within a session. Recalls prior knowledge, runs the research pipeline, and stores new claims. Later queries in the same session benefit from accumulated knowledge.

Parametersdepthqueryrequiredsession_idrequired

session_recall

Query accumulated knowledge from a session without making new web searches. Returns previously verified claims relevant to the query.

Parameterslimitqueryrequiredsession_idrequired

session_share

Share a research session publicly. Returns a shareable URL that anyone can view — great for sharing research findings with teammates, in reports, or on social media.

Parameterssession_idrequired

session_knowledge

Export all knowledge from a research session. Returns all verified claims, sources, and confidence scores accumulated across queries.

Parameterslimitsession_idrequired

session_fork

Fork a shared research session to continue building on someone else's research. Creates a copy of all knowledge in your own session.

Parametersshare_idrequired

feedback

Submit feedback on a search result to improve future accuracy. Helps the self-learning engine tune verification thresholds.

Parametersratingrequiredresult_idrequiredclaim_index

Version history

5
  1. v1.4.3LatestNov 5, 2026
  2. v1.4.1Oct 29, 2026
  3. v1.4.0Oct 25, 2026
  4. v1.3.0Oct 11, 2026
  5. v1.1.0Sep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts