Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Copilot Chat MCP ExtensionNew to Visual Studio Code? Get it now.
Copilot Chat MCP Extension

Copilot Chat MCP Extension

msi-cie-mcp-test

|
3 installs
| (0) | Free
VS Code Copilot Chat extension that integrates with MCP server for mathematical operations
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🤖 Copilot Chat MCP Extension

A VS Code extension that integrates with GitHub Copilot Chat to provide multiplication functionality using the MCP server.

🎯 What This Does

This extension allows you to:

  1. Type in Copilot Chat: @mcp-calculator multiply 6 and 7
  2. Get instant results: 6 × 7 = 42
  3. All within Copilot Chat interface - no separate windows or popups
  4. Uses MCP server at https://at-mcp-demo.dev.commandcentral.com/

🚀 Quick Start

Prerequisites

  1. VS Code with GitHub Copilot installed and active
  2. MCP Server available at https://at-mcp-demo.dev.commandcentral.com/

Setup

  1. Install dependencies:

    npm install
    
  2. Compile the extension:

    npm run compile
    
  3. Start the MCP server:

    cd ../mcp-server-demo
    npm start
    
  4. Test in VS Code:

    • Press F5 to launch Extension Development Host
    • Open Copilot Chat (Ctrl+Alt+I)
    • Type: @mcp-calculator multiply 6 and 7
    • See result: 6 × 7 = 42

💬 How to Use in Copilot Chat

Basic Usage

@mcp-calculator multiply 6 and 7
@mcp-calculator multiply 2.5 by 4
@mcp-calculator multiply 10 * 3

Get Help

@mcp-calculator help

Example Conversation

You: @mcp-calculator multiply 6 and 7
Bot: 🧮 Multiplication Result
     6 × 7 = 42
     ✅ Calculated using MCP server

You: @mcp-calculator multiply 2.5 by 4  
Bot: 🧮 Multiplication Result
     2.5 × 4 = 10
     ✅ Calculated using MCP server

🛠️ Features

  • Natural language input: "multiply 6 and 7", "multiply 2.5 by 4"
  • Multiple formats: "and", "by", "*" all work
  • Error handling: Graceful handling when server is down
  • Help system: Built-in help and examples
  • Follow-up suggestions: Copilot suggests next actions
  • Real-time validation: Checks if MCP server is available

Technical Details

Chat Participant

  • ID: mcp.calculator
  • Name: @mcp-calculator
  • Description: MCP Calculator for mathematical operations

Supported Commands

  • multiply: Multiply two numbers
  • help: Show usage instructions

Input Patterns

The extension recognizes these patterns:

  • multiply X and Y
  • multiply X by Y
  • multiply X * Y
  • Where X and Y are numbers (including decimals)

Testing

Manual Testing

  1. Start MCP Server: cd mcp-server-demo && npm start
  2. Launch Extension: Press F5 in VS Code
  3. Open Copilot Chat: Ctrl+Alt+I
  4. Test Commands:
    @mcp-calculator multiply 6 and 7
    @mcp-calculator multiply 2.5 by 4
    @mcp-calculator help
    

Expected Results

  • ✅ Multiplication: Shows result with calculation
  • ✅ Error handling: Shows helpful message if server down
  • ✅ Help: Shows usage instructions
  • ✅ Follow-ups: Suggests related actions

🛡️ Error Handling

Server Not Running

❌ MCP Server not available

Please start the MCP server first:
cd mcp-server-demo
npm start

Invalid Input

❓ I can help you multiply numbers!

Try: multiply 6 and 7 or multiply 2.5 by 4
Type help for more information.

Network Errors

❌ Error calling MCP server
[Detailed error message]

📁 Project Structure

copilot-chat-extension/
├── src/
│   └── extension.ts          # Main extension logic
├── out/                      # Compiled JavaScript
├── .vscode/
│   ├── launch.json           # F5 debug config
│   └── tasks.json            # Build tasks
├── package.json              # Extension manifest
├── tsconfig.json             # TypeScript config
└── README.md                 # This file

🔄 Integration with MCP Server

The extension communicates with the MCP server at:

  • Manifest: GET https://at-mcp-demo.dev.commandcentral.com/.well-known/mcp/manifest.json
  • Multiply: POST https://at-mcp-demo.dev.commandcentral.com/tools/MultiplyNumbers/invoke

Request Format:

{
  "a": 6,
  "b": 7
}

Response Format:

{
  "result": 42
}

Troubleshooting

Copilot Chat Not Available

  • Ensure GitHub Copilot is installed and activated
  • Check VS Code version (requires 1.90.0+)
  • Restart VS Code if needed

Extension Not Loading

  • Check VS Code Extension Host output
  • Verify compilation: npm run compile
  • Restart Extension Development Host

MCP Server Issues

  • Verify server is accessible: Test at https://at-mcp-demo.dev.commandcentral.com/
  • Check server logs for errors
  • Test server directly: Invoke-RestMethod -Uri "https://at-mcp-demo.dev.commandcentral.com/.well-known/mcp/manifest.json"

** Now you can use MCP tools directly in GitHub Copilot Chat!**

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft