Cover image
Try Now
2025-03-19

一个人简单地从脑海中抽出多余的想法,将它们倒入盆地,然后在一个人的闲暇时进行检查。当您了解这种形式时,发现模式和链接变得更容易。

3 years

Works with Finder

1

Github Watches

1

Github Forks

2

Github Stars

The Pensieve MCP Server

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.

This is a TypeScript-based MCP server that implements a RAG-based knowledge management system. It demonstrates core MCP concepts by providing:

  • Resources representing stored knowledge with URIs and metadata
  • Natural language interface for querying knowledge
  • LLM-powered analysis and response synthesis

Features

Resources

  • Access knowledge via memory:// URIs
  • Markdown files containing structured knowledge
  • Metadata for categorization and retrieval

Tools

  • ask_pensieve - Query your stored knowledge
    • Takes natural language questions
    • Uses LLM to analyze and retrieve relevant information
    • Provides contextual answers based on stored knowledge

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Knowledge Organization

Store your knowledge as markdown files in the root directory:

  1. Use clear categories in filenames (e.g., skills-javascript.md)
  2. One topic per file
  3. Include relevant metadata (dates, sources, etc.)
  4. Use clear, well-structured content

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "The Pensieve": {
      "command": "/path/to/The Pensieve/build/index.js"
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

async function handleQuestion(question: string) { // 1. Analyze question const analysis = await server.request(SamplingCreateMessageRequestSchema, { messages: [{ role: "user", content: { type: "text", text: question } }], systemPrompt: "You are the Pensieve. Analyze questions to determine what knowledge to retrieve.", includeContext: "none" });

// 2. Use existing RAG query (from our working code) const results = await ragPipeline.semanticSearch(analysis.content.text);

// 3. Compose response const response = await server.request(SamplingCreateMessageRequestSchema, { messages: [{ role: "user", content: { type: "text", text: Answer using this knowledge: ${results.map(r => r.payload.full_text).join('\n')} } }], systemPrompt: "You are the Pensieve. Provide clear answers based on stored knowledge.", includeContext: "none" });

return response.content.text; }

const documentGuide = `To prepare documents for the Pensieve:

  1. Place files in the root directory
  2. Use clear categories in filenames (e.g., skills-javascript.md)
  3. One topic per file
  4. Clear, well-structured content
  5. Include relevant metadata (dates, sources, etc.)`;

{ uri: "memory://knowledge/skills-javascript.md", mimeType: "text/markdown", // Since we're using markdown files name: "JavaScript Skills", description: "Knowledge about JavaScript development" }

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

    Reviews

    4 (1)
    Avatar
    user_LN3Z1Ibk
    2025-04-16

    The-pensieve by seanivore is an incredibly useful tool for organizing and managing projects. Its intuitive interface and robust capabilities make it an essential for developers. Highly recommend! Check it out at https://github.com/seanivore/the-pensieve.