Logo von Microsoft Copilot Studio Direct Line

Microsoft Copilot Studio Direct Line

Community
bradcstevens

Easily install the Copilot Studio Agent Direct Line MCP Server for VS Code or VS Code Insiders:

Herausgeberbradcstevens
Repositorycopilot-studio-agent-direct-line-mcp
SpracheTypeScript
Forks
0
Sterne
0
Verfügbare Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Links
  • Tools mit KI-Workflows verbinden

    Microsoft Copilot Studio Direct Line stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    0 Sterne und 0 Forks im verlinkten Repository.

⭐ Copilot Studio Agent Direct Line MCP Server

Easily install the Copilot Studio Agent Direct Line MCP Server for VS Code or VS Code Insiders:

Install with NPX in VS Code Install with NPX in VS Code Insiders

This TypeScript project provides a local MCP server for Microsoft Copilot Studio Agents, enabling you to interact with your Copilot Studio Agents directly from your code editor via the Direct Line 3.0 API.

📄 Table of Contents

📺 Overview

The Copilot Studio Agent Direct Line MCP Server brings Microsoft Copilot Studio Agent context to your development environment. Try prompts like:

  • "Start a conversation with my Copilot Studio Agent"
  • "Ask my agent about product sizing"
  • "Send a message to the agent: What are your capabilities?"
  • "Get the conversation history"
  • "End the current conversation"

🏆 Expectations

The Copilot Studio Agent Direct Line MCP Server is built with tools that are concise, simple, focused, and easy to use—each designed for a specific scenario. We intentionally avoid complex tools that try to do too much. The goal is to provide a thin abstraction layer over the Direct Line 3.0 API, making agent interaction straightforward and letting the language model handle complex reasoning.

⚙️ Features

  • ✅ Direct Line 3.0 Integration - Full support for Microsoft Bot Framework Direct Line API
  • ✅ Token Management - Automatic token caching and proactive refresh
  • ✅ Conversation State - Manages conversation lifecycle with 30-minute idle timeout
  • ✅ MCP Tools - Four tools for agent interaction: send_message, start_conversation, end_conversation, get_conversation_history
  • ✅ Comprehensive Error Handling - 11 specialized error types, OAuth-specific retry strategies, MCP error transformation
  • ✅ Circuit Breaker Pattern - Intelligent failure classification, excludes user errors from circuit state
  • ✅ Retry Logic - Exponential backoff with jitter, OAuth-aware retry strategies
  • ✅ Input Validation - Zod schemas for type-safe validation
  • ✅ Security - Secret masking in logs, secure environment configuration, no disk persistence
  • ✅ HTTP Transport Mode - Optional HTTP server with Azure Entra ID OAuth authentication
  • ✅ Testing Suite - 45+ tests with 80%+ coverage on critical components
  • ✅ Production Ready - Deployment templates for Azure Container Apps, Docker, Kubernetes

⚒️ Supported Tools

Interact with your Copilot Studio Agent using these tools:

  • send_message: Send a message to the Copilot Studio Agent and receive a response.
  • start_conversation: Start a new conversation with the Agent, optionally with an initial message.
  • end_conversation: End a conversation and clean up resources.
  • get_conversation_history: Retrieve message history for a conversation.

🔌 Installation & Getting Started

For the best experience, use Visual Studio Code and GitHub Copilot. See the getting started documentation to use our MCP Server with other tools such as Claude Code and Cursor.

Prerequisites

  1. Install VS Code or VS Code Insiders
  2. Install Node.js 18+
  3. Microsoft Copilot Studio Agent with Direct Line 3.0 enabled
  4. Direct Line secret key from your Copilot Studio Agent

Installation

✨ One-Click Install (Recommended)

Install with NPX in VS Code Install with NPX in VS Code Insiders

After installation, select GitHub Copilot Agent Mode and refresh the tools list. Learn more about Agent Mode in the VS Code Documentation.

🧨 Manual Install with NPX

This installation method is the easiest for all users of Visual Studio Code.

In your project, add a .vscode/mcp.json file with the following content:

json
{
  "inputs": [
    {
      "id": "direct_line_secret",
      "type": "promptString",
      "description": "Direct Line secret key from your Copilot Studio Agent"
    }
  ],
  "servers": {
    "copilot-studio-agent-direct-line-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "copilot-studio-agent-direct-line-mcp"],
      "env": {
        "DIRECT_LINE_SECRET": "${input:direct_line_secret}"
      }
    }
  }
}

Save the file, then click 'Start' in the MCP Server panel.

In chat, switch to Agent Mode.

Click "Select Tools" and choose the available tools.

Open GitHub Copilot Chat and try a prompt like Start a conversation with my Copilot Studio Agent. The first time a tool is executed, you will be prompted for your Direct Line secret.

💥 We strongly recommend creating a .github/copilot-instructions.md in your project. This will enhance your experience using the Copilot Studio MCP Server with GitHub Copilot Chat. To start, just include "This project uses Microsoft Copilot Studio Agents. Always check to see if the Copilot Studio MCP server has a tool relevant to the user's request" in your copilot instructions file.

See the getting started documentation for additional installation methods, including local development setup.

📝 Troubleshooting

See the Troubleshooting guide for help with common issues and logging.

🎩 Examples & Best Practices

Explore example prompts and usage patterns in our Examples documentation.

For detailed tool reference and usage guides, refer to the Usage Guide.

🙋‍♀️ Frequently Asked Questions

For answers to common questions about the Copilot Studio Agent Direct Line MCP Server, see the Frequently Asked Questions.

📌 Contributing

We welcome contributions! During preview, please file issues for bugs, enhancements, or documentation improvements.

See our Contributions Guide for:

  • 🛠️ Development setup
  • ✨ Adding new features
  • 📝 Code style & testing
  • 🔄 Pull request process

🤝 Code of Conduct

This project follows standard open-source community guidelines. We expect all contributors to be respectful and constructive in their interactions.

License

Licensed under the MIT License.


Disclaimer: This is a personal project by Brad Stevens.
It is not affiliated with or endorsed by Microsoft Corporation.

Installation

TypingMind
Voraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "copilot-studio-agent-direct-line-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "copilot-studio-agent-direct-line-mcp"
      ],
      "env": {
        "DIRECT_LINE_SECRET": "${input:direct_line_secret}"
      }
    }
  }
}

Microsoft Copilot Studio Direct Line MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald Microsoft Copilot Studio Direct Line verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

Microsoft Copilot Studio Direct Line als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für Microsoft Copilot Studio Direct Line ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "microsoft-copilot-studio-direct-line": {
      "command": "npx",
      "args": [
        "-y",
        "copilot-studio-agent-direct-line-mcp"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von Microsoft Copilot Studio Direct Line. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von Microsoft Copilot Studio Direct Line.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit Microsoft Copilot Studio Direct Line bei dieser Aufgabe helfen?
Microsoft Copilot Studio Direct Line
Gerne. Ich habe es gelesen.
Das habe ich mit Microsoft Copilot Studio Direct Line gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server Microsoft Copilot Studio Direct Line verwendet?

Microsoft Copilot Studio Direct Line ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich Microsoft Copilot Studio Direct Line MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie Microsoft Copilot Studio Direct Line mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum Microsoft Copilot Studio Direct Line MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald Microsoft Copilot Studio Direct Line verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich Microsoft Copilot Studio Direct Line MCP mit TypingMind?

Microsoft Copilot Studio Direct Line wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt Microsoft Copilot Studio Direct Line MCP in TypingMind bereit?

Microsoft Copilot Studio Direct Line stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um Microsoft Copilot Studio Direct Line MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls Microsoft Copilot Studio Direct Line eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇