Copilot Studio Agent Direct Line MCP Server

Copilot Studio Agent Direct Line MCP Server

microsoft-copilot-studio-direct-line•bybradcstevens

A local MCP server that lets you interact with Microsoft Copilot Studio Agents from your code editor via the Direct Line 3.0 API.

License: MIT License•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Exposes four MCP tools for agent interaction: send_message, start_conversation, end_conversation, and get_conversation_history.
  • •Integrates with the Microsoft Bot Framework Direct Line 3.0 API with automatic token caching and proactive refresh.

BEST FOR

  • •Developers who want to chat with their Copilot Studio Agents directly from VS Code via GitHub Copilot.
  • •Teams that need to send messages to an agent, start and end conversations, and retrieve conversation history programmatically.

ABOUT MICROSOFT-COPILOT-STUDIO-DIRECT-LINE

Copilot Studio Agent Direct Line MCP Server is cataloged as an MCP server attributed to bradcstevens. A local MCP server that lets you interact with Microsoft Copilot Studio Agents from your code editor via the Direct Line 3.0 API. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Copilot Studio Agent Direct Line MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does this server support an HTTP transport mode?

Yes, an optional HTTP server mode with Azure Entra ID OAuth authentication is supported.

How does the server handle conversation lifecycle?

It manages conversation state with a 30-minute idle timeout.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 10081906a68d · 采集于 2026-11-13 08:49:43 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

⭐ 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

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:

{
  "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.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Copilot Studio Agent Direct Line MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/microsoft-copilot-studio-direct-line)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent