A Model Context Protocol (MCP) server that provides searchable access to NativePHP documentation. This server scrapes and indexes the complete NativePHP documentation, making it available through MCP tools for AI assistants like Claude.
This MCP server acts as a bridge between AI assistants and the NativePHP documentation. It:
- Scrapes the entire NativePHP documentation from https://nativephp.com/docs
- Indexes content using SQLite with full-text search (FTS5) capabilities
- Provides four main tools for documentation access:
search_nativephp_docs()- Search across all documentationget_nativephp_section()- Retrieve complete sectionsrefresh_nativephp_docs()- Update the local documentation cacheget_documentation_stats()- View database statistics
The server operates locally, requiring no API keys or external dependencies beyond the initial documentation scraping.
- Python 3.8 or higher
- Git
-
Clone the repository
git clone <repository-url> cd nativephp-mcp-server
-
Create and activate virtual environment
python3 -m venv .venv # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Test the server (optional)
python nativephp_mcp_server.py
-
Locate your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
- macOS:
-
Add the MCP server configuration:
{ "mcpServers": { "nativephp-mcp-server": { "command": "/absolute/path/to/your/nativephp-mcp-server/.venv/bin/python", "args": ["/absolute/path/to/your/nativephp-mcp-server/nativephp_mcp_server.py"] } } }Replace
/absolute/path/to/your/nativephp-mcp-server/with your actual project path. -
Restart Claude Desktop to load the new MCP server.
The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. Key concepts:
- MCP Client: The AI assistant (Claude Desktop)
- MCP Server: This documentation server
- Transport: Communication channel (stdio in this case)
- Security: Servers run in controlled environments with explicit permissions
- Standardization: Uniform interface across different tools and data sources
- Local Processing: No need to send sensitive data to external APIs
- Extensibility: Easy to add new tools and capabilities
- No Authentication: MCP servers run locally without API keys
- Rich Context: Servers can provide structured data and metadata
- Tool Discovery: Clients automatically discover available server capabilities
- Bidirectional: Servers can prompt clients for additional information
Learn more about MCP:
This MCP server sources its documentation from the official NativePHP website:
Primary Documentation URL: https://nativephp.com/docs
NativePHP is a framework that allows you to build native desktop applications using PHP. It provides:
- Desktop App Creation: Build native Windows, macOS, and Linux applications
- Web Integration: Leverage existing PHP web development skills
- Native Features: Access to system notifications, file dialogs, and OS integration
- Laravel Integration: Seamless integration with Laravel framework
This MCP server indexes the complete NativePHP documentation including:
- Installation and setup guides
- Configuration options
- API reference
- Examples and tutorials
- Best practices
Official NativePHP Resources:
- Website: https://nativephp.com
- Documentation: https://nativephp.com/docs
- GitHub: https://github.com/nativephp/laravel
- DocumentationScraper: Handles web scraping with rate limiting
- SQLite Database: Stores content with FTS5 search capabilities
- MCP Tools: Four exposed functions for documentation access
- Content Processing: BeautifulSoup-based HTML parsing and cleaning
docstable: Stores scraped documentation (url, title, content, section, subsection)docs_ftsvirtual table: Provides full-text search using SQLite FTS5
The server implements respectful scraping with 1-second delays between requests to avoid overwhelming the NativePHP servers.
mcp>=1.2.0- Model Context Protocol frameworkhttpx>=0.27.0- Async HTTP client for web scrapingbeautifulsoup4>=4.12.0- HTML parsing and content extractionlxml>=4.9.0- XML/HTML parser backend for BeautifulSoup
MIT License - See LICENSE file for details.