Knowledge Base MCP Server
Provides semantic search over a self-building personal technical knowledge base that automatically collects and distills content from GitHub Trending, AI news, and arXiv.
README
π Other languages: δΈζ Β· ζ₯ζ¬θͺ
Knowledge Base β Self-Building MCP Server
A personal technical knowledge base that builds itself: a GitHub Actions pipeline collects from GitHub Trending, AI news RSS (incl. Anthropic via HTML scraping), and arXiv daily, distills the content into structured wiki pages with an LLM, and an MCP server (deployable via Docker / Portainer) serves semantic search over it.
Inspired by mufans/knowledge-base and the Karpathy LLM Wiki method.
How it works
A1 host (single container: knowledge-mcp) β fully local, no GitHub in daily loop
ββ collect thread (UTC 16:00): scripts/collect.py β /data/kb-self/raw/inbox/
ββ distill thread (UTC 16:45): scripts/distill.py β /data/kb-self/wiki/
β (LLM key lives ONLY in the container env, never touches GitHub)
ββ serves /mcp (Streamable HTTP, optional Bearer auth) over the local wiki
Security note: collection and distillation both run entirely on your A1 machine. GitHub only hosts the source code and builds the Docker image β it never sees collected data or the LLM API key.
Repository layout
.github/workflows/
build.yml # build arm64 image β ghcr.io/zhengr/knowledge-mcp
knowledge.yml # daily collect only (distill runs locally on A1)
Dockerfile
docker-compose.yml
scripts/
collect.py # free collectors (GitHub + arXiv)
distill.py # LLM β wiki pages (OpenAI-compatible API)
update_wiki.py # standalone updater (used inside the container)
server.py # MCP server (search_kb / get_entity / list_recent)
pyproject.toml
raw/inbox/ # collected raw content (auto-generated)
wiki/ # distilled knowledge (auto-generated)
Environment variables
| Variable | Default | Description |
|---|---|---|
KNOWLEDGE_BASE_PATH |
/kb |
Knowledge base root (contains wiki/) |
KB_TRANSPORT |
http |
http / sse / stdio |
KB_HOST |
0.0.0.0 |
Bind address |
KB_PORT |
8000 |
Listen port |
MCP_AUTH_TOKEN |
(empty) | If set, requires Authorization: Bearer <token> |
KB_UPDATE_URL |
repo tarball | Override the auto-update source URL |
Deploy (single container)
docker run -d --name knowledge-mcp -p 8000:8000 \
-e KNOWLEDGE_BASE_PATH=/data/kb-self \
-e MCP_AUTH_TOKEN=your-secret-token \
-v /opt:/data:rw \
ghcr.io/zhengr/knowledge-mcp:latest
The container both serves the MCP endpoint and auto-updates the wiki
in-place (writes to the mounted /data/kb-self).
Connect a client (Claude Code / Cursor)
{
"mcpServers": {
"knowledge": {
"url": "http://<host>:8000/mcp",
"headers": { "Authorization": "Bearer your-secret-token" }
}
}
}
Configure the LLM (for distillation)
Set these as repository secrets (Settings β Secrets β Actions):
| Secret | Example |
|---|---|
LLM_API_BASE |
https://api.openai.com/v1 |
LLM_API_KEY |
sk-... |
LLM_MODEL |
gpt-4o-mini |
Tools
search_kb(query, category?, limit?)β full-text search over the wikiget_entity(name)β fetch one wiki pagelist_recent(limit?, days?, min_score?)β recently updated pages
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.