Download the PHP package padosoft/askmydocs-mcp-pack without Composer

On this page you can find all versions of the php package padosoft/askmydocs-mcp-pack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package askmydocs-mcp-pack

padosoft/askmydocs-mcp-pack

Latest Version PHP Version Laravel Version Tests Total Downloads

Framework-agnostic Model Context Protocol plumbing for Laravel. Contracts, multi-turn tool-calling orchestrator, stdio + HTTP transports, audit trail, RBAC hooks. Powers AskMyDocs and reusable in any Laravel AI app.


πŸš€ 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.


Table of contents

  1. Why this package?
  2. Features at a glance
  3. Screenshots β€” Admin Web Panel
  4. Comparison vs alternatives
  5. Installation
  6. Quick start (3 minutes)
  7. Architecture
  8. Core concepts
  9. Configuration reference
  10. Recipes
  11. Extension points
  12. Testing
  13. Compatibility matrix
  14. Roadmap
  15. Changelog
  16. License

Why this package?

MCP 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:

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

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

βœ“ 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

The companion SPA (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

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

Light Dark

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.

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.

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.


Comparison vs alternatives

Feature askmydocs-mcp-pack laravel/mcp (Laravel first-party) php-llm/mcp-sdk (community) Roll-your-own
MCP client support (call upstream) βœ… stdio + http ❌ server-only βœ… stdio + http DIY
MCP server support (expose tools) ⚠️ via host βœ… βœ… DIY
Multi-turn tool-calling loop βœ… ❌ ❌ DIY (~300 LOC)
Provider-agnostic host bridge βœ… n/a ❌ (OpenAI-coupled) DIY
Tenant boundary built-in βœ… forTenant($id) ❌ ❌ DIY
Audit trail with hashes βœ… migration shipped ❌ ❌ DIY (~ADR + migration)
RBAC hook before tool exposure βœ… contract ❌ ❌ DIY (middleware?)
Cached handshake βœ… 5min default ❌ ❌ DIY
Stub transport for tests βœ… one-line closure ❌ partial DIY
.claude/ vibe-coding pack βœ… ❌ ❌ DIY
License MIT MIT MIT n/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

Publish config + migrations (optional β€” both load automatically):

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


Quick start (3 minutes)

1. Implement the host bridge

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

2. Bind it in AppServiceProvider

3. Register at least one MCP server

In-memory (config-driven):

Or back it with your own Eloquent model β€” see Recipes.

4. Drive a chat turn

Behind the scenes the orchestrator:

  1. Looks up enabled servers for tenant acme.
  2. Handshakes each one (cached for 5 min).
  3. Filters tools through your McpToolAuthorizerContract.
  4. Hands the catalog to your MyHostBridge::chat().
  5. If the model asks for a tool: invokes it through tools/call, appends the result, and loops back.
  6. Audits every call into mcp_tool_call_audit.

5. Sanity-check


Architecture

Five contracts, three transports, one orchestrator. The blast-radius of swapping any one of them is bounded by the contract.


Core concepts

McpServerContract

A single MCP endpoint your host can talk to. Carries:

Default implementation: InMemoryMcpServer. Production: subclass it on top of your Eloquent model.

McpServerRegistryContract

Per-tenant catalog of McpServerContract entries. The orchestrator always asks forTenant($id) β€” never a global all(). Cross-tenant leakage is structurally impossible.

Default implementation: InMemoryMcpServerRegistry. Production: back it with your own McpServer Eloquent model.

McpHostBridgeContract

The 30-line wrapper around your existing chat manager (OpenAI, Anthropic, OpenRouter, Gemini, …). The pack does NOT bind any AI SDK β€” this is what keeps it provider-agnostic.

McpToolAuthorizerContract

RBAC gate. Called BEFORE the tool appears in the model's catalog, so denied tools never even reach the prompt token budget.

Default implementation: NullMcpToolAuthorizer (allows everything β€” fine for prototypes, MUST be replaced in production).

McpToolContract

The unit of work. Most consumers don't implement this directly β€” RemoteMcpTool is built from the upstream server's tools/list response and used by the orchestrator. You implement it only if you need to expose an in-process tool with no upstream MCP server (uncommon).


Configuration reference

config/mcp-pack.php:

Key Env var Default Purpose
tool_calling.enabled MCP_PACK_TOOL_CALLING_ENABLED false Master kill-switch.
tool_calling.max_iterations MCP_PACK_TOOL_CALLING_MAX_ITERATIONS 3 Hard cap on tool-calling loops per chat turn.
tool_calling.default_tool_choice MCP_PACK_TOOL_CHOICE auto OpenAI-style hint passed to the bridge.
handshake.ttl_seconds MCP_PACK_HANDSHAKE_TTL 300 How long to cache initialize + tools/list.
audit_model MCP_PACK_AUDIT_MODEL McpToolCallAudit::class Override to subclass the audit model.

Recipes

Recipe 1 β€” back the registry with an Eloquent model

Recipe 2 β€” Spatie-permission-backed authorizer

Recipe 3 β€” Claude Desktop / Cursor MCP server over stdio

Recipe 4 β€” remote MCP gateway over HTTPS

Recipe 5 β€” coexist with a host-owned audit table

If your host already owns a mcp_tool_call_audit table that pre-dates this pack, the package migration is a no-op (Schema::hasTable('mcp_tool_call_audit') guards both up() and down()). To keep the host's operator-forensics columns (raw redacted payload, user-FK, error blob, …) AND satisfy the package contract, ship ONE additive host migration and one model subclass:

Now every package ToolInvoker::audit() row fills BOTH schemas; legacy host writes continue to work; the host's existing admin UI and operator-forensics queries keep rendering the same way they always did.

Recipe 6 β€” fail fast under upstream outage (v1.3.0)

Drop in the circuit breaker + retry budget so a flaky MCP server doesn't pin every worker on a long timeout:

ToolInvoker automatically routes through the mediator when either knob is enabled; consumers don't change a line of code. The breaker state is per (server_id, tool_name); the budget is per (tenant_id, server_id) so cross-tenant isolation (R30) holds even under load.


Extension points

Hook Default Override when…
McpHostBridgeContract NullMcpHostBridge (throws) Always β€” wire your provider stack.
McpServerRegistryContract InMemoryMcpServerRegistry You want DB-backed admin UI for server CRUD.
McpToolAuthorizerContract NullMcpToolAuthorizer (allow-all) Always in production β€” wire RBAC + tenant policy.
McpToolCallingService Bound via SP Subclass for custom logging / retry / circuit-breaker logic.
McpHandshakeService Bound via SP Subclass to persist handshakes in a DB column.
McpToolCallAudit Built-in model Subclass + override mcp-pack.audit_model config.
McpClient::useTransportResolver() null (uses transport from server) In tests β€” swap to a stub transport.

Testing

The pack ships its own PHPUnit + Orchestra Testbench setup. To run its tests:

To test your own host using the pack's stubs:

End-to-end Playwright coverage in AskMyDocs exercises:


Compatibility matrix

PHP Laravel Status
8.3 11.x βœ… tested in CI
8.3 12.x βœ… tested in CI
8.3 13.x βœ… tested in CI
8.4 11.x βœ… tested in CI
8.4 12.x βœ… tested in CI
8.4 13.x βœ… tested in CI
8.5 13.x βœ… tested in CI

Roadmap

Version Status Highlights
v1.0.0 βœ… shipped 2026-05-15 Contracts + orchestrator + stdio/http transports + audit + ping.
v1.0.1 βœ… shipped 2026-05-15 Defensive up()/down() guards on the audit-table migration so the package coexists with a host-owned mcp_tool_call_audit. Recipe 5 walks the coexistence pattern.
v1.1.0 βœ… shipped 2026-05-15 SseJsonRpcTransport for remote HTTP+SSE gateways; JSON-RPC resources/list + resources/read; JSON-RPC prompts/list + prompts/get.
v1.2.0 βœ… shipped 2026-05-15 First-class server-side β€” same package exposes a Laravel app AS an MCP server (stdio long-lived runner + HTTP route + JsonRpcRequestHandler dispatching initialize / tools/list / tools/call / resources/* / prompts/* to a host-supplied catalog + auth + RBAC).
v1.3.0 βœ… shipped 2026-05-15 Per-tool circuit breaker (closed / open / half_open with TTL recovery) + adaptive retry budget (token-bucket per (tenant, server) with exponential backoff capped at maxBackoffMs) + 5 telemetry events. Opt-in, default OFF.
v1.4.0 βœ… shipped 2026-05-15 Admin REST backend β€” read-mostly routes at /api/admin/mcp-pack/{servers,audit,circuit-breaker} registered by the package SP behind MCP_PACK_ADMIN_ENABLED=true. Middleware-driven auth (host wires Sanctum + RBAC). NO React/Vue code β€” this is the backend the separate padosoft/askmydocs-mcp-pack-admin SPA consumes. CRUD writes deferred to v1.5.0 with a writable registry contract.
─ ─ ─
post-v7.0 cycle πŸ“… separate package padosoft/askmydocs-mcp-pack-admin β€” standalone React SPA companion. Same pattern as padosoft/laravel-flow-admin / padosoft/laravel-pii-redactor-admin. Cross-mountable under /admin/mcp/ in any Laravel host that depends on this package + v1.4. Ships in its own repo with its own R36 cycle once AskMyDocs's v7.0/W6 host integration is green.

The v1.1 β†’ v1.4 cycle ships before the AskMyDocs host adopts the package. Consumers willing to ride v1.0 today are welcome to do so β€” the public API surface is stable and won't break before v2 β€” but AskMyDocs's own host integration is intentionally deferred to land over the complete v1.4 feature set (orchestrator + transports + server-side + circuit breaker + admin REST routes) in a single integration cycle rather than four partial passes. See lopadova/AskMyDocs roadmap for the host-side milestones (v7.0/W2 β†’ W6).


Changelog

v1.0.0 β€” planned


License

MIT Β© Padosoft. See LICENSE.


All versions of askmydocs-mcp-pack with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/events Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
symfony/process Version ^7.0|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package padosoft/askmydocs-mcp-pack contains the following files

Loading the files please wait ...