September 26th, 2025
0 reactions

Unlocking MCP in JetBrains: How Copilot Uses Sampling, Prompts, Resources, and Elicitation

Hang Wang
Program Manager

With the enhanced capability of the MCP on JetBrains, you can now bring prompts, resources, and even interactive tools directly into your IDE interacting with MCP. This means more flexible workflows, deeper context, and smoother collaboration between Copilot and your coding environment. 

Unlocking MCP in JetBrains image

Let’s take a look at what you can do today with MCP Sampling, Prompts, Resources, and Elicitation.

Prerequisites 

  1. Update GitHub Copilot, make sure you’re running GitHub Copilot on JetBrains v1.5.57 or above. 
  2. Enable Agent Mode and MCPIn your IDE, ensure both Agent Mode and MCP are turned on. 
  3. Configure MCP Servers Here’s the MCP servers I’m using today: 
  • Server-everything: This MCP server attempts to exercise all the features of the MCP protocol.  
  • GitHub: The GitHub MCP Server connects AI tools directly to GitHub’s platform. 

To easily enable everything, you can copy and paste these settings into your `mcp.json` file: 

{
  "servers": {
    "everything": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-everything"
      ],
      "type": "stdio"
    },
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "gallery": true,
      "version": "0.0.1"
    }
  },
  "inputs": []
}

If the MCP server fails to start due to errors, try clearing the npm cache:

Windows: C:\Users\your-user-name\AppData\Local\npm-cache Mac: ~/Library/Caches/npm Then try starting the server again.

MCP Sampling – Fine-Tune How Copilot Responds 

With MCP Sampling, you can configure which models Copilot is allowed to use for certain tasks. This gives you precise control when experimenting with different LLMs. 

  • Go to Settings -> Model Context Protocol(MCP) -> find MCP sampling -> Select Allowed Models, this gives you the global setting of model selection for all mcp servers. 

Screenshot 2025 09 18 at 22 19 26 image

  • You may also configure induvial mcp servers by selecting Server Level Configuration:

mcp server image

  • The model selection is optional, you may always have the GPT-4.1 selected by default. After the model selection, in Agent Mode, you can call a tool like:        

          “Call SampleLLM with the prompt: what is intellij”

  • Copilot will confirm twice — once for the tool call, once for the LLM call — and return the result right in your chat window.

Screenshot 2025 09 18 at 22 18 09 image

This way, you have just completed the MCP sampling on your IDE. 

MCP Prompts – Custom Prompts, Right in Your IDE 

MCP Prompts bring structured, reusable prompts directly into your Copilot experience. 

  • Type / in the chat panel to browse prompts from your MCP server. 

mcplist image

  • Pick a prompt (e.g. GitHub) and fill in arguments through a neat popup. 

Screenshot 2025 09 18 at 22 29 53 image

  • If the prompt requires resources (like images or files), they’ll be automatically added as references. 

Screenshot 2025 09 18 at 22 30 18 image

  • Even better, prompts with completion give you auto-suggestions as you type. 

Think of it as prompt engineering with guardrails — and all inside JetBrains. 

MCP Resources – Context at Your Fingertips 

Sometimes, the right answer requires the right context. With MCP Resources, you can directly attach files and resources from your server into your Copilot session. 

  • Click Add ContextMCP Resources 

mcpresource image

  • Select a resource or template → fill in variables if needed 
  • Apply, and the resource file is now part of your context. 

Screenshot 2025 09 18 at 22 33 04 image

This makes Copilot not just a coding assistant, but a context-aware partner that understands your project’s resources. 

MCP Elicitation – Interactive Conversations with Tools 

MCP isn’t just about static prompts and resources — it can run interactive tools through elicitation. 

  • Add the MCP “everything” server. 
  • In Agent Mode, ask Copilot: 

“Call the startElicitation tool of the everything server” 

Screenshot 2025 09 18 at 22 22 21 image

  • Copilot guides you through a dialogue flow. You can respond step by step, and the history persists even after restarting your IDE. 

Screenshot 2025 09 18 at 22 22 59 image

It’s like giving Copilot the ability to hold structured, tool-driven conversations with you — all inside your IDE. 

Summary

MCP brings a whole new layer of flexibility and power to GitHub Copilot in JetBrains. From fine-tuned model sampling to interactive elicitation tools, it transforms Copilot into a configurable, context-rich development partner. 

If you haven’t tried MCP yet, now’s the time. Explore what’s possible and see how Copilot adapts to your workflow.

Please share your feedback with us on: https://github.com/microsoft/copilot-intellij-feedback/issues. 

Author

Hang Wang
Program Manager

I'm Hang Wang, a Product Manager at Microsoft specializing in developer experience. I began my journey at Microsoft as a Software Engineer, gaining deep insights into developers' needs and challenges. Now, I focus on AI-driven tools that enhance developer productivity.

0 comments