Skip to main content
Glama
knowledgelib-mcp

knowledgelib-mcp

by peterbeck111

knowledgelib.io

AI 知识库 — 为 AI 智能体提供结构化、带引用的知识单元。预验证的答案可节省 Token、减少幻觉并引用每一个来源。

这是什么?

涵盖 16 个领域(消费电子、软件、商业策略、ERP 集成、合规性、能源、金融等)的 1,564 个知识单元。每个单元通过以下方式回答一个规范性问题:

  • 置信度分数 (0.0-1.0),基于已发布的评估方法

  • 内联来源引用,来自 5-8 个权威来源

  • 时效性追踪,包含验证日期和时间有效性

  • 质量状态 — 已验证 (verified)、待审核 (needs_review) 或不可靠 (unreliable)

  • 知识图谱 — 带有类型化边缘的相关单元

一个 API 调用即可替代 5 次网络搜索和 8,000 个 Token 的解析工作。

Related MCP server: Scientific Tools MCP Server

快速入门

MCP 服务器 (Claude, Cursor, Windsurf)

npx knowledgelib-mcp

或者添加到 claude_desktop_config.json:

{
  "mcpServers": {
    "knowledgelib": {
      "command": "npx",
      "args": ["knowledgelib-mcp"]
    }
  }
}

通过 HTTP 使用 MCP (无需安装)

POST https://knowledgelib.io/mcp

支持流式 HTTP 传输,JSON-RPC 2.0,MCP 规范 2025-03-26。

REST API

# Search
curl https://knowledgelib.io/api/v1/query?q=best+wireless+earbuds+under+150

# Batch search (up to 10 queries)
curl -X POST https://knowledgelib.io/api/v1/batch \
  -H "Content-Type: application/json" \
  -d '{"queries":[{"q":"earbuds"},{"q":"headphones"}]}'

# Get full unit
curl https://knowledgelib.io/api/v1/units/consumer-electronics/audio/wireless-earbuds-under-150/2026.md

# Health check
curl https://knowledgelib.io/api/v1/health

LangChain (Python)

pip install langchain-knowledgelib
from langchain_knowledgelib import KnowledgelibRetriever
retriever = KnowledgelibRetriever()
docs = retriever.invoke("best wireless earbuds")

n8n

npm install n8n-nodes-knowledgelib

MCP 工具

工具

描述

只读

query_knowledge

使用过滤器搜索所有知识单元

是

batch_query

一次调用搜索多个主题(最多 10 个)

是

get_unit

按 ID 获取完整的 Markdown 内容

是

list_domains

列出所有领域及其单元数量

是

suggest_question

提交主题请求以创建新单元

否

report_issue

标记不正确、过时或损坏的内容

否

所有只读工具均根据 MCP 规范 2025-03-26 标记为 readOnlyHint: true 和 idempotentHint: true,从而支持智能体进行并行执行。

API 特性

  • 结构化错误代码,包含可重试标志和 retry_after_ms

  • ETag / If-None-Match 缓存 (304 Not Modified)

  • 关联 ID (所有响应中包含 X-Request-Id 标头)

  • 质量状态 (verified / needs_review / unreliable) 包含在所有结果中

  • 相关单元,用于知识图谱遍历

  • 内容预览 (150 字符摘要,无需获取完整单元)

  • Token 预算 (结果的总 Token 数)

  • 写入端点速率限制 (每小时 10 条建议,每小时 20 条反馈)

  • Zod 验证,包含各字段的错误消息

实体类型

类型

数量

描述

product_comparison

418

包含决策逻辑和购买链接的最佳产品汇总

concept

336

智能体经常出错的术语定义

software_reference

239

代码示例、反模式、决策树

execution_recipe

202

分步实施计划

erp_integration

166

API 功能、速率限制、数据映射

agent_prompt

55

流水线子智能体的系统提示词

assessment

54

结构化评分框架

decision_framework

35

带有权衡分析的决策树

benchmark

28

按细分市场划分的行业基准

rule

28

带有证据的可操作指令

发现

链接

许可证

CC BY-SA 4.0

Available Tools

6 tools
batch_queryA
Read-onlyIdempotent

Search multiple topics in a single call. More efficient than calling query_knowledge multiple times — shares a single catalog parse. Max 10 queries per batch.

Inputs: queries (required).

get_unitA
Read-onlyIdempotent

Retrieve a specific knowledge unit by ID. Returns the full raw markdown with YAML frontmatter, inline source citations, product comparisons, and use-case recommendations.

Inputs: unit_id (required).

list_domainsA
Read-onlyIdempotent

List all available knowledge domains with unit counts. Use this to discover what topics are covered before querying.

Inputs: no named parameters.

query_knowledgeA
Read-onlyIdempotent

STEP 1: Search across all knowledgelib.io knowledge units. Returns matching units ranked by relevance with metadata (confidence scores, source counts, token estimates). If no results are found, use suggest_question to request the topic.

Inputs: query (required), domain, region, jurisdiction, +2 more.

report_issueA

Flag incorrect, outdated, or broken content on a knowledge unit. Use this when you notice factual errors, dead links, outdated information, or missing details in a knowledge unit. Reports are reviewed and used to prioritize content updates.

Inputs: card_id (required), type (required), description (required), severity, +1 more.

suggest_questionA
Idempotent

STEP 3: Submit a question or topic request to knowledgelib.io. ALWAYS call this when query_knowledge returned no results, or when a user asks about a topic that should be covered. Popular suggestions are prioritized for new knowledge unit creation. The next agent that asks the same question will get an answer.

Inputs: question (required), context, domain.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 6 tools

    Disambiguation4/5

    Tools are mostly distinct with clear purposes. The only potential overlap is between batch_query and query_knowledge (both perform searches), but descriptions clarify that batch_query is for efficiency when searching multiple topics, while query_knowledge is the standard single search entry point. Other tools like report_issue (quality flags) and suggest_question (new content requests) have clearly separated concerns.

    Naming Consistency5/5

    All six tools follow a consistent verb_noun pattern using snake_case: batch_query, get_unit, list_domains, query_knowledge, report_issue, suggest_question. Action verbs (batch, get, list, query, report, suggest) are used predictably with clear target nouns.

    Tool Count5/5

    Six tools is an appropriate, well-scoped count for a knowledge retrieval server. The set covers discovery (list_domains), retrieval (query_knowledge, batch_query, get_unit), and feedback loops (report_issue, suggest_question) without bloat or redundancy.

    Completeness4/5

    The surface covers the essential knowledge retrieval lifecycle: domain discovery, flexible search (single and batch), specific unit retrieval, and feedback mechanisms for both corrections and new content requests. Minor gaps include no domain-specific browsing tool and the odd 'STEP 1/STEP 3' labeling suggesting a missing intermediate step, but core workflows are supported.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      High-value scientific tools for AI agents — literature search (PubMed, arXiv, Semantic Scholar), chemical compound lookup (PubChem, ChEMBL), patent prior art search (USPTO, EPO), GPU spot prices across 4 providers, and real-time earth science data (USGS, NASA, OpenAQ). Per-call billing via API key. Keys issued instantly at https://mcp-site.com/keys/request
      6
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to fact-check claims, verify citations, and check source freshness using Wikipedia, Wikidata, Crossref, and Wayback Machine.
      1
      MIT