home / mcp / personal knowledge mcp server
Indexes local documents and serves MCP-based search and retrieval for AI clients.
Configuration
View docs{
"mcpServers": {
"kyodule-personal-knowledge-mcp": {
"command": "node",
"args": [
"/path/to/personal-knowledge-mcp/dist/index.js"
]
}
}
}Personal Knowledge MCP Server indexes your local documents (TXT, MD, PDF, DOCX, PPTX), enables fast full-text search, and exposes an MCP interface so AI clients can query and retrieve documents efficiently. It centralizes your knowledge and makes it easy for AI assistants to browse, search, and fetch content from your own data sources.
You connect an MCP client to this server to search, list, and fetch documents. Start by building and running the server, then configure your MCP client to point to the local MCP endpoint. Once running, you can issue queries like “search documents about TypeScript generics” or ask for a specific document to be retrieved in full.
From your MCP client, you can access the following capabilities: search documents by keywords, fetch a full document by its ID, list documents with optional source filters, retrieve knowledge base statistics, and manually trigger local document synchronization.
Prerequisites: you need Node.js and npm installed on your system.
# 1. Install dependencies
cd personal-knowledge-mcp
npm install
# 2. Build the project
npm run build
# 3. Index local documents
npm run index
# 4. Start the MCP server
npm startConfigure what local documents to index and where to store the database. The following example shows enabling local indexing, watched paths, file extensions, and the database path.
{
"local": {
"enabled": true,
"watch_paths": [
"~/Documents",
"~/Desktop"
],
"file_extensions": [".txt", ".md", ".pdf", ".docx"],
"exclude_patterns": [
"**/node_modules/**",
"**/.git/**"
]
},
"database": {
"path": "./data/knowledge.db"
}
}You can run the server locally with npm start after building and indexing. If you prefer a direct invocation of the built file, you can run the compiled entry point with Node.
# Start via npm
npm startConnect the MCP server to Cherry Studio by adding a server entry in the MCP configuration.
{
"personal-knowledge": {
"command": "node",
"args": ["/path/to/personal-knowledge-mcp/dist/index.js"],
"cwd": "/path/to/personal-knowledge-mcp"
}
}The server provides the following MCP tools to interact with your knowledge base.
Search the knowledge base for documents matching a query, with optional source filtering and result limit.
Retrieve the full content of a document by its ID.
List all documents with optional source filtering and a configurable limit.
Return counts of documents indexed by source (local, feishu, wecom).
Manually trigger the synchronization process for local documents.