A developer built an MCP server and OAuth2 flow from scratch in PHP
elixon · reddit · 2026-07-22
The author says they implemented a non-streamable HTTP MCP server from scratch in PHP.
- The MCP implementation is about 1,200 lines of code and is currently public alpha.
- They also wrote an OAuth2 implementation from scratch in roughly 1,000 lines without dependencies.
- The post emphasizes that the project was done to understand the protocol deeply rather than to avoid existing libraries.
- The practical takeaway is that MCP and OAuth2 are both approachable to implement manually if you want to learn the full stack behavior.
Related event: PHP Implementation of MCP Server and OAuth2(2 posts)→
More from coding & agent
- Reddit user wants a cheap open-source agent to sort receipts, detect payments and draft emails — puttputt77 · 2026-07-22
- YC founder says cloud coding agents fail on setup, not on the agent itself — Business_Teacher766 · 2026-07-22
- Goose turns Claude and Codex into a repeatable video production workflow — JaynitMakwana · 2026-07-22
- AgentDebugX is an open-source closed-loop debugger for LLM agents — UIUC-CS · 2026-07-22
- Framework turns a trader’s transcripts into a Python paper-trading bot — tom_doerr · 2026-07-22
- A scan of 36 MCP servers found a third failed agent-usability checks — Normal_Sherbert_1520 · 2026-07-22