home / mcp / personal knowledge mcp server

Personal Knowledge MCP Server

Indexes local documents and serves MCP-based search and retrieval for AI clients.

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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 start

Configuration and usage notes

Configure 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"
  }
}

Starting the MCP server from your client

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 start

Advanced configuration for Cherry Studio

Connect 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"
  }
}

MCP tools available

The server provides the following MCP tools to interact with your knowledge base.

  • search_documents: Search the knowledge base for documents matching a query and optional source filter
  • get_document: Retrieve the full content of a document by its ID
  • list_documents: List all documents with optional source filtering and limit
  • get_stats: Get statistics about indexed content across sources
  • sync_local_documents: Manually trigger local document synchronization

Available tools

search_documents

Search the knowledge base for documents matching a query, with optional source filtering and result limit.

get_document

Retrieve the full content of a document by its ID.

list_documents

List all documents with optional source filtering and a configurable limit.

get_stats

Return counts of documents indexed by source (local, feishu, wecom).

sync_local_documents

Manually trigger the synchronization process for local documents.