{"id":26305872,"url":"https://github.com/seanivore/the-pensieve","last_synced_at":"2026-05-04T00:32:01.266Z","repository":{"id":277257862,"uuid":"931750523","full_name":"seanivore/the-pensieve","owner":"seanivore","description":"One simply siphons the excess thoughts from one's mind, pours them into the basin, and examines them at one's leisure. It becomes easier to spot patterns and links, you understand, when they are in this form.","archived":false,"fork":false,"pushed_at":"2025-11-29T12:29:27.000Z","size":79,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"the-pensieve","last_synced_at":"2025-12-01T14:11:11.952Z","etag":null,"topics":["ai-memory","claudeme","mcp","mcp-server","rag","retrieval-augmented-generation","typescript"],"latest_commit_sha":null,"homepage":"https://design.august.style/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seanivore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"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-02-12T19:47:09.000Z","updated_at":"2025-11-29T12:29:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"5fa68d6e-8814-442f-aad7-f9fc54f82214","html_url":"https://github.com/seanivore/the-pensieve","commit_stats":null,"previous_names":["seanivore/the-pensieve"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/seanivore/the-pensieve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanivore%2Fthe-pensieve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanivore%2Fthe-pensieve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanivore%2Fthe-pensieve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanivore%2Fthe-pensieve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanivore","download_url":"https://codeload.github.com/seanivore/the-pensieve/tar.gz/refs/heads/the-pensieve","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanivore%2Fthe-pensieve/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32590174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai-memory","claudeme","mcp","mcp-server","rag","retrieval-augmented-generation","typescript"],"created_at":"2025-03-15T09:17:21.632Z","updated_at":"2026-05-04T00:32:01.257Z","avatar_url":"https://github.com/seanivore.png","language":"JavaScript","funding_links":[],"categories":["Knowledge Management \u0026 Memory"],"sub_categories":[],"readme":"# The Pensieve MCP Server\n\nOne simply siphons the excess thoughts from one's mind, pours them into the basin, and examines them at one's leisure. It becomes easier to spot patterns and links, you understand, when they are in this form.\n\nThis is a TypeScript-based MCP server that implements a RAG-based knowledge management system. It demonstrates core MCP concepts by providing:\n\n- Resources representing stored knowledge with URIs and metadata\n- Natural language interface for querying knowledge\n- LLM-powered analysis and response synthesis\n\n## Features\n\n### Resources\n- Access knowledge via `memory://` URIs\n- Markdown files containing structured knowledge\n- Metadata for categorization and retrieval\n\n### Tools\n- `ask_pensieve` - Query your stored knowledge\n  - Takes natural language questions\n  - Uses LLM to analyze and retrieve relevant information\n  - Provides contextual answers based on stored knowledge\n\n## Development\n\nInstall dependencies:\n```bash\nnpm install\n```\n\nBuild the server:\n```bash\nnpm run build\n```\n\nFor development with auto-rebuild:\n```bash\nnpm run watch\n```\n\n## Knowledge Organization\n\nStore your knowledge as markdown files in the root directory:\n1. Use clear categories in filenames (e.g., `skills-javascript.md`)\n2. One topic per file\n3. Include relevant metadata (dates, sources, etc.)\n4. Use clear, well-structured content\n\n## Installation\n\nTo use with Claude Desktop, add the server config:\n\nOn MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\nOn Windows: `%APPDATA%/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"The Pensieve\": {\n      \"command\": \"/path/to/The Pensieve/build/index.js\"\n    }\n  }\n}\n```\n\n### Debugging\n\nSince MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector):\n\n```bash\nnpm run inspector\n```\n\nThe Inspector will provide a URL to access debugging tools in your browser.\n\nasync function handleQuestion(question: string) {\n  // 1. Analyze question\n  const analysis = await server.request(SamplingCreateMessageRequestSchema, {\n    messages: [{\n      role: \"user\",\n      content: { type: \"text\", text: question }\n    }],\n    systemPrompt: \"You are the Pensieve. Analyze questions to determine what knowledge to retrieve.\",\n    includeContext: \"none\"\n  });\n\n  // 2. Use existing RAG query (from our working code)\n  const results = await ragPipeline.semanticSearch(analysis.content.text);\n\n  // 3. Compose response\n  const response = await server.request(SamplingCreateMessageRequestSchema, {\n    messages: [{\n      role: \"user\",\n      content: { \n        type: \"text\", \n        text: `Answer using this knowledge: ${results.map(r =\u003e r.payload.full_text).join('\\n')}`\n      }\n    }],\n    systemPrompt: \"You are the Pensieve. Provide clear answers based on stored knowledge.\",\n    includeContext: \"none\"\n  });\n\n  return response.content.text;\n}\n\nconst documentGuide = `To prepare documents for the Pensieve:\n1. Place files in the root directory\n2. Use clear categories in filenames (e.g., skills-javascript.md)\n3. One topic per file\n4. Clear, well-structured content\n5. Include relevant metadata (dates, sources, etc.)`;\n\n{\n  uri: \"memory://knowledge/skills-javascript.md\",\n  mimeType: \"text/markdown\",  // Since we're using markdown files\n  name: \"JavaScript Skills\",\n  description: \"Knowledge about JavaScript development\"\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanivore%2Fthe-pensieve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanivore%2Fthe-pensieve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanivore%2Fthe-pensieve/lists"}