Version: v1.2.3 | Status: Active | Last Updated: March 2026
This document specifies MCP (Model Context Protocol) tools for AI integration with the FPF module. These tools allow AI agents to interact with FPF specifications programmatically.
Fetch the latest FPF specification from GitHub.
Parameters:
repo(string, optional): GitHub repository in format "owner/repo" (default: "ailev/FPF")branch(string, optional): Branch name (default: "main")output_path(string, optional): Path to save the fetched file
Returns:
content(string): The fetched specification contentpath(string): Path where content was saved (if output_path provided)
Parse a local FPF specification file.
Parameters:
file_path(string, required): Path to FPF-Spec.md fileextract_concepts(boolean, optional): Whether to extract concepts (default: true)extract_relationships(boolean, optional): Whether to extract relationships (default: true)
Returns:
spec(object): Parsed FPFSpec object with patterns, concepts, relationshipspattern_count(integer): Number of patterns extractedconcept_count(integer): Number of concepts extractedrelationship_count(integer): Number of relationships extracted
Search for patterns in a parsed FPF specification.
Parameters:
query(string, required): Search queryfile_path(string, optional): Path to FPF-Spec.md (if not already parsed)filters(object, optional): Filter object with:status(string, optional): Filter by status (Stable, Draft, Stub, New)part(string, optional): Filter by part (A, B, C, etc.)
Returns:
results(array): List of matching Pattern objectscount(integer): Number of results
Get a specific pattern by ID.
Parameters:
pattern_id(string, required): Pattern identifier (e.g., "A.1")file_path(string, optional): Path to FPF-Spec.md (if not already parsed)include_related(boolean, optional): Include related patterns (default: false)depth(integer, optional): Relationship depth (default: 1)
Returns:
pattern(object): Pattern objectrelated(array, optional): Related patterns if include_related is true
Export FPF specification to JSON.
Parameters:
file_path(string, required): Path to FPF-Spec.mdoutput_path(string, required): Path to output JSON fileformat(string, optional): Export format (default: "json", only "json" supported)
Returns:
output_path(string): Path to exported filesize(integer): File size in bytes
Build context string for prompt engineering.
Parameters:
file_path(string, required): Path to FPF-Spec.mdpattern_id(string, optional): Pattern ID to build context forconcept(string, optional): Concept name to build context forfilters(object, optional): Filters for context buildingdepth(integer, optional): Relationship depth (default: 1)output_path(string, optional): Path to save context
Returns:
context(string): Context stringoutput_path(string, optional): Path where context was saved
Generate visualization of FPF patterns.
Parameters:
file_path(string, required): Path to FPF-Spec.mdtype(string, required): Visualization type ("hierarchy" or "dependencies")output_path(string, optional): Path to save visualization
Returns:
diagram(string): Mermaid diagram stringoutput_path(string, optional): Path where diagram was saved
Get all concepts from a parsed specification.
Parameters:
file_path(string, optional): Path to FPF-Spec.md (if not already parsed)pattern_id(string, optional): Filter by pattern IDconcept_type(string, optional): Filter by concept type
Returns:
concepts(array): List of Concept objectscount(integer): Number of concepts
Get relationships for a pattern or all relationships.
Parameters:
file_path(string, optional): Path to FPF-Spec.md (if not already parsed)pattern_id(string, optional): Get relationships for specific patternrelationship_type(string, optional): Filter by relationship type
Returns:
relationships(array): List of Relationship objectscount(integer): Number of relationships
These tools should be registered with the MCP server using the standard MCP tool registration format. Each tool should include:
- Name
- Description
- Input schema (JSON Schema)
- Output schema (JSON Schema)
# Register tools
mcp_server.register_tool("fpf_search_patterns", {
"name": "fpf_search_patterns",
"description": "Search for patterns in FPF specification",
"inputSchema": {
"type": "object",
"properties": {
"query": {"type": "string"},
"file_path": {"type": "string"},
"filters": {"type": "object"}
},
"required": ["query"]
}
})
# Use tool
result = mcp_server.call_tool("fpf_search_patterns", {
"query": "holon",
"filters": {"status": "Stable"}
})- API Reference: API_SPECIFICATION.md
- Module README: README.md