MCP Server

Expose this documentation to AI coding assistants over the Model Context Protocol

MCP Server

This site doesn't just render the OI Laravel documentation for humans — it also serves it to AI coding assistants over the Model Context Protocol (MCP).

Once connected, your assistant (Claude Code, Cursor, Gemini CLI, OpenAI Codex, Mistral Vibe Code, …) can search and read the oi-lab/oi-laravel-* package docs directly while you work on any project — no copy-pasting, no stale local copies.

Why connect it

  • Grounded answers — the assistant reads the real, current documentation instead of guessing.
  • Works from any project — one server, reused across every repository you work in.
  • Always up to date — it queries the live docs (search index + navigation), so new pages appear automatically.

MCP server vs. package skills. This server lets your assistant search and read the docs of any package from any project. It complements the per-package AI skills, which teach the assistant a package's API once it's installed in your app — see Skills & AI.

What the server exposes

The server is named documentation and provides three tools:

ToolWhat it does
search-documentationFull-text search across every page. Returns page slugs + excerpts. Scope with a package argument.
list-documentation-packagesList all documented packages, or every page of one package.
get-documentation-pageRead a full page as Markdown, given its slug.

The typical flow the assistant follows: searchread the page it needs.

Two ways to connect

You can connect over either transport — pick the one that fits your setup:

TransportBest forEndpoint / command
Local (stdio)You have this repository checked out locallyphp artisan mcp:start documentation
Remote (HTTP)The docs site is deployed and reachable over the networkPOST /mcp/documentation
  • Local (stdio) is the most reliable for a single machine: the client launches the server as a child process. It requires PHP and a checkout of this project.
  • Remote (HTTP) is ideal when the site is hosted, so several people (or CI) share one server.

Throughout the guides we use these two reference values — adapt them to your setup:

bash
# Local (stdio): absolute path to THIS project's artisan binary
php /absolute/path/to/OiDevDocs/artisan mcp:start documentation

# Remote (HTTP): your deployed docs URL (local Herd example shown)
https://dev.olacombe.com/mcp/documentation

The HTTP route is rate-limited (60 requests/minute). If you put the site behind authentication, add the matching header/token in your client config.

Per-tool guides

Not using an MCP client? The same search, discovery and page-retrieval capabilities are available over plain HTTP — see the REST API reference.

Verify the server first

Before wiring up a client, confirm the server responds using the built-in inspector:

bash
php artisan mcp:inspector documentation

This launches the MCP Inspector and prints ready-to-copy client settings. Never run php artisan mcp:start by hand in a terminal — it waits for a client on stdin and will appear to hang.

Project under MIT License.
Design by