MCP Knowledge Base Server
Enables semantic search over knowledge-base articles and listing of sample support tickets using MCP tools.
README
MCP Knowledge Base Server
This folder contains the MCP server and unstructured-text ingestion pipeline for the support-ticket triage demo.
The server exposes knowledge-base articles and sample tickets through MCP tools. The search tool is backed by a local SQLite vector index built from Markdown files in data/kb/.
Files
mcp/
├── main.py # FastMCP server
├── pipeline.py # Ingest, chunk, embed, and store KB documents
├── vector_store.py # SQLite vector search helpers
├── models.py # Pydantic models returned by tools
└── data/
├── kb/ # Source knowledge-base articles
├── tickets/ # Sample support tickets
└── index.db # Generated SQLite index
Tools
The MCP server currently exposes:
search_kb(query: str) -> list[Chunk]Semantic search over indexed KB chunks.get_article(name: str) -> strFetch a full KB article by filename.list_tickets(status: str) -> list[Ticket]List sample tickets by status.
Setup
Install dependencies:
uv sync
Set the Gemini API key used for embeddings:
export GEMINI_API_KEY="..."
Build The Index
Run the ingestion pipeline:
uv run python pipeline.py
The pipeline:
- Reads Markdown files from
data/kb/. - Normalizes and chunks each document.
- Creates embeddings with
gemini-embedding-001. - Stores chunks and embeddings in
data/index.db. - Uses SHA-256 hashes to skip unchanged documents on reruns.
Run The Server
Start the MCP server over stdio:
uv run python main.py
Most clients, including the ADK agent in ../agent, launch this command as a subprocess instead of running it manually.
Client Config Snippet
Example stdio client configuration:
{
"mcpServers": {
"kb-server": {
"command": "/Users/vianel/Workspace/samples/mcp/.venv/bin/python",
"args": ["/Users/vianel/Workspace/samples/mcp/main.py"],
"env": {
"GEMINI_API_KEY": "${GEMINI_API_KEY}"
}
}
}
}
Smoke Tests
Rebuild the index and check that reruns skip unchanged files:
uv run python pipeline.py
uv run python pipeline.py
Then run the agent-side discovery script from ../agent:
cd ../agent
uv run python discovery.py
You should see the MCP tools discovered by the client.
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.