← All projects
MCPMCP SDKAgentTool Callingsymfony-ai

Symfony Code Mode

Your Symfony tools, on demand. Your application stays in control. Symfony Code Mode exposes two MCP entry points: search_tools discovers approved capabilities, and execute_tools invokes them with JSON. Adding tools keeps the advertised interface fixed; agents retrieve individual contracts when needed. We started with sandboxed PHP in gVisor, letting agents join and filter results before returning them to the model. To simplify adoption, we made JSON calls to existing Symfony handlers the default, running over ordinary authenticated HTTP. Discovery now builds on Symfony AI’s proposed BM25 search components. The demo shows an agent discovering an article reader and retrieving its title. Revoke permission, and the identical follow-up is denied before the handler runs, even though the agent already knows the contract. A fresh search hides it. Built with Symfony AI and the PHP MCP SDK, with shared Security voters, Maker scaffolding and profiler traces. Real agent footage and a separate Hugging Face Inference Providers conversation show the actual calls, permission checks and measured usage.

No video yet

1 comment

IV
Illia Vasylevskyi 13 days ago

Cool idea! Will check how it play out, and maybe yoink some implementation. I'm using code mode in my harness https://github.com/ineersa/agent-core/blob/main/docs/tools.md#code_mode. I basically expose it as a tool to model, where model can write any PHP scripts and use functions i expose, for example tool(name, arguments) which gives model access to any coding agent tool available (including MCPs), and it can use it results as a simple PHP variable. It kinda works, pretty fun, I don't see a lot of benefits in day to day coding agent work, but it unlocks some interesting scripting of workflows.

Join the conversation with your SymfonyConnect account. Sign in