Skip to main content

Model Context Protocol: What It Is and How to Use It

MCP (Model Context Protocol) is an open standard based on JSON-RPC that defines how LLMs connect to tools, services, and data. With MCP, developers don't need to build custom integrations for every single tool.

The protocol supports two-way communication: AI agents can not only request and receive data, but also perform actions in external applications or even directly in the operating system. In short, MCP provides a universal interface that makes it easier for LLMs to work with external tools and resources.

For more details about the concept and usage, see the documentation from the creators of MCP — Anthropic. A curated list of MCP servers is available in the repository: https://github.com/modelcontextprotocol/servers.

Connecting MCP Server in Explyt

To connect MCP server in the Explyt Plugin, open the IntelliJ IDEA settings and go to Explyt -> MCP Servers.
Depending on the type of server you're connecting, choose the protocol type: STDIO, SSE, or HTTP.

STDIO

STDIO (Standard Input/Output) is mainly used for MCP servers running locally. This command should start the MCP server on your machine. Before connecting, make sure the startup command runs successfully (for example, that the Docker image is downloaded and starts correctly with the required arguments).

To connect, click the add button(Add Server) button and enter the executable command and its arguments:

SSE/HTTP

For network connections, enter the URL of the desired MCP server in the corresponding field. Some servers require authentication via Bearer or other methods. To connect, obtain the necessary key and specify it in the "Request Headers" section:

Connecting and Using

To establish a connection, select the configuration you added and click the run icon (Connect) button. After a successful connection, the server status will change to "Connected", and its tools will be available in the tools section (Tools) section of the Explyt Agent chat header explyt agent plugin icon. To see the list of tools, open the dropdown menu with the connected server’s name.

JSON Configuration

The list of configured servers is stored in the mcp_servers.json file in the .explyt folder inside your home directory (~$USER/.explyt/mcp_servers.json in UNIX, $env:USERPROFILE\.explyt\mcp_servers.json in Windows Powershell). You can open and edit this file by clicking the config button (Open Config File) button. After making changes, save the file, return to the MCP settings, and click refresh button (Refresh Servers).

GitHub

  1. Insert the following lines into your JSON configuration file:
    {
    "github": {
    "type": "http",
    "url": "https://api.githubcopilot.com/mcp",
    "headers": {
    "Authorization": "Bearer GITHUB_TOKEN"
    }
    }
    }
  2. Replace GITHUB_TOKEN with your classic GitHub token.
  3. You can create a new token by following this guide. The token must have at least repo permissions.
  4. In the IDE settings, go to Explyt, MCP Servers and click the "Update" button.