Knowledge-Server
Persistent graph memory for AI agents.
Knowledge-Server is an MCP (Model Context Protocol) server that gives AI agents persistent, queryable memory using Neo4j. Your agents remember conversations, learn patterns, track decisions, and build knowledge over time.
Why Knowledge-Server?
AI agents have a memory problem. Context windows aren't memory—they're short-term buffers that vanish between sessions. Knowledge-Server solves this by providing:
- Graph-native memory — Relationships are first-class, not an afterthought
- Semantic search — Find memories by meaning, not just keywords
- Session continuity — Pick up exactly where you left off
- Execution planning — Track multi-step workflows with dependencies
- Issue tracking — Log problems and link them to solutions
Features
Memory Tools
store_fact— Store knowledge with tags and confidence scoresstore_conversation_memory— Preserve conversation exchangesquery_memory— Text search across all memoriessemantic_query_memory— Find conceptually similar contentget_context_map— Navigate related knowledge
Planning Tools
create_plan— Define execution plans with task dependenciesget_next_tasks— Get tasks ready to executetrack_task_progress— Real-time progress updates
Session Tools
create_session— Start a work session with objectivesupdate_session_progress— Track accomplishments and blockerscomplete_session— Hand off context to future sessions
Issue Tools
create_issue— Log problems with severitylink_issue_to_plan— Connect issues to remediation plans
Quick Start
1. Prerequisites
- Python 3.10+
- Neo4j database (local or cloud)
- Claude Code or another MCP client
2. Install
git clone https://github.com/tonton2006/knowledge-server.git
cd knowledge-server
pip install -r requirements.txt
3. Configure
cp .env.example .env
# Edit .env with your Neo4j credentials
4. Run
python main.py
5. Connect from Claude Code
Add to your Claude Code MCP settings:
{
"mcpServers": {
"knowledge-server": {
"command": "python",
"args": ["/path/to/knowledge-server/main.py"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "your-password"
}
}
}
}
Example Usage
Store a fact
store_fact(
fact_text="User prefers dark mode interfaces",
category="preference",
tags=["user", "ui", "settings"]
)
Query by meaning
semantic_query_memory("What are the user's display preferences?")
# Finds the dark mode fact even though words don't match
Start a work session
create_session(
date_str="2026-03-02",
focus="Implement authentication system",
planned_objectives=["Design schema", "Write endpoints", "Add tests"]
)
Architecture
┌─────────────────┐ ┌─────────────────┐
│ MCP Client │────▶│ Knowledge-Server │
│ (Claude Code) │◀────│ (FastMCP) │
└─────────────────┘ └────────┬────────┘
│
┌────────▼────────┐
│ Neo4j │
│ (Graph Database)│
└─────────────────┘
Configuration
| Variable | Description | Default |
|---|---|---|
NEO4J_URI |
Neo4j connection URI | bolt://localhost:7687 |
NEO4J_USER |
Neo4j username | neo4j |
NEO4J_PASSWORD |
Neo4j password | (required) |
GCP_PROJECT_ID |
For Vertex AI embeddings | (optional) |
OPENAI_API_KEY |
For OpenAI embeddings | (optional) |
LOG_LEVEL |
Logging verbosity | INFO |
Pricing
- Free: 50,000 facts, basic features
- Pro ($99/mo): 500,000 facts, semantic search, priority support
- Enterprise: Custom limits, SLA, dedicated support
License
MIT License — see LICENSE for details.
Contributing
Contributions welcome! Please read our contributing guidelines before submitting PRs.