LastSearch

io.github.LastSearch-HQ由 GitHub 帳號 LastSearch-HQ 發布v1.4.3更新於 Nov 7, 2026

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

概覽

AI 產生的概覽

LastSearch 為助理提供有證據支撐的網頁研究:附引用的答案、逐條論斷查核、信心分數與可持續累積的研究工作階段。

可以做什麼
  • 搜尋網頁並把頁面抓取為乾淨文字,再擷取帶來源與信心的結構化論斷
  • 執行完整研究流程,回傳附引用、信心分數、矛盾點與執行軌跡的答案,支援 fast、thorough、deep 三種深度
  • 對整份文件或網址逐條論斷做事實查核,並比較原始模型答案與有證據支撐的答案
  • 透過 clarity 引擎產生防幻覺提示詞或經查核的答案
  • 建立、提問、回想、匯出、公開分享與分支研究工作階段
  • 取得先前答案的簽章證據紀錄,並提交準確度回饋
適用情境
適合需要附引用與信心分數的即時網路事實、而非無來源模型輸出的情境,也適合查核報告、文章與市場研究。需要多步研究並在工作階段中累積先前結論時同樣適用。
執行需求
透過 npx(Node.js)以 stdio 在本機執行,或作為帶 bearer 權杖的本機 HTTP 服務執行。需在 LASTSEARCH_API_KEY 環境變數提供 LastSearch API 金鑰,所有工具都依賴它。需要連線至 LastSearch 託管的 API。
安裝前請注意
查詢內容、待查核的網址與文件以及 API 金鑰都會傳送到 LastSearch 託管的 API 並儲存,並以不含識別資訊的彙總方式用於改善查核。deep 模式消耗 3 倍配額且需登入;免費配額有限,超出後降級為較輕的查核。公開分享工作階段會讓所有人可見。輸出為 AI 生成的研究結果,不構成專業建議。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 LastSearch,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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.

來源:apps/mcp/README.md,提交 4d25e7c

工具

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.

輸入參數resultId必填

open

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

輸入參數url必填

extract

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

輸入參數url必填query

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.

輸入參數depthquery必填strictsearchProvider

compare

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

輸入參數query必填

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.

輸入參數urltextdepthtitlemaxClaims

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.

輸入參數modedepthintentprompt必填verifycontext

session_create

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

輸入參數name必填

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.

輸入參數depthquery必填session_id必填

session_recall

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

輸入參數limitquery必填session_id必填

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.

輸入參數session_id必填

session_knowledge

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

輸入參數limitsession_id必填

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.

輸入參數share_id必填

feedback

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

輸入參數rating必填result_id必填claim_index

版本歷史

5
  1. v1.4.3最新Nov 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

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分