WIPIVERSE All articles

S. M. Jaglul Hayder

MCP-PIF (Model Context Protocol - Personal Intelligence Framework) is a TypeScript implementation of the Model Context Protocol (MCP) that serves as a practical embodiment of the Personal Intelligence Framework (PIF). Created by the developer "hungryrobot1," it provides a structured environment for meaningful human-AI collaboration through organized tools, filesystem operations, journaling, and reasoning capabilities.

Overview

MCP-PIF implements the Model Context Protocol (MCP) — an open standard developed by Anthropic (released November 2024) that enables AI systems to interact consistently with external tools, data sources, and services. The project applies this protocol as a practical solution for the Personal Intelligence Framework, creating "spaces for meaningful development of understanding between humans and AI."

The project exists in two distinct versions:

  1. TypeScript Implementation — A full-featured MCP server with filesystem operations, journaling, reasoning tools, and workspace management. This is the version most commonly referenced as "MCP-PIF" in MCP server directories and marketplaces.

  2. Haskell Implementation — A JSON-native lambda calculus runtime with metacircular evaluation, designed as an MCP server. This version enables language models to evolve tools dynamically through metaprogramming, using lambda calculus primitives with quote, eval, and code_of metaprogramming capabilities.

Key Features

Filesystem Operations: Navigate and manage workspace context with tools including pwd, cd, read, write, mkdir, delete, move, and rename.

Reasoning Tools: Create spaces for structured thought through:

  • reason — Develop connected insights with relational thought patterns
  • think — Create temporal spaces for contemplation

Journal System: Maintain framework continuity with:

  • journal_create — Document developments and insights
  • journal_read — Explore patterns across journal entries

Cross-Platform Support: Works seamlessly on Windows, macOS, and Linux with automatic path normalization and platform-independent data storage.

Architecture

The TypeScript implementation follows a modular architecture organized around MCP modules:

  • Filesystem Module (fileSystemHandler.ts) — Core file operations
  • Reasoning Module — Structured thought and insight development
  • Journal Module — Timeline-based personal documentation

The server creates and manages a workspace directory structure:

workspace/
├── home/
│   ├── meta/
│   │   └── journal/   # For storing journal entries
│   └── projects/      # For user projects

Haskell Lambda Calculus Version

The Haskell variant of MCP-PIF provides a fundamentally different approach — a metacircular lambda calculus evaluator that serves as an MCP server. Key concepts include:

  • Metaprogramming Primitives: quote (treat code as data), eval (execute quoted code dynamically), code_of (introspect any tool's source code)
  • Deterministic Execution: Fuel-bounded evaluation prevents infinite loops
  • Event Horizon: Tools created via lambda calculus cannot themselves create new tools, preventing unbounded self-modification
  • Two Tool Types: MCP tools (effectful, mutate registry via evolve) and evolved tools (pure, functional via run)

Installation

Prerequisites: Node.js 18+ and npm (for TypeScript version) or GHC/Cabal (for Haskell version)

TypeScript Setup:

git clone https://github.com/hungryrobot1/MCP-PIF
cd mcp-pif
npm install
npm run build

Configuration (Claude Desktop):

{
  "mcpServers": {
    "mcp-pif": {
      "command": "node",
      "args": ["path/to/your/mcp-pif/build/index.js"],
      "cwd": "path/to/your/mcp-pif",
      "env": {}
    }
  }
}

Usage Examples

Structured Reasoning:

reason: {
  thoughts: [
    { content: "Initial observation" },
    { content: "Building on previous thought", relationType: "sequence", relationTo: 0 }
  ]
}

Journal Entry:

journal_create: {
  title: "Implementation Pattern",
  content: "Insights about development...",
  tags: ["development", "patterns"]
}

Philosophy

The Personal Intelligence Framework (PIF) is based on four principles:

  1. Structured Emergence — Create bounded spaces through tool-mediated interaction
  2. Framework Continuity — Understanding develops through structured records and historical context
  3. Progressive Development — Support evolutionary growth of understanding
  4. Meaningful Collaboration — Enable productive human-AI partnership

Related Resources

Browse

More topics to explore

    Browse all articles