Give Claude, ChatGPT and Claude Code secure access to your PHP app.
This kit is a remote MCP server plus the OAuth 2.1 authorization server that MCP clients expect, in plain PHP and SQLite. Put it on your server, write your tools in one file, plug in your existing login, and your users can connect your app from Claude in a minute.
Multi-user: every tool call knows the signed-in user
Example tools (a small notes app) to copy from
A 41-check end-to-end test, Apache .htaccess and nginx config, and a README that walks you through install and connection
Security
PKCE S256 only, single-use codes, only hashes of tokens stored, refresh token reuse revokes the connection, https or localhost redirects only, CSRF protection and login lockout, a consent page that can't be framed.
Requirements
PHP 8.1 or newer with pdo_sqlite, Apache with mod_rewrite or nginx, HTTPS in production. No framework, no Composer, no build step.
Tested
The included test suite passes on PHP 8.1 and 8.3, and the full OAuth + MCP flow runs with the official MCP TypeScript SDK client (protocol 2025-11-25). Extracted from a production PHP app whose MCP connector is used every day from Claude.
License: unlimited projects of your own and for your clients. No resale or redistribution.
Give Claude, ChatGPT and Claude Code secure access to your PHP app.
This kit is a remote MCP server plus the OAuth 2.1 authorization server that MCP clients expect, in plain PHP and SQLite. Put it on your server, write your tools in one file, plug in your existing login, and your users can connect your app from Claude in a minute.
Multi-user: every tool call knows the signed-in user
Example tools (a small notes app) to copy from
A 41-check end-to-end test, Apache .htaccess and nginx config, and a README that walks you through install and connection
Security
PKCE S256 only, single-use codes, only hashes of tokens stored, refresh token reuse revokes the connection, https or localhost redirects only, CSRF protection and login lockout, a consent page that can't be framed.
Requirements
PHP 8.1 or newer with pdo_sqlite, Apache with mod_rewrite or nginx, HTTPS in production. No framework, no Composer, no build step.
Tested
The included test suite passes on PHP 8.1 and 8.3, and the full OAuth + MCP flow runs with the official MCP TypeScript SDK client (protocol 2025-11-25). Extracted from a production PHP app whose MCP connector is used every day from Claude.
License: unlimited projects of your own and for your clients. No resale or redistribution.