A Model Context Protocol (MCP) server for accessing and summarizing Flight PHP Framework documentation. This server provides AI assistants with tools to fetch documentation content and generate summaries, enabling intelligent interactions with FlightPHP docs.
This MCP server integrates with the Flight PHP micro-framework documentation, allowing AI assistants to:
- Fetch content from documentation URLs
- Extract key information like APIs and examples
- Generate contextual summaries of documentation
Built on top of the PHP MCP Server SDK, it follows the Model Context Protocol specification to provide standardized access to FlightPHP's documentation resources.
- Documentation Fetching: Retrieve content from FlightPHP documentation pages
- Content Summarization: Generate focused summaries based on specific queries
- HTTP Transport: Streamable HTTP server for production deployments
- Auto-Discovery: Automatic tool registration from source code
- Error Handling: Robust error handling for network requests
- PHP >= 8.1
- Composer
composer installStart the MCP server using the provided script:
php server.phpThe server will start on http://0.0.0.0:8890/mcp and listen for MCP protocol messages.
Fetches and returns content from a documentation URL.
Parameters:
url(string): Full URL to fetch (e.g., a FlightPHP docs page)
Example:
{
"method": "tools/call",
"params": {
"name": "fetch_url",
"arguments": {
"url": "https://flightphp.com/learn"
}
}
}Summarizes fetched documentation content based on a query.
Parameters:
content(string): The documentation content to summarizequery(string): The specific query or focus for summarization
Example:
{
"method": "tools/call",
"params": {
"name": "summarize_docs",
"arguments": {
"content": "Flight is a fast, simple, extensible framework...",
"query": "routing basics"
}
}
}The server is configured in server.php:
- Host:
0.0.0.0(binds to all interfaces) - Port:
8890 - Endpoint:
/mcp - Server Info: "Flight PHP Framework Docs MCP" v1.0.0
flightphp-mcp/
├── composer.json # Project dependencies
├── server.php # Main server entry point
├── src/
│ └── Fetcher.php # MCP tools implementation
└── vendor/ # Composer dependencies
- Create new methods in
src/Fetcher.phpor new classes insrc/ - Use the
#[McpTool]attribute to register tools - Use
#[Schema]attributes for parameter descriptions - The server auto-discovers tools from the
src/directory
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.