Build a personal knowledge base with seekdb MCP and AI chat
seekdb MCP server implements the MCP protocol, which lets you operate a seekdb vector database directly from AI coding tools, such as Cursor, Windsurf, and Cline, through natural-language chat. In this tutorial, you will use seekdb embedded mode to build a lightweight personal knowledge base.
Your knowledge base will support:
- Saving notes in natural language
- Finding relevant notes with semantic search
- Using hybrid search for more precise results
- Asking AI questions over your notes
For more information about seekdb MCP server, see seekdb MCP server.
Scenario
You are a technical professional who keeps learning notes and work write-ups. You want AI to help manage those notes, and you want to find what you need quickly using natural-language queries.
Prerequisites
- This tutorial uses embedded mode. In embedded mode, you do not need to install seekdb separately. When you start seekdb MCP server, it automatically initializes a local embedded database.
- Embedded-mode seekdb currently supports Linux only (glibc >= 2.28, x86_64 / aarch64). Make sure your system meets the requirements.
- You have installed Cursor or another MCP-compatible tool (for example, Windsurf or Qwen Code).
- You have Python 3.11 or later installed. Download it from the official Python site.
Step 1: Install uv
uv is a Python package manager. The uvx command can run Python tools directly.
# Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or install via pip
pip install uv
Step 2: Configure your AI coding tool
The steps below use Cursor as an example. Other MCP-compatible tools (such as Windsurf, Cline, Continue, and Trae) are configured similarly.
Click Add to Cursor to install seekdb MCP Server directly in Cursor.
Alternatively, you can configure it manually:
-
Open Cursor Settings (click the gear icon in the upper right).
-
Select Tools & MCP.
-
Click Add Custom MCP.
-
Edit the
mcp.jsonconfiguration file:{
"mcpServers": {
"seekdb": {
"command": "uvx",
"args": ["seekdb-mcp-server"]
}
}
}If you run into network issues, you can use the Alibaba Cloud mirror:
{
"mcpServers": {
"seekdb": {
"command": "uvx",
"args": ["seekdb-mcp-server"],
"env": {
"UV_DEFAULT_INDEX": "https://mirrors.aliyun.com/pypi/simple/"
}
}
}
}After you save the settings, Cursor will automatically start seekdb MCP server (usually within about 1 minute).
Step 3: Create a notes collection
In the chat panel of your AI tool (for example, Cursor), enter:
Create a collection named "my_notes".
Example response:
I have successfully created a collection named "my_notes":
* Dimension: 384 (vector size)
* Distance metric: L2 (Euclidean distance)
You now have a vector collection that supports semantic search.
Step 4: Add notes
Add the following notes to the my_notes collection:
1. "seekdb supports hybrid retrieval, which combines keyword matching and semantic understanding."
2. "MCP is an open-source protocol proposed by Anthropic in November 2024. It allows large models to interact with external tools."
3. "The asyncio module in Python provides asynchronous programming capabilities, which are suitable for I/O-intensive tasks."
4. "Docker containerization technology can achieve rapid deployment and environment isolation of applications."
5. "RAG (retrieval-augmented generation) is currently the most popular AI application architecture, combining retrieval and generation capabilities."
Example response:
Done! I have successfully added 5 notes to the "my_notes" collection:
| ID | Content |
|---|---|
| doc1 | seekdb supports hybrid retrieval, which combines keyword matching and semantic understanding. |
| doc2 | MCP is an open-source protocol proposed by Anthropic in November 2024. It allows large models to interact with external tools. |
| doc3 | The asyncio module in Python provides asynchronous programming capabilities, which are suitable for I/O-intensive tasks. |
| doc4 | Docker containerization technology can achieve rapid deployment and environment isolation of applications. |
| doc5 | RAG (retrieval-augmented generation) is currently the most popular AI application architecture, combining retrieval and generation capabilities. |
Step 5: Perform semantic search
Now search your notes using natural language:
Search for notes related to "AI application development" in the my_notes collection.
Example response:
The following notes are related to "AI application development", sorted by relevance:
| Rank | Content | Relevance |
|---|---|---|
| 1 | RAG (retrieval-augmented generation) is currently the most popular AI application architecture... | Highest |
| 2 | MCP is an open-source protocol proposed by Anthropic in November 2024... | High |
| 3 | seekdb supports hybrid retrieval, which combines keyword matching and semantic understanding... | Medium |
You searched for "AI application development", but that exact phrase does not appear in the notes. Vector search understands semantic similarity and can still surface relevant content.
Step 6: Perform hybrid search
Hybrid search combines keyword matching and semantic understanding for more precise retrieval:
Perform a hybrid search on the my_notes collection:
- Full-text keyword: "Python"
- Semantic query: "Asynchronous programming and concurrent processing"
Example response:
Hybrid search results:
| Rank | Content |
|---|---|
| 1 | The asyncio module in Python provides asynchronous programming capabilities, which are suitable for I/O-intensive tasks. |
| 2 | Docker containerization technology can achieve rapid deployment and environment isolation of applications. |
Hybrid search uses RRF (Reciprocal Rank Fusion) to combine full-text keyword ranking (BM25) and vector similarity scores into a single, more robust ranking.
Step 7: Let AI remember your preferences
seekdb MCP server also provides an AI memory system that lets the assistant remember your information across sessions:
Remember that I am a Python developer who mainly uses seekdb for vector search applications.
Example response:
Recorded! I will remember:
* You are a Python developer.
* You mainly use seekdb for vector search applications.
Next time, you can ask:
Based on my technical background, recommend some learning resources.
The assistant will automatically retrieve your preferences and provide personalized recommendations.