Skip to the content.

JsonRpc Server Bundle

Modern JSON-RPC 2.0 server for Symfony — built around attributes, DTOs, and the rest of the framework you already use. Speaks JSON-RPC for your own clients, MCP for AI agents, and NDJSON / SSE when you need to stream.

composer require knetesin/json-rpc-server
use Knetesin\JsonRpcServerBundle\Attribute as Rpc;

#[Rpc\Method('user.update', roles: ['ROLE_USER'])]
final class UpdateUser
{
    public function __invoke(UpdateUserRequest $req, Context $ctx): UserResponse { /* … */ }
}

That’s a full handler — no routing, no controllers, no manual validation.

Read the docs

Highlights

Repository

github.com/knetesin/json-rpc-server · Packagist · Issues · Discussions

License

MIT.