Skip to main content

Extending Copilot Chat with the Model Context Protocol (MCP)

Learn how to use the Model Context Protocol (MCP) to extend Copilot Chat.

Note

  • MCP support is currently in public preview and subject to change.
  • MCP support is available in Copilot Chat for Visual Studio Code, JetBrains, Eclipse, and Xcode.
  • The GitHub Pre-release License Terms apply to your use of this product.

Overview

The Model Context Protocol (MCP) is an open standard that defines how applications share context with large language models (LLMs). MCP provides a standardized way to connect AI models to different data sources and tools, enabling them to work together more effectively.

You can use MCP to extend the capabilities of Copilot Chat by integrating it with a wide range of existing tools and services. You can also use MCP to create new tools and services that work with Copilot Chat, allowing you to customize and enhance your experience.

For more information on MCP, see the official MCP documentation.

For information on other currently available MCP servers, see the MCP servers repository.

Prerequisites

Configuring MCP servers in Eclipse

  1. To open the Copilot Chat panel, click the Copilot icon () in the status bar at the bottom of Eclipse.

  2. From the menu, select "Edit preferences".

  3. In the left pane, expand Copilot Chat and click MCP.

  4. Define your MCP servers. You can use the following configuration as an example:

    JSON
    {
      "servers": {
        "memory": {
          "command": "npx",
          "args": [
            "-y",
            "@modelcontextprotocol/server-memory"
          ]
        }
      }
    }
    

Creating a new MCP server

You can create a new MCP server to fulfill your specific needs, and then integrate it with Copilot Chat. For example, you can create an MCP server that connects to a database or a web service, and then use that server in Copilot Chat to perform tasks on that database or web service.

For more information on creating and configuring your own MCP servers, see the official MCP documentation.

Further reading