opencode-personal-knowledge
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Store and retrieve knowledge using semantic search, powered by local embeddings. No external API keys required.
⨠Features
š Semantic Search ā Find knowledge using vector embeddings (BGE-small-en-v1.5)
š Text Search ā Keyword-based search fallback
š·ļø Tag Organization ā Categorize entries with tags
š Plug-and-Play ā No external services required (embeddings run 100% locally)
š¾ Persistent Storage ā Data stored in
~/.local/share/opencode-personal-knowledge/š Automatic Indexing ā Entries are vectorized on creation
Related MCP server: local-memory-mcp
š Quick Start
Opencode Integration (Recommended)
Add to ~/.config/opencode/opencode.jsonc:
{
"mcp": {
"personal-knowledge": {
"type": "local",
"command": ["bunx", "opencode-personal-knowledge"],
"enabled": true
}
}
}Restart Opencode ā the MCP tools will be available immediately.
Source Installation (Development)
git clone https://github.com/NocturnLabs/opencode-personal-knowledge.git
cd opencode-personal-knowledge
bun install
bun run mcp # Start MCP serverš ļø MCP Tools
Knowledge Tools
Tool | Description |
| Store a new knowledge entry with optional tags |
| Semantic similarity search |
| Keyword-based text search |
| Retrieve entry by ID |
| Update an existing entry |
| Delete an entry |
| List entries with filters |
| Database statistics |
Session Memory Tools
Log and search across entire OpenCode sessions.
Tool | Description |
| Begin logging a session |
| Log a user/agent message to the session |
| Semantic search within a session |
| Search across ALL logged sessions |
| List all sessions |
| Get session details and messages |
| End session with optional summary |
š Example Usage
Storing Knowledge
User: "store a knowledge entry about Opencode Features"
Agent: Researches and stores entry:
ā
Stored knowledge entry #2: "Opencode Features"
š Indexed for semantic searchSearching Knowledge
User: "@search_knowledge for opencode"
Agent: Returns semantic matches:
Found 1 similar entry:
### 1. Opencode Features (85% similar)
Opencode is an open source AI coding agent...Session Memory
User: "Start logging this session, call it 'auth debugging'"
Agent: Starts session and logs all exchanges:
ā
Started session #1: "auth debugging"User: "Search this session for JWT"
Agent: Returns semantic matches from the session:
Found 2 matches in session #1:
### 1. [user] (92% match)
The JWT token expires too fast...
### 2. [agent] (88% match)
The TTL is set to 60 instead of 3600...āļø Configuration
Data Location
By default, data is stored in:
~/.local/share/opencode-personal-knowledge/
āāā knowledge.db # SQLite database
āāā vectors/ # LanceDB vector storeOverride with environment variable:
export OPENCODE_PK_DATA_DIR=/custom/pathEmbedding Model
Uses BGE-small-en-v1.5 via FastEmbed (auto-downloads on first use).
šļø Technology Stack
Runtime: Bun / Node.js
Vector DB: LanceDB (embedded)
Embeddings: FastEmbed (ONNX Runtime)
MCP SDK: @modelcontextprotocol/sdk
Database: SQLite (via Bun)
š License
MIT Ā© NocturnLabs
This server cannot be deployed
Related MCP Connectors
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA local-first MCP server for personal memory management, enabling AI agents to store, search, and retrieve developer insights with offline semantic search and auto-categorization.15 npm3MIT
- FlicenseNot gradedqualityDmaintenanceA local MCP server that provides semantic memory storage and retrieval for coding and AI agents, enabling durable context across chat sessions.57 npm4-
- AlicenseNot gradedqualityCmaintenanceA RAG knowledge base MCP server that adds vector search and reranking capabilities to opencode, supporting multimodal embeddings, multiple knowledge bases, and local storage.1MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for team documentation and knowledge bases, enabling semantic search over documentation files using local embeddings.MIT