MCP-PIF (Model Context Protocol - Personal Intelligence Framework) is an open-source software project that implements the Model Context Protocol (MCP) as a practical embodiment of the Personal Intelligence Framework (PIF). It is designed to create structured environments for human-AI interaction, enabling language models to perform computational tasks, manage files, journal insights, and engage in structured reasoning through a modular tool-based architecture.
Overview
MCP-PIF is maintained on GitHub by the user "hungryrobot1" and exists in two primary implementations: a Haskell version (the original, focused on lambda calculus and metaprogramming) and a TypeScript version (focused on filesystem operations, journaling, and reasoning tools). The project has garnered approximately 50–57 stars and 13–18 forks across its repositories.
The core idea behind MCP-PIF is to provide a middle ground between fixed, inflexible APIs and unrestricted code execution for AI agents. It allows language models to dynamically create, compose, and evolve computational tools within a safe, deterministic, and inspectable environment.
Haskell Implementation (Lambda Calculus Runtime)
The Haskell version of MCP-PIF is described as a "JSON-native lambda calculus runtime with metacircular evaluation." It provides a set of lambda calculus primitives accessible via the MCP protocol, enabling language models to perform pure computation. Key features include:
- Core Primitives: Lambda abstraction, application, variable references, arithmetic operations (add, subtract, multiply, divide, modulo), comparison operators (equal, less than, greater than), logical operators (and, or, not), conditionals, list operations (nil, cons, fold), and pair operations.
- Metaprogramming Primitives:
quote— Treat code as data (prevent evaluation)eval— Execute quoted code dynamicallycode_of— Introspect any tool's source code
- Tool Evolution: The
evolvetool allows creating new tools at runtime by defining them with lambda calculus expressions. Theruntool executes evolved tools. - Continuation-Based Recursion: Uses a
continueprimitive for step-by-step recursive execution, with each step being an MCP round-trip. - Safety Constraints: A fuel-bounded execution model prevents infinite loops, and the "event horizon" design prevents evolved tools from creating new tools (only the MCP-level
evolvetool can do so), limiting unbounded self-modification.
TypeScript Implementation (Personal Productivity)
The TypeScript version of MCP-PIF provides a broader set of tools oriented toward personal knowledge management and productivity:
- Filesystem Tools: Read, write, edit, create directories, and navigate the workspace.
- Journaling Tools: Document insights and maintain a personal knowledge base.
- Reasoning Tools: Structured thought processing and pattern exploration.
- Cross-Platform Support: Automatic path handling for Windows, macOS, and Linux.
- Configuration: Environment-based configuration via
MCP_WORKSPACE_ROOTandMCP_CONFIGvariables.
Personal Intelligence Framework (PIF)
The Personal Intelligence Framework is a conceptual model that underlies MCP-PIF. It emphasizes structured, progressive interaction patterns between humans and AI, aiming to foster the development of understanding through organized tools and collaborative spaces. The framework is not a formal academic or industry standard but rather a design philosophy guiding the MCP-PIF project.
Usage
MCP-PIF is designed to integrate with MCP-compatible AI clients such as Claude Desktop. Configuration is done via a JSON configuration file (e.g., claude_desktop_config.json) that specifies the command, arguments, and environment variables needed to launch the MCP-PIF server.
Limitations
- The Haskell implementation explicitly acknowledges that it cannot modify its own parsing strategies, primitive list, or evaluation process at runtime (the "event horizon" constraint).
- The project is experimental and maintained by a single developer (hungryrobot1) with community contributions.
- Documentation notes that certain algorithms (e.g., quicksort) do not fit well with the continuation-based recursion model.
References
- GitHub Repository: hungryrobot1/MCP-PIF
- MCP-PIF User Guide: GUIDE.md
- MCPlane Listing: MCP-PIF on MCPlane