Connect MCP Servers to Junie in PhpStorm
The Model Context Protocol (MCP) is an open standard introduced by Anthropic. Think of it as a USB-C port for AI: a consistent way to plug the AI models your AI agent uses into specific tools and data sources.
You can connect Junie, the AI coding agent by JetBrains, to a wide variety of officially provided or community built MCP servers, or build your own MCP server using one of the available SDKs – including the brand-new MCP PHP SDK.
About MCP PHP SDK
MCP SDKs are lightweight frameworks that handle the protocol details so that developers can focus on the application functionality that AI agents will use.
MCP PHP SDK is the official MCP SDK built as a joint effort by the PHP Foundation, Anthropic’s MCP team, and Symfony. The goal of the project is to provide a framework-agnostic, production-ready reference implementation the PHP ecosystem can rely on. For details about using MCP PHP SDK or contributing to it, see modelcontextprotocol/php-sdk.
Junie + MCP
Whether you are building your own MCP server or using an existing one, here’s how to make it work with the Junie AI agent in PhpStorm:
- Make sure that the MCP server can be accessed and started.
The specific way of starting an MCP server depends on this server’s implementation – please refer to the MCP server documentation for instructions. - Configure Junie in PhpStorm to connect.
To add the MCP server to Junie, press ⇧Shift twice to open the search window and search for “MCP Settings”. On the MCP Settings page, you can see the list of connected servers and add or edit JSON configurations for the MCP servers in the~/.junie/mcp.json
file.
To configure an MCP server at the project level, manually add anmcp.json
file with your desired server configurations to the.junie/mcp
folder in the project root.
To view the list of actions that Junie can perform through a configured MCP server, locate the server in the MCP Settings list and expand the Status drop-down list.
For example, with the Laravel Boost MCP server, Junie gets useful tools for working with Laravel projects, such as listing Artisan commands, routes, or config files, reading logs, querying the database, or searching versioned documentation.
This is where MCP shines: It bridges the gap between LLMs and dynamic, framework- and project-specific context and data. - Start using new commands and context inside your IDE.
When running a prompt, Junie analyzes what commands registered with the configured MCP servers are relevant, and executes them through the respective MCP server.
The Junie coding agent keeps evolving. Join the conversation in our Junie Discord community and help shape what’s next for Junie.
New chapter for MCP servers in PHP
While you could use any SDK implementation to create MCP servers for PHP projects, the official MCP PHP SDK boosts the contribution of the PHP community into the AI ecosystem, both within the PHP realm and beyond.
The PHP SDK maintainers encourage PHP developers to submit their MCP integrations for PHP frameworks and tools – Laravel, Symfony, WordPress, custom APIs, and more – to be listed in the SDK GitHub repo.