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 the 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.
The MCP PHP SDK is an 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 that the PHP ecosystem can rely on. For details about using MCP PHP SDK or contributing to it, see modelcontextprotocol/php-sdk.
Junie and the 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 coding agent in PhpStorm:
- Make sure that the MCP server can be accessed and started.
The specific method for starting an MCP server depends on the server’s implementation – please refer to the MCP server’s 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.
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 databases, or searching versioned documentation.
This is where the MCP shines: It bridges the gap between LLMs and dynamic, framework- and project-specific context and data. - Benefit from improved context when using Junie.
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.
A new chapter for MCP servers in PHP
The official MCP PHP SDK is more than just another SDK for creating MCP servers. Rather, it marks a significant contribution of the PHP community to the AI ecosystem, boosting PHP’s role as a language for creating AI tools.
The MCP 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’s GitHub repo.