Repository navigation
Releases: nafphp/mcp
Release list
v0.2.7 — OAuth authentication for each supplied request
OAuth authentication now evaluates the exact PSR-7 request passed to the MCP authenticator. A shared authenticator can process a valid bearer token, a missing or invalid token, and another caller's token independently. This also covers ordinary RequestInterface instances used by custom adapters.
The optional OAuth integration requires naf/oauth-server 0.2.6 or later; Composer excludes older combinations. OAuth remains optional for applications using the default file-token driver. Applications using OAuth should update both packages together. No schema migration is required by this correction.
The development lock now uses released OAuth Server 0.2.6 and Framework 0.2.12, so CI executes the supplied-request HTTP regression instead of skipping it with the previous Framework lock. Validation includes 16 tests / 92 assertions, strict Composer validation, style checks and CI on PHP 8.3 and 8.5. Regression coverage checks explicit PSR-7 requests and sequential authenticated, missing-token and invalid-token calls through POST /mcp.
v0.2.6 — Literal OAuth scopes and bounded MCP requests
OAuth scopes now match literally in MCP authorization. A grant for notes:* or * no longer authorizes unrelated tool scopes; registered file-token identities retain their wildcard behavior. Current user permissions and the registry's OR semantics are preserved.
MCP JSON requests are read with a configurable size limit before decoding. mcp:transport:max_request_bytes defaults to 1 MiB; oversized requests return HTTP 413. Configure a positive integer if your application needs a different limit, and keep proxy/PHP input limits appropriate for the host.
Regression checks cover authenticated listing/calling, file-token compatibility, partial request streams and the HTTP boundary. Package tests passed on PHP 8.3, 8.4 and 8.5, with style and Composer validation. Applications using OAuth should also update naf/oauth-server to 0.2.5 or later.
v0.2.5 — Streamable HTTP and OAuth tools
Adds stateless MCP Streamable HTTP to the existing /mcp endpoint, with JSON responses by default and optional lazy SSE progress and results. Negotiates protocol versions 2025-11-25, 2025-06-18 and 2025-03-26, validates request media types and configured origins, and handles notifications with HTTP 202.
Tools now receive JSON Schema input validation and can publish structured results, output schemas and metadata. Existing MCP content blocks are preserved; handler failures are logged and returned with a generic message. Optional OAuth authentication reuses naf/oauth-server, including current account permissions, protected-resource metadata and linked-user tools. The MCP POST route supplies its own narrow CSRF exemption.
Upgrade notes: requires PHP 8.3+ and naf/framework 0.2.8+. Clients must send Accept: application/json, text/event-stream and a complete initialize request. Previously tolerated invalid arguments now return JSON-RPC -32602; extra object properties require an explicit schema allowance. GET streaming, sessions and resumability are not implemented.
Validated with 11 tests / 70 assertions, real HTTP streaming checks, Composer validation and style checks. The merged release commit passes CI on PHP 8.3 and 8.5.
v0.2.4 — Token commands register after CLI boot
The MCP plugin declares that it boots after naf/cli when CLI is installed. Its token commands therefore register after the command registry exists, independently of Composer's package discovery order. An absent optional target is ignored by the framework boot resolver.
The public MCP API and configuration are unchanged. Package CI passed on the release commit.
v0.2.3 — Shared code style
Source, tests and templates now follow the shared NAF code style, and a style workflow keeps
them there. The formatter is a development dependency and does not reach anything you install.
No behaviour changes. The API, the configuration and the dependency constraints are the
same as in v0.2.2; upgrading needs no action.
The README also drops its code-style section. It repeated what this package's AGENTS.md
already says, and contributor guidance belongs there rather than in a file that ships inside
the Composer package. What remains is the introduction, the link to the documentation, the
install command and the licence — the same shape every package in the collection now has.
Validation: the tagged commit passed CI, and its tree passed the suite with 3 tests, 14 assertions.
v0.2.2 — Agent guidance in Composer installations
Composer installations now include a package-specific AGENTS.md covering tool registration, transport integration and protocol verification. It explains the NAF host/plugin boundary, prefers existing framework functionality, and provides concrete usage examples, source entry points and the actual verification commands.
The guide links the shared contribution and release procedures and requires user documentation to be reviewed alongside behavior changes. The links also work when the package is cloned on its own.
Validation: package CI passed for the released commit; agent-guide paths, API references and example syntax were checked against the implementation.
Version note: this is a documentation and package-content patch from v0.2.1 to v0.2.2. Runtime code, public APIs and dependency constraints are unchanged; no application-code migration is required.
v0.2.1 — token commands printed the old CLI binary
Corrects the usage examples printed by mcp:token:create, mcp:token:list and mcp:token:revoke.
All three told the reader to run vendor/bin/nix, which the rename to NAF replaced with vendor/bin/naf. The commands themselves always worked; only the advice they printed named a binary that no longer exists.
v0.2.0 — NixPHP is now NAF
NixPHP is now NAF. See naf/framework v0.2.0 for why.
| before | after | |
|---|---|---|
| Composer package | nixphp/mcp |
naf/mcp |
| PHP namespace | NixPHP\MCP\ |
Naf\MCP\ |
| Composer type | nixphp-plugin |
naf-plugin |
Plugins are discovered by their Composer package type, so this plugin needs naf/framework:^0.2 — under the old framework it is not loaded at all.
Requirements
Requires naf/framework:^0.2.