DocForge MCP Tools
Let AI agents search and read LaraDashboard documentation synced by DocForge using search-docs, get-doc, list-docs, and list-doc-projects MCP tools.
DocForge MCP Tools
When the DocForge module is installed, LaraDashboard registers MCP tools that let AI agents search and read synced documentation from the database — the same content served at your public docs URL (e.g. /docs).
Agents should prefer these tools over guessing LaraDashboard behavior.
How it works
GitHub markdown (.md)
↓ DocForge sync
docforge_documents (DB)
↓ MCP tools
AI agent context
MCP tools read synced database content, not the GitHub API directly. This matches what visitors see on the public docs site.
Tools
| Tool | Description |
|---|---|
list-doc-projects |
Active documentation projects, versions, and base routes |
search-docs |
Full-text search (SQL; optional Scout when installed) |
list-docs |
Paginated browse with optional filters |
get-doc |
Full markdown body for one page |
All require the mcp:docs.read ability (mapped to docforge.docs.read permission).
Typical agent workflow
- Discover projects
list-doc-projects
Returns project_route values (e.g. docs) and version slugs.
- Search
search-docs { "query": "MCP token", "project_route": "docs" }
- Read full page
get-doc {
"project_route": "docs",
"document_slug": "user-guide/mcp-server"
}
Response fields
Summary responses include:
title,slug,description,excerptproject_route,version_slugpublic_url— browser URL for the pagefile_path— original repo path
get-doc also returns content (markdown), headings, and frontmatter.
Permissions
Grant docforge.docs.read to roles that should read documentation via MCP. Admin and Superadmin receive it automatically when the DocForge permission migration runs.
Module registration
DocForge registers tools in DocForgeService::bootstrap():
McpFilterHook::TOOLS— four documentation toolsMcpFilterHook::ABILITY_PERMISSION_MAP—mcp:docs.read
Implementation lives in:
Modules\DocForge\Services\Mcp\DocForgeMcpDocumentServiceModules\DocForge\Mcp\Tools\*
Adding documentation for agents
- Add or edit markdown under your docs repository (e.g.
docs/LaraDocs/). - Let DocForge sync the project (manual sync or scheduled job).
- Agents can immediately
search-docsandget-docthe new pages.
Recommended pages for agent accuracy:
- Setup guides (
user-guide/*) - Developer conventions (
developer-guide/*) - Module-specific docs