PHPackages                             padosoft/askmydocs-mcp-pack - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. padosoft/askmydocs-mcp-pack

ActiveLibrary[Framework](/categories/framework)

padosoft/askmydocs-mcp-pack
===========================

Framework-agnostic MCP (Model Context Protocol) plumbing for Laravel — contracts, multi-turn tool-calling orchestrator, stdio client bridge, audit trail, RBAC hooks. Powers AskMyDocs and reusable in any Laravel AI app.

v1.5.0(3w ago)02.5kMITPHPPHP ^8.3CI passing

Since May 15Pushed 3w agoCompare

[ Source](https://github.com/padosoft/askmydocs-mcp-pack)[ Packagist](https://packagist.org/packages/padosoft/askmydocs-mcp-pack)[ RSS](/packages/padosoft-askmydocs-mcp-pack/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)Dependencies (10)Versions (16)Used By (0)

padosoft/askmydocs-mcp-pack
===========================

[](#padosoftaskmydocs-mcp-pack)

[![Latest Version](https://camo.githubusercontent.com/8ba94c8cd5b99fde26187d35b3dff2c8ecb247d658f3aa8b3946301d8d3c9e7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061646f736f66742f61736b6d79646f63732d6d63702d7061636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/padosoft/askmydocs-mcp-pack)[![PHP Version](https://camo.githubusercontent.com/55a52e01231147251b3a8af0a9e1fc3886f5cbe2be12200891f5bd43182535dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7061646f736f66742f61736b6d79646f63732d6d63702d7061636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/padosoft/askmydocs-mcp-pack)[![Laravel Version](https://camo.githubusercontent.com/152da78eee7333d6202e8976517f7e3369d6186bd5a63b4643e8d88c1ed61acc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31312e7825323025374325323031322e7825323025374325323031332e782d4646324432302e7376673f7374796c653d666c61742d737175617265)](https://laravel.com)[![License](https://camo.githubusercontent.com/56f37203bc3affa03df5592dc9fafaf56b8bae911a76bbda32027b62d0b9b326/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7061646f736f66742f61736b6d79646f63732d6d63702d7061636b2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Tests](https://github.com/padosoft/askmydocs-mcp-pack/actions/workflows/tests.yml/badge.svg)](https://github.com/padosoft/askmydocs-mcp-pack/actions)[![Total Downloads](https://camo.githubusercontent.com/49e6837614db7c5f9008efafc8b0ee2e79258bfb9dca2a54522fa31074f69a50/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7061646f736f66742f61736b6d79646f63732d6d63702d7061636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/padosoft/askmydocs-mcp-pack)

[![AskMyDocs MCP Pack — Web Panel Banner](resources/AskMyDocs-MCP-Pack-Web-Panel-Banner.png)](resources/AskMyDocs-MCP-Pack-Web-Panel-Banner.png)

[![AskMyDocs MCP Pack — Admin Dashboard](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Dashboard.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Dashboard.png)

> **Framework-agnostic [Model Context Protocol](https://modelcontextprotocol.io) plumbing for Laravel.**Contracts, multi-turn tool-calling orchestrator, stdio + HTTP transports, audit trail, RBAC hooks. Powers [AskMyDocs](https://github.com/lopadova/AskMyDocs) and reusable in any Laravel AI app.

---

🚀 AI vibe-coding pack included
------------------------------

[](#-ai-vibe-coding-pack-included)

Every Padosoft package ships a `.claude/` folder with curated skills, rules, and commands so Claude Code, Cursor, Copilot, and any other LLM agent can drive the package productively from day one. The pack documents the extension points the framework guarantees as stable (contracts, events, config keys) and the ones that are intentionally private — so AI agents stop guessing and start composing.

```
# Drop into a fresh consumer project
composer require padosoft/askmydocs-mcp-pack
cp -r vendor/padosoft/askmydocs-mcp-pack/.claude ./
# Then ask Claude Code: "wire the orchestrator into my host bridge"
```

---

Table of contents
-----------------

[](#table-of-contents)

1. [Why this package?](#why-this-package)
2. [Features at a glance](#features-at-a-glance)
3. [Screenshots — Admin Web Panel](#screenshots--admin-web-panel)
4. [Comparison vs alternatives](#comparison-vs-alternatives)
5. [Installation](#installation)
6. [Quick start (3 minutes)](#quick-start-3-minutes)
7. [Architecture](#architecture)
8. [Core concepts](#core-concepts)
9. [Configuration reference](#configuration-reference)
10. [Recipes](#recipes)
11. [Extension points](#extension-points)
12. [Testing](#testing)
13. [Compatibility matrix](#compatibility-matrix)
14. [Roadmap](#roadmap)
15. [Changelog](#changelog)
16. [License](#license)

---

Why this package?
-----------------

[](#why-this-package)

[MCP](https://modelcontextprotocol.io) is the open standard Anthropic released in November 2024 for **LLM ⇆ tool** wire-format interoperability. Within months it was adopted by Cursor, Claude Desktop, VS Code, Cline, Continue, Sourcegraph Cody, OpenAI's Realtime API, and a long tail of editor extensions and agentic frameworks.

What MCP gives you:

- A **JSON-RPC 2.0 contract** for `initialize`, `tools/list`, `tools/call`, `resources/*`, `prompts/*`.
- Transport choice — **stdio** (child process) for desktop tools and **HTTP/SSE** for cloud gateways.
- A **growing public catalog** of servers (filesystem, GitHub, Slack, Postgres, Notion, Sentry, …) you can plug into any client.

What MCP does **not** give you (and what this pack adds):

- A **multi-turn tool-calling loop** that drives the model → tools → model → tools cycle with budget caps and audit trail.
- **RBAC / tenant gates** in front of every tool invocation.
- An opinionated **audit table** with SHA-256 input/output hashes, duration, status, and error excerpts — the kind of trail an EU AI-Act audit will ask for.
- **Provider-agnostic** integration: the orchestrator does NOT bind the OpenAI / Anthropic / Gemini SDK. You implement a 30-line `McpHostBridgeContract` against your existing chat manager, and the pack handles the rest.

That is exactly the shape AskMyDocs needed for v7.0. We extracted it so the next Laravel AI app does not have to reinvent it.

---

Features at a glance
--------------------

[](#features-at-a-glance)

✓Capability🔌**Two transports out of the box** — `stdio` (Symfony Process) and `http` (Guzzle via Laravel HTTP client).🧠**Multi-turn tool-calling orchestrator** — bounded by `max_iterations`, with deterministic message reshaping.🛡️**Tenant-scoped tool catalog** — `forTenant($id)` filters by tenant; cross-tenant leakage is structurally impossible.🚦**Per-call RBAC** — `McpToolAuthorizerContract` gates every tool BEFORE it appears in the catalog.🧾**Hash-only audit trail** — `mcp_tool_call_audit` rows store SHA-256 of input + result, NOT raw payloads.🔄**Cached handshakes** — `initialize` + `tools/list` are cached per (tenant, server) for 5 min by default.🧪**Stub-friendly tests** — `McpClient::useTransportResolver()` swaps the transport with a one-line closure.📦**Zero-AI-SDK lock-in** — pluggable host bridge; works with any provider.📊**Production telemetry** — every tool call carries `duration_ms`, status, and error excerpt.🧰**Artisan diagnostics** — `php artisan mcp-pack:ping` walks the registry and prints a per-server status table.---

Screenshots — Admin Web Panel
-----------------------------

[](#screenshots--admin-web-panel)

The companion SPA ([`padosoft/askmydocs-mcp-pack-admin`](https://github.com/padosoft/askmydocs-mcp-pack-admin), post-v7.0 cycle) consumes the v1.4 admin REST routes shipped here. Light + dark themes ship out of the box; every action is keyboard-reachable and audit-logged.

### Dashboard

[](#dashboard)

The landing surface — fleet health, breaker open-count, recent audit volume per server, and at-a-glance latency percentiles.

LightDark[![Dashboard — light](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Dashboard.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Dashboard.png)[![Dashboard — dark](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Dashboard-dark.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Dashboard-dark.png)### Servers + per-server detail + tools + circuit breakers

[](#servers--per-server-detail--tools--circuit-breakers)

Servers list filters by tenant + transport + status. Drill in for the handshake-cached tool catalog, the most recent audit slice, and the breaker state for every (server, tool) pair — read from `CircuitBreaker::peekState()` so the dashboard NEVER consumes the half-open probe slot just by polling.

[![Servers list](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Servers.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Servers.png)

[![Server detail](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Server-details.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Server-details.png)

[![Tools](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Tools.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Tools.png)

[![Circuit breakers](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Circuit-Breakers.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Circuit-Breakers.png)

### Audit + audit detail + per-server audit

[](#audit--audit-detail--per-server-audit)

Paginated audit query over the configurable `mcp-pack.audit_model`, tenant-scoped by default. Filters: `server_id`, `tool_name`, `status`, date range. Click a row for the SHA-256 input/output hashes + redacted error excerpt + duration.

[![Audit logs](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Audit-logs.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Audit-logs.png)

[![Audit log detail](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Audit-logs-details.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Audit-logs-details.png)

[![Per-server audit slice](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Server-details-audit.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Server-details-audit.png)

### Prompts + API playground + Settings

[](#prompts--api-playground--settings)

Prompt catalog (JSON-RPC `prompts/list` / `prompts/get`), an embedded API playground for verifying the routes against the host's auth middleware, and a settings surface mirroring the `mcp-pack.*` config block.

[![Prompts](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Prompt.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Prompt.png)

[![API playground](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-API-playground.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-API-playground.png)

[![Settings](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Settings.png)](resources/screenshoots/AskMyDocs-MCP-Pack-Web-Panel-Settings.png)

---

Comparison vs alternatives
--------------------------

[](#comparison-vs-alternatives)

Feature**askmydocs-mcp-pack**`laravel/mcp` (Laravel first-party)`php-llm/mcp-sdk` (community)Roll-your-ownMCP **client** support (call upstream)✅ stdio + http❌ server-only✅ stdio + httpDIYMCP **server** support (expose tools)⚠️ via host✅✅DIYMulti-turn tool-calling **loop**✅❌❌DIY (~300 LOC)Provider-agnostic host bridge✅n/a❌ (OpenAI-coupled)DIYTenant boundary built-in✅ `forTenant($id)`❌❌DIYAudit trail with hashes✅ migration shipped❌❌DIY (~ADR + migration)RBAC hook before tool exposure✅ contract❌❌DIY (middleware?)Cached handshake✅ 5min default❌❌DIYStub transport for tests✅ one-line closure❌partialDIY.claude/ vibe-coding pack✅❌❌DIYLicenseMITMITMITn/a`laravel/mcp` is excellent for **exposing** Laravel as an MCP server — this pack and `laravel/mcp` are complementary, not competing. Use both together: `laravel/mcp` to expose your KB as a server, and this pack to **consume** other MCP servers from inside your chat flow.

---

Installation
------------

[](#installation)

```
composer require padosoft/askmydocs-mcp-pack
```

Publish config + migrations (optional — both load automatically):

```
php artisan vendor:publish --tag=mcp-pack-config
php artisan vendor:publish --tag=mcp-pack-migrations
php artisan migrate
```

Service provider is **auto-discovered** via `composer.json::extra.laravel.providers`.

---

Quick start (3 minutes)
-----------------------

[](#quick-start-3-minutes)

### 1. Implement the host bridge

[](#1-implement-the-host-bridge)

This is the one piece you must write — about 30 lines of glue against your existing chat provider:

```
