Download the PHP package tinywan/webman-mcp without Composer
On this page you can find all versions of the php package tinywan/webman-mcp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tinywan/webman-mcp
More information about tinywan/webman-mcp
Files in tinywan/webman-mcp
Package webman-mcp
Short Description Modern stateless MCP server SDK for Webman
License MIT
Informations about the package webman-mcp
Webman MCP
简体中文
Stateless MCP Server SDK for Webman and PHP 8.2+.
- MCP protocol:
2026-07-28 - Methods:
server/discover, Tools, Resources, Prompts, Completion, and Subscriptions - Transport: stateless HTTP POST with bounded event-stream responses for
subscriptions/listen - Authentication and authorization: denied by default
See the official MCP 2026-07-28 release.
Production deployments should also follow the deployment guide for digest-only
Bearer credentials, governance controls, and redacted observability.
Installation
Run in a Webman 2.1+ project:
The package automatically publishes its configuration to
config/plugin/tinywan/webman-mcp.
Quick Start
The following example exposes a calculate Tool that adds two numbers.
1. Generate the files
This creates app/mcp/CalculatorServer.php and app/mcp/CalculatorTool.php.
2. Implement the Tool
Save it as app/mcp/CalculatorTool.php. Arguments and structured output are validated against their
JSON Schemas.
3. Register the Tool
Save it as app/mcp/CalculatorServer.php, then update
config/plugin/tinywan/webman-mcp/servers.php:
Anonymous access is enabled only for this local example. Production Servers should provide explicit
implementations of AuthenticatorInterface and AuthorizerInterface.
4. Verify and run
Call the Tool (replace the port if needed):
The response contains structuredContent.value: 13.
Commands
Run commands from the Webman project root:
| Command | Description |
|---|---|
php webman make:mcp-server <name> |
Generate a Server scaffold |
php webman make:mcp-tool <name> |
Generate a Tool scaffold |
php webman mcp:list |
List configured Servers and Tools |
php webman mcp:inspect |
Validate configuration and Schemas |
php webman mcp:install |
Publish individual missing configuration files |
mcp:install never overwrites existing files. It is not available when the command registration
configuration itself is missing.
Documentation
- Protocol compatibility
- Security
- Architecture
- Contributing and release checks
- Neuron AI application integration
- Pinned official schema
- Calculator example
- Library Resource example
- Assistant Prompt example
Calling from an Application
Applications can call a known Tool directly with the stateless HTTP contract shown in Quick Start. Keep the MCP URL, authentication, protocol metadata, and routing Headers on the server side; expose a separate business endpoint to browsers and mobile clients instead of forwarding arbitrary MCP URLs.
For Neuron AI 3.16, use McpClient::callTool() when the Tool name and arguments are already known:
WebmanMcpTransport is an application-side adapter. It maps Neuron's initialization sequence to this
SDK's stateless server/discover contract and adds the required 2026-07-28 metadata and routing
Headers. Do not add it to this Server SDK. See the
complete Neuron AI integration guide for the adapter, application Service,
HTTP endpoint, Docker networking, and McpConnector + Agent example.
Using with Codex and Other Agents
Start the Webman Server first and make sure the Agent can access its URL:
Codex CLI
Register the HTTP endpoint:
If the Server uses Bearer authentication, store the token in an environment variable and register its name instead of putting the token in the command:
Start a new Codex session after changing the MCP configuration, then ask:
Codex should discover the Server and call calculate, returning 13.
Other Agents
In the Agent's MCP settings, add a remote HTTP Server with these values:
| Setting | Value |
|---|---|
| Name | calculator |
| URL | http://127.0.0.1:8787/mcp/calculator |
| Transport | HTTP / Streamable HTTP |
| Protocol version | 2026-07-28 |
Configuration field names differ between Agents. A compatible Agent must support MCP 2026-07-28
and send the official per-request _meta, MCP-Protocol-Version, Mcp-Method, and conditional
Mcp-Name routing Headers. This SDK does not support initialize, sessions, protocol downgrade,
legacy GET/DELETE SSE transport, or event replay. subscriptions/listen uses an authorized,
bounded POST response and delivers events at most once.
If the Agent runs in Docker, a VM, or another host, 127.0.0.1 points to that environment rather than
the Webman host. Use an address reachable from the Agent, such as host.docker.internal, a container
service name, or the Server's LAN/domain address.
All versions of webman-mcp with dependencies
ext-json Version *
opis/json-schema Version ^2.4
webman/console Version ^2.1
workerman/webman-framework Version ^2.1