Overview
Features
Metacircular evaluation kernel
A lambda-calculus runtime with metacircular evaluation that lets language models modify and analyze tools while maintaining deterministic, fuel-bounded execution.
Quote, Eval, Code Of primitives
Core metaprogramming primitives enabling quoting, dynamic evaluation, and tool introspection; supports introspection of source code via code_of.
Tool registry and evolution
System tools (evolve, run, list, help) manage tool creation, execution, discovery, and documentation; registry remains immutable during evaluation to ensure safety.
Fuel-based termination
All evaluations are bounded by a fuel limit (default 10,000 steps) to guarantee termination and predictability.
Pure evaluation and safety guarantees
Evaluation is pure (no I/O in lambda calculus), with validated execution and an immutable registry to prevent runtime modification.
MCP protocol integration
Implements the MCP for tool discovery and execution, including JSON-RPC flow, environment injection, and encoded results.
End-to-end MCP runtime pipeline
JSON input → Parser → Term → Evaluator → RuntimeValue → Encoder → JSON output, wired for tool-based interactions.
Environment scoping safeguards
Eval cleans the environment (e.g., removes __tool_name and __self) while preserving user variables and keeping tool codes accessible for code_of.
Who Is This For?
- Language model developers:Prototype MCP tools, evolve tools, and test meta-programming flows with language models.
- Researchers:Investigate metacircular evaluation, code introspection, and safe, bounded tool ecosystems.
- Tool developers:Develop new tools and register them within the MCP-PIF registry.




