knowledgelib-mcp
Provides a KnowledgelibRetriever component for integrating the Knowledge Library into LangChain applications, enabling semantic search and retrieval of verified, cited knowledge units.
Provides nodes for integrating Knowledge Library queries into n8n automation workflows, enabling automated retrieval of structured knowledge units.
knowledgelib-mcp
MCP server for knowledgelib.io — gives AI agents access to 1,564 structured, cited knowledge units across 16 domains. Pre-verified answers with inline source citations, confidence scores, quality status, and freshness tracking.
Quick start
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"knowledgelib": {
"command": "npx",
"args": ["knowledgelib-mcp"]
}
}
}MCP over HTTP (no install needed)
POST https://knowledgelib.io/mcpStreamable HTTP transport, JSON-RPC 2.0, MCP spec 2025-03-26. Same 6 tools, works with any HTTP-capable MCP client.
Other MCP clients (Cursor, Windsurf, etc.)
npx knowledgelib-mcpThe server uses stdio transport and works with any MCP-compatible client.
Tools
query_knowledge
Search across all knowledge units by relevance. Returns confidence scores, token estimates, quality status, content previews, and related units.
Parameter | Type | Required | Description |
| string | yes | Search query (e.g., "best wireless earbuds under 150") |
| string | no | Filter by domain (e.g., "consumer_electronics", "software") |
| string | no | Filter by region (e.g., "US", "EU", "global") |
| string | no | Filter by jurisdiction (e.g., "US", "EU", "global") |
| string | no | Filter by type (e.g., "product_comparison", "concept", "agent_prompt") |
| number | no | Max results, 1-20 (default: 3) |
batch_query
Search multiple topics in a single call. Shares a single catalog parse — more efficient than calling query_knowledge multiple times.
Parameter | Type | Required | Description |
| array | yes | Array of query objects (1-10), each with |
get_unit
Retrieve a specific knowledge unit as raw markdown with YAML frontmatter. Prepends quality warning if the unit has open issues.
Parameter | Type | Required | Description |
| string | yes | Unit ID (e.g., "consumer-electronics/audio/wireless-earbuds-under-150/2026") |
list_domains
List all available knowledge domains with unit counts. No parameters.
suggest_question
Submit a question or topic request. Popular suggestions are prioritized for new unit creation.
Parameter | Type | Required | Description |
| string | yes | The question to suggest (10-500 chars) |
| string | no | Why this question matters |
| string | no | Suggested domain |
report_issue
Flag incorrect, outdated, or broken content on a knowledge unit.
Parameter | Type | Required | Description |
| string | yes | Knowledge unit ID |
| string | yes | outdated, incorrect, broken_link, missing_info, other |
| string | yes | Describe the issue (10-2000 chars) |
| string | no | low, medium, high, critical (default: medium) |
| string | no | Which section has the issue |
Tool Annotations
All tools include MCP spec 2025-03-26 annotations:
Tool | readOnlyHint | idempotentHint | destructiveHint |
query_knowledge | true | true | — |
batch_query | true | true | — |
get_unit | true | true | — |
list_domains | true | true | — |
suggest_question | false | true | false |
report_issue | false | false | false |
Read-only tools can be called in parallel by agents.
Environment variables
Variable | Default | Description |
|
| API base URL |
| (none) | API key (optional for free tier) |
What you get
Each knowledge unit includes:
Structured metadata — YAML frontmatter with confidence, sources, temporal validity, jurisdiction
Quality status — verified, needs_review, or unreliable (based on open issues and confidence)
Content previews — 150-char summaries without fetching full content
Related units — knowledge graph edges (related_to, depends_on, alternative_to, often_confused_with)
Inline citations from 5-8 authoritative sources
Token estimates for context budget planning
Batch queries — search up to 10 topics in one call
Why use this instead of web search?
Without knowledgelib | With knowledgelib | |
Token cost | 3,000-8,000 tokens | ~600-1,800 tokens |
Sources cited | Usually none | 100% — every claim cited |
Confidence | Unknown | Scored 0.0-1.0 |
Compute cost | $0.50-$5.00/question | $0.02/query |
Freshness | Unknown | Verified date + schedule |
Quality warnings | None | verified/needs_review/unreliable |
REST API
The MCP server wraps the knowledgelib.io REST API. You can also use the API directly:
GET https://knowledgelib.io/api/v1/query?q=best+earbuds&limit=3
POST https://knowledgelib.io/api/v1/batch
GET https://knowledgelib.io/api/v1/units/{id}.md
GET https://knowledgelib.io/api/v1/health
POST https://knowledgelib.io/api/v1/suggest
POST https://knowledgelib.io/api/v1/feedbackFull API docs: knowledgelib.io/api OpenAPI spec: /api/v1/openapi.json
License
CC BY-SA 4.0
Latest Blog Posts
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/peterbeck111/knowledgelib-io'
If you have feedback or need assistance with the MCP directory API, please join our Discord server