Provides a local, FP-driven MCP server with four SQLite databases for directives, projects, user preferences, and optional automation directives.
Configuration
View docs{
"mcpServers": {
"aryanduntley-aifp": {
"command": "python3",
"args": [
"-m",
"aifp"
]
}
}
}AIFP MCP Server provides a local, database-driven gateway that coordinates AI guidance with a tightly managed, FP-compliant codebase. It exposes a small, well-defined set of tools via a standard input/output interface so you can harness AI to write, organize, and maintain functional code across projects while preserving context and traceability.
You use the MCP server by connecting an MCP client to the stdio transport. Start an AIFP session in your project and tell the AI to apply AIFP directives. The server then guides you through project initialization, ongoing coding, and project management tasks, ensuring every action adheres to the functional programming baseline and the projectβs completion path.
Prerequisites and installation steps let you run the MCP server locally and connect your MCP client.
## Prerequisites
- Python 3.11+ installed on your system
## Installation via pip (recommended)
pip install aifp
## Manual installation (from source)
# 1) Download or clone the repository
# 2) Locate the MCP server package at the path containing the aifp module
# 3) Add the package to your Python path if needed
# 4) Ensure the runtime dependency watchdog is installed
## System-wide check
python3 -m aifp --help
## System prompt setup (required)
python3 -m aifp --system-prompt
## Configure your MCP client (example for Claude Desktop)
# See client-specific configuration blocks in the protocol guide for exact steps
"""
Note: Commands above are representative. Use the commands exactly as shown in your environment and client configuration guides.
"""The MCP server uses a stdio transport. You connect by launching the server as a subprocess from your MCP client, and you exchange JSON-RPC messages through standard input and output. The server relies on an internal global database for directives and a per-project database that tracks code structure, tasks, and runtime notes.
Project state is stored in a dedicated folder in your project root (for example, .aifp-project/). The server creates and updates project.db, user_preferences.db, and, for automation projects, user_directives.db as you work.
Start the client connection by launching the MCP server subprocess with the appropriate command. The following example demonstrates the typical Python-based invocation used in standard setups.
Directives system and lifecycle management let you control how the AI drives development. FP baseline rules are always active, while FP directives provide optional guidance for more complex scenarios. You define per-project goals, milestones, and tasks, and the MCP server maintains the state and history so you can resume work after pauses.
Git integration is supported to coordinate multi-user collaboration with FP-powered conflict resolution. You maintain a clean, deterministic history because generated code remains FP-pure and inputs/outputs are explicit.
Security and privacy are central: all data stays local to your machine, with no external network requests by default. You own the project data in your .aifp-project directory, and you control what is tracked or analyzed via opt-in settings.
If you run into issues, check that your MCP client configuration explicitly points to the local stdio transport and that the Python interpreter being used has the aifp package installed in its environment. Ensure the system prompt is configured so the AI actively uses MCP tools during interactions.