The Pensieve MCP Server

The Pensieve MCP Server

By seanivore GitHub

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.

typescript mcp
Overview

What is The Pensieve?

The Pensieve is a TypeScript-based MCP server that allows users to siphon excess thoughts from their minds into a knowledge management system, making it easier to spot patterns and links in their stored knowledge.

How to use The Pensieve?

To use The Pensieve, install the necessary dependencies, build the server, and configure it with Claude Desktop. Users can query their stored knowledge using natural language through the ask_pensieve tool.

Key features of The Pensieve?

  • Access knowledge via memory:// URIs
  • Store knowledge in markdown files with metadata
  • Natural language interface for querying knowledge
  • LLM-powered analysis and contextual response synthesis

Use cases of The Pensieve?

  1. Organizing personal knowledge and insights
  2. Analyzing complex information and retrieving relevant data
  3. Enhancing learning and memory retention through structured knowledge management

FAQ from The Pensieve?

  • Can I use The Pensieve for any type of knowledge?

Yes! The Pensieve is designed to handle various types of knowledge stored in markdown format.

  • Is The Pensieve easy to set up?

Yes! Follow the installation instructions to set up the server and configure it with your application.

  • How does The Pensieve analyze questions?

The Pensieve uses LLM to analyze questions and retrieve relevant information from stored knowledge.

Content

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" }

No tools information available.
School MCP
School MCP by 54yyyu

A Model Context Protocol (MCP) server for academic tools, integrating with Canvas and Gradescope platforms.

canvas mcp
View Details
repo-template
repo-template by loonghao

A Model Context Protocol (MCP) server for Python package intelligence, providing structured queries for PyPI packages and GitHub repositories. Features include dependency analysis, version tracking, and package metadata retrieval for LLM interactions.

-

google-calendar mcp
View Details
strava-mcp
strava-mcp by jeremysilva1098

MCP server for strava

strava mcp
View Details

Model Context Protocol (MCP) server implementation for Rhinoceros/Grasshopper integration, enabling AI models to interact with parametric design tools

grasshopper mcp
View Details

MCP configuration to connect AI agent to a Linux machine.

security mcp
View Details

AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).

python mcp
View Details