knowledge-base-mcp
Exposes a knowledge base to LLM clients through tools, resources, and prompts.
README
knowledge-base-mcp
An MCP server exposing a knowledge base to LLM clients through tools, resources, and prompts.
Layout
knowledge_base_mcp/
├── __init__.py
├── __main__.py # `python -m knowledge_base_mcp`
├── context.py # AppContext + app_lifespan (constructs the store)
├── server.py # FastMCP instance, CLI entry point (main)
├── tools.py # @mcp.tool() definitions (add_document, search)
├── resources.py # @mcp.resource() definitions (get_document)
├── prompts.py # @mcp.prompt() definitions
└── store/ # pluggable persistence layer
├── __init__.py # create_store() factory
├── base.py # KnowledgeBaseStore Protocol
└── sqlite.py # SQLite reference implementation
tests/
├── conftest.py # shared anyio_backend fixture
├── unit/ # SqliteKnowledgeBaseStore, in isolation
├── integration/ # tools/resources via an in-memory MCP session
└── e2e/ # real subprocess over stdio (not in the default run)
See docs/specs/knowledge-base-store.md for the design and docs/adrs/ for why things are the way they are.
Setup
uv sync
Run
uv run knowledge-base-mcp # stdio transport (default)
uv run knowledge-base-mcp --transport streamable-http --port 8000
Or inspect it interactively with the MCP Inspector:
uv run mcp dev knowledge_base_mcp/server.py
Test
uv run pytest # unit + integration, gated at 90% coverage
uv run pytest tests/e2e --no-cov # e2e: spawns the real server subprocess over stdio
uv run pytest fails outright if coverage drops below 90% (--cov-fail-under=90 in pyproject.toml). tests/e2e is excluded from that default run (see testpaths) since it's slower and its coverage isn't collected in-process.
Lint / type-check
uv run ruff check .
uv run pyright
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.