memory-access
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.
memory-access
An MCP server that gives AI agents persistent, intent-based memory. Text is decomposed into atomic insights, classified into semantic frames, embedded as vectors, and stored in a SQLite knowledge graph with subject indexing.
Quick Start
1. Clone and install
git clone https://github.com/emmahyde/memory-access.git
cd memory-access
uv sync --group devOr install from PyPI:
pip install memory-access
# or
uv add memory-accessRequires Python 3.12+.
2. Set environment variables
For OpenAI + Anthropic (default):
export OPENAI_API_KEY=...
export ANTHROPIC_API_KEY=...For AWS Bedrock:
export EMBEDDING_PROVIDER=bedrock
export LLM_PROVIDER=bedrock
export AWS_PROFILE=your-sso-profile
export AWS_REGION=us-east-13. Install the Claude Code plugin
claude plugin install memory-access@emmahyde4. Set up knowledge base support (optional)
To ingest external documentation as knowledge bases:
export FIRECRAWL_API_KEY=... # Get from https://www.firecrawl.dev/5. Verify
uv run pytest # 174 tests pass
uv run memory-access # server starts (MCP server mode)
uv run memory-access kb list # knowledge base CLI modeRelated MCP server: Sugar
Configuration
Environment variables
Variable | Required | Description |
| Yes* | Embedding generation via OpenAI (text-embedding-3-small) |
| Yes* | Insight normalization via Anthropic (Claude Haiku) |
| No | Database path. Default: |
| No |
|
| No |
|
| No | AWS SSO profile name (required for Bedrock) |
| No | AWS region for Bedrock. Default: |
| No | Bedrock model ID. Default: |
| No | Bedrock Claude model ID. Default: |
| No | Web crawling for knowledge bases. Get from https://www.firecrawl.dev/ |
| No | Crawl provider. Default: |
| No | Minimum confidence to store ingested chunks. Default: |
* Not required when using bedrock provider.
Claude Code
Add to your MCP settings (see mcp-config-example.json):
{
"mcpServers": {
"memory-access": {
"command": "python3",
"args": ["-m", "memory_access.server"],
"env": {
"MEMORY_DB_PATH": "~/.claude/memory-access/memory.db",
"OPENAI_API_KEY": "${OPENAI_API_KEY}"
},
"cwd": "/path/to/memory-access/src"
}
}
}AWS Bedrock
To use AWS Bedrock instead of OpenAI/Anthropic APIs:
{
"mcpServers": {
"memory-access": {
"command": "python3",
"args": ["-m", "memory_access.server"],
"env": {
"MEMORY_DB_PATH": "~/.claude/memory-access/memory.db",
"EMBEDDING_PROVIDER": "bedrock",
"LLM_PROVIDER": "bedrock",
"AWS_PROFILE": "your-sso-profile",
"AWS_REGION": "us-east-1"
},
"cwd": "/path/to/memory-access/src"
}
}
}MCP Tools (21 tools)
Storage
store_insight— Store text with optional domain and git context (repo, pr, author, project, task). Text is decomposed into atomic insights, classified, embedded, and indexed.update_insight— Update an insight's confidence score.forget— Delete an insight.
Search
search_insights— Semantic similarity search by query text. Returns ranked results.list_insights— List insights filtered by domain or frame.search_by_subject— Find insights by subject name and kind.related_insights— Find insights connected through shared subjects (graph traversal).
Knowledge graph
add_subject_relation— Create a typed edge between two subjects (e.g.,problem --solved_by--> resolution).get_subject_relations— Query outgoing relations from a subject.
Knowledge Bases
add_knowledge_base— Create a new knowledge base by crawling or scraping a URL. Supports both full site crawling and single-page scraping with automatic ingestion and semantic indexing.search_knowledge_base— Search external documentation by semantic similarity. Optionally filter by KB name.list_knowledge_bases— List all knowledge bases with descriptions and chunk counts.
Task orchestration
create_task— Create a task with DB-enforced lifecycle state.assign_task_locks— Acquire active locks for resources (exact + path-prefix conflict detection).release_task_locks— Release active locks for a task (optionally scoped to resources).add_task_dependencies— Add dependency edges between tasks.transition_task— Atomically transition state with optimistic concurrency (expected_version).append_task_event— Append audit/worklog events (append-only at DB level).get_task— Fetch a task by ID.list_tasks— List tasks with optional status filter.list_task_events— List append-only events for a task.
Semantic Frames
Insights are normalized into one of six canonical frames:
Frame | Meaning | Example |
| X causes Y | "Increasing cache TTL reduces database load" |
| X requires Y | "OAuth tokens must be refreshed before expiry" |
| When X, prefer Y | "When pagination exceeds 1000 items, use cursor-based pagination" |
| X is equivalent to Y | "A mutex and a binary semaphore serve the same purpose" |
| X is a type of Y | "Rate limiting is a type of flow control" |
| To achieve X, do Y | "To deploy to staging, run the CI pipeline with the staging flag" |
Subject Kinds
Insights are automatically indexed by extracted subjects:
Kind | Source |
| Extracted from text by the normalizer |
| From git context parameters on |
Knowledge Bases
Ingest external documentation (APIs, guides, frameworks) into independently queryable knowledge bases. Create and query KBs via CLI or MCP — use whichever fits your workflow.
MCP Tools
From Claude Code, use MCP tools for full KB lifecycle:
// Create a new KB by crawling
add_knowledge_base("rails-docs", "https://guides.rubyonrails.org/association_basics.html",
"Rails Association Guide")
// Create a KB from a single page
add_knowledge_base("python-async", "https://docs.python.org/3/library/asyncio.html",
"Python asyncio docs", scrape_only=true)
// Search across all KBs
search_knowledge_base("has_many association in Rails")
// Search within a specific KB
search_knowledge_base("asyncio event loop", kb_name="python-async")
// List all KBs
list_knowledge_bases()CLI Commands
From the command line, use subcommands for KB management:
# Create a new knowledge base by crawling a URL
memory-access kb new rails-docs --crawl https://guides.rubyonrails.org/association_basics.html --description "Rails API Reference"
# Create from a single page
memory-access kb new python-async --scrape https://docs.python.org/3/library/asyncio.html
# List all knowledge bases
memory-access kb list
# Delete a knowledge base
memory-access kb delete rails-docs
# Re-crawl and refresh a knowledge base
memory-access kb refresh rails-docs --limit 100Architecture
The KB pipeline mirrors the insight storage system:
External docs (web)
|
v
Crawl → Split → Normalize → Embed → StoreCrawl: Firecrawl extracts markdown from web pages
Split: Heading-based chunking with paragraph and size fallbacks
Normalize: Same LLM decomposition as insights (Claude Haiku)
Embed: Same embedding engine as insights (OpenAI or Bedrock)
Store: SQLite tables (
kb_chunks) with semantic frames and subjects
KB chunks share the subjects index with insights, enabling cross-referencing chat memory with external docs.
How It Works
User text
|
v
Normalizer (Claude Haiku)
|- Decompose into atomic insights
|- Classify: frame + subjects (entities, problems, resolutions, contexts)
|
v
Embedding Engine (OpenAI text-embedding-3-small)
|- Generate L2-normalized vector
|
v
InsightStore (SQLite)
|- Insert insight row
|- Upsert subjects, link via junction table
|- Auto-create subject relations (problem->solved_by->resolution, etc.)
|- Auto-create insight relations (shared_subject edges)
|- If git context: create repo/pr/person/project/task subjects + relationsDevelopment
# Run all tests (174 tests: 162 unit tests + 12 integration tests)
uv run pytest
# Run a specific test file
uv run pytest tests/test_storage.py
# Run a specific test
uv run pytest tests/test_storage.py::TestInsightStoreInit::test_initialize_creates_tables -v
# Run integration tests only
uv run pytest tests/test_kb_integration.py -v
# Generate dummy data for testing
uv run python scripts/generate_dummy_data.pyDatabase Schema
The database has tables for insights, knowledge bases, and knowledge graphs:
Core Tables
insights— Chat memory: text, normalized_text, frame, subject lists (JSON arrays), embedding (float32 blob), confidence, timestampssubjects+insight_subjects— Subject index linking insights to named/typed subjectsinsight_relations— Weighted edges between insights (shared_subject)subject_relations— Typed edges between subjects (contains, scopes, solved_by, etc.)
Knowledge Base Tables
knowledge_bases— Registry: name, description, source_type, created_at, updated_atkb_chunks— Crawled and normalized chunks: text, frame, subjects, embedding, source_url, confidencekb_chunk_subjects— Subject index for KB chunks (same subjects as insights)kb_insight_relations— Optional links between KB chunks and chat insights (for cross-referencing)
Metadata
schema_versions— Migration tracking
Migrations run automatically on startup. Currently at version 5.
Claude Code Plugin
This repo is also a Claude Code plugin. Install with:
claude plugin install memory-access@emmahydeIncludes:
Skill (
using-memory-access) — search strategy guide, subject kinds/relations reference, best practicesPreCompact hook — prompts Claude to store key insights before context compaction
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Persistent knowledge graph for AI-augmented teams. Store decisions, findings, and standing rules across agent sessions with semantic search and typed connections. Includes cross-session memory, audit trail, workspace isolation, and secret detection. Built for teams running agents that need to remember. Free until launch with team tier as default, anon trial available.
Durable background job execution, async task scheduling, and state persistence for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with persistent, searchable memory using a knowledge graph stored in SQLite. Features semantic search, temporal awareness, and workflow-aware prompts for development projects.MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to save and recall persistent project and cross-project context across sessions through semantic search over a local SQLite store, with no external API keys required. Optionally exposes a task queue so agents can pick up, execute, and commit queued work autonomously.-
- FlicenseNot gradedqualityAmaintenanceProvides a local-first persistent memory layer that AI coding agents can read and write during sessions, enabling semantic search and recall of project decisions, preferences, error patterns, research, and cross-project guidelines stored in local SQLite. It also exposes an optional task queue and orchestration tools for delegating autonomous coding work that reuses the same stored context.-
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to store, search, and recall persistent project-scoped and cross-project context — decisions, preferences, error patterns, file notes, and guidelines — using local SQLite with semantic or keyword search and no external API calls. An optional companion task server in the same package lets agents pick up queued work and execute it autonomously using that accumulated memory.-