{"id":51414076,"url":"https://github.com/spences10/mcp-memory-sqlite","last_synced_at":"2026-07-04T17:30:41.040Z","repository":{"id":320348892,"uuid":"1081736859","full_name":"spences10/mcp-memory-sqlite","owner":"spences10","description":"A personal knowledge graph and memory system for AI assistants using SQLite with optimized text search. Perfect for giving Claude (or any MCP-compatible AI) persistent memory across conversations!","archived":false,"fork":false,"pushed_at":"2026-06-13T22:01:22.000Z","size":119,"stargazers_count":13,"open_issues_count":11,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T00:06:38.163Z","etag":null,"topics":["database","knowledge-graph","knowledge-management","mcp","memory","sqlite"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spences10.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-23T08:05:10.000Z","updated_at":"2026-03-25T19:08:37.000Z","dependencies_parsed_at":"2025-10-23T10:25:39.440Z","dependency_job_id":"102ce032-cb17-4610-92de-612ac7f7f297","html_url":"https://github.com/spences10/mcp-memory-sqlite","commit_stats":null,"previous_names":["spences10/mcp-memory-sqlite"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/spences10/mcp-memory-sqlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spences10%2Fmcp-memory-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spences10%2Fmcp-memory-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spences10%2Fmcp-memory-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spences10%2Fmcp-memory-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spences10","download_url":"https://codeload.github.com/spences10/mcp-memory-sqlite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spences10%2Fmcp-memory-sqlite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35130722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","knowledge-graph","knowledge-management","mcp","memory","sqlite"],"created_at":"2026-07-04T17:30:40.411Z","updated_at":"2026-07-04T17:30:41.035Z","avatar_url":"https://github.com/spences10.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcp-memory-sqlite\n\nA personal knowledge graph and memory system for AI assistants using\nSQLite with optimized text search. Perfect for giving Claude (or any\nMCP-compatible AI) persistent memory across conversations!\n\n## Why Use This?\n\nGive your AI assistant a memory! This tool lets Claude (or other AI\nassistants) remember entities, concepts, and their relationships\nacross conversations. Perfect for:\n\n- 📚 **Personal Knowledge Management** - Build your own knowledge\n  graph\n- 🤖 **AI Assistant Memory** - Help Claude remember important\n  information about your projects, preferences, and context\n- 🔗 **Relationship Tracking** - Connect ideas, people, projects, and\n  concepts\n- 🔍 **Smart Text Search** - Find information using flexible,\n  relevance-ranked text search\n\n## Features\n\n- **100% Local \u0026 Private**: All your data stays on your machine\n- **Easy Setup**: Works out-of-the-box with Claude Desktop\n- **Flexible Text Search**: Case-insensitive search with fuzzy\n  matching that handles different naming conventions\n- **Relevance Ranking**: Results prioritized by name match \u003e type\n  match \u003e observation match\n- **Smart Deduplication**: Automatically prevents duplicate\n  relationships\n- **Context-Optimized**: Designed specifically for LLM context\n  efficiency - no unnecessary data bloat\n- **Simple API**: Intuitive tools for creating, searching, and\n  managing your knowledge graph\n\n## Quick Start\n\n**For Claude Desktop users** (recommended):\n\nAdd this to your Claude Desktop config:\n\n```json\n{\n\t\"mcpServers\": {\n\t\t\"memory\": {\n\t\t\t\"command\": \"npx\",\n\t\t\t\"args\": [\"-y\", \"mcp-memory-sqlite\"]\n\t\t}\n\t}\n}\n```\n\nThat's it! Claude can now remember things across conversations.\n\n## Installation\n\nIf you want to use it in your own project:\n\n```bash\nnpm install mcp-memory-sqlite\n# or\npnpm add mcp-memory-sqlite\n```\n\n## Configuration\n\n**Optional**: Customize the database location with an environment\nvariable:\n\n- `SQLITE_DB_PATH`: Where to store your data (default:\n  `./sqlite-memory.db`)\n\n## MCP Tools\n\n### create_entities\n\nCreate or update entities with observations.\n\n**Parameters:**\n\n- `entities`: Array of entity objects\n  - `name` (string): Unique entity identifier\n  - `entityType` (string): Type/category of the entity\n  - `observations` (string[]): Array of observation strings\n\n**Example:**\n\n```json\n{\n\t\"entities\": [\n\t\t{\n\t\t\t\"name\": \"Claude\",\n\t\t\t\"entityType\": \"AI Assistant\",\n\t\t\t\"observations\": [\n\t\t\t\t\"Created by Anthropic\",\n\t\t\t\t\"Focuses on being helpful, harmless, and honest\"\n\t\t\t]\n\t\t}\n\t]\n}\n```\n\n### search_nodes\n\nSearch for entities and their relations using text search with\nrelevance ranking.\n\n**Parameters:**\n\n- `query` (string): Text to search for\n- `limit` (number, optional): Maximum results to return (default: 10,\n  max: 50)\n\n**Example:**\n\n```json\n{\n\t\"query\": \"AI Assistant\",\n\t\"limit\": 5\n}\n```\n\n**Text Search Features:**\n\n- **Case-insensitive**: Searches ignore case differences\n- **Flexible matching**: Automatically handles variations in spacing,\n  underscores, and hyphens\n  - \"JavaScript framework\" will match \"javascript_framework\"\n  - \"web-development\" will match \"web_development\" or \"web\n    development\"\n- **Searches across**: Entity names, entity types, and all\n  observations\n- **Relevance ranking**: Results prioritized by where match occurs\n  (name \u003e type \u003e observation)\n\n### read_graph\n\nGet recent entities and their relations (returns last 10 entities by\ndefault).\n\n**Parameters:** None\n\n### create_relations\n\nCreate relationships between entities. Duplicate relations (same\nsource, target, and type) are automatically ignored.\n\n**Parameters:**\n\n- `relations`: Array of relation objects\n  - `source` (string): Source entity name\n  - `target` (string): Target entity name\n  - `type` (string): Relationship type\n\n**Example:**\n\n```json\n{\n\t\"relations\": [\n\t\t{\n\t\t\t\"source\": \"Claude\",\n\t\t\t\"target\": \"Anthropic\",\n\t\t\t\"type\": \"created_by\"\n\t\t}\n\t]\n}\n```\n\n**Note:** If you attempt to create the same relation multiple times,\nonly the first one will be stored. This prevents duplicate\nrelationships in your knowledge graph.\n\n### delete_entity\n\nDelete an entity and all associated data (observations and relations).\n\n**Parameters:**\n\n- `name` (string): Entity name to delete\n\n### delete_relation\n\nDelete a specific relation between entities.\n\n**Parameters:**\n\n- `source` (string): Source entity name\n- `target` (string): Target entity name\n- `type` (string): Relationship type\n\n### get_entity_with_relations\n\nGet an entity along with all its relations and directly connected\nentities. Perfect for exploring the knowledge graph around a specific\nconcept.\n\n**Parameters:**\n\n- `name` (string): Entity name to retrieve\n\n**Returns:**\n\n- `entity`: The requested entity\n- `relations`: All relations where this entity is source or target\n- `relatedEntities`: All entities connected to this one\n\n**Example:**\n\n```json\n{\n\t\"name\": \"Claude\"\n}\n```\n\n## Usage with Claude Desktop\n\nAdd to your Claude Desktop configuration:\n\n**Minimal configuration (uses default `./sqlite-memory.db`):**\n\n```json\n{\n\t\"mcpServers\": {\n\t\t\"memory\": {\n\t\t\t\"command\": \"npx\",\n\t\t\t\"args\": [\"-y\", \"mcp-memory-sqlite\"]\n\t\t}\n\t}\n}\n```\n\n**With custom database path:**\n\n```json\n{\n\t\"mcpServers\": {\n\t\t\"memory\": {\n\t\t\t\"command\": \"npx\",\n\t\t\t\"args\": [\"-y\", \"mcp-memory-sqlite\"],\n\t\t\t\"env\": {\n\t\t\t\t\"SQLITE_DB_PATH\": \"/path/to/your/memory.db\"\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\n## Database Schema\n\nThe tool uses pure SQLite for fast, reliable storage:\n\n### Tables\n\n- **entities**: Stores entity metadata (name, type, creation time)\n- **observations**: Stores observations linked to entities\n- **relations**: Stores relationships between entities (with unique\n  constraint to prevent duplicates)\n\nAll queries use optimized SQLite indexes for fast text search and\nrelationship traversal.\n\n## Development\n\n```bash\n# Install dependencies\npnpm install\n\n# Build\npnpm run build\n\n# Run in development mode\npnpm run dev\n\n# Run tests\npnpm test\n```\n\n## How It Works\n\nUnder the hood, this uses:\n\n- **SQLite** for fast, reliable local storage\n- **better-sqlite3** for Node.js integration\n- **Optimized text search** with relevance ranking and fuzzy matching\n\nYour data is stored in a single `.db` file on your computer - no\ncloud, no external services, completely private.\n\n## License\n\nMIT\n\n## Credits\n\nBuilt with:\n\n- [better-sqlite3](https://github.com/WiseLibs/better-sqlite3) - Fast\n  SQLite driver\n- [tmcp](https://github.com/tmcp-io/tmcp) - MCP server framework\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspences10%2Fmcp-memory-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspences10%2Fmcp-memory-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspences10%2Fmcp-memory-sqlite/lists"}