|
1 | | -# MCP Connectors — Copilot CLI Canvas Extension |
2 | | - |
3 | | -A GitHub Copilot CLI **canvas extension** that lets you browse and add MCP |
4 | | -connectors from an Azure **Connector Namespace** directly inside a Copilot CLI |
5 | | -session. Search by name or category, sign in to a connector, then restart the |
6 | | -session to make its tools available to the agent. |
7 | | - |
8 | | -> The canvas talks to public Azure Resource Manager (`management.azure.com`) |
9 | | -> using the signed-in Azure CLI account. The extension does not register its own |
10 | | -> Entra application or persist Azure credentials. |
11 | | -
|
12 | | -## Prerequisites |
13 | | - |
14 | | -- **GitHub Copilot CLI** (the host that loads canvas extensions). |
15 | | -- **Azure CLI**, signed in with `az login`. The extension asks Azure CLI for a |
16 | | - short-lived ARM access token and refreshes it through the same broker. |
17 | | -- **An Azure subscription with a Connector Namespace** — resource type |
18 | | - `Microsoft.Web/connectorGateways` (API version `2026-05-01-preview`). This is |
19 | | - a preview resource provider; you must have access to it for the catalog to |
20 | | - load. Without it the extension installs fine but has nothing to show. |
| 1 | +# MCP Connectors |
| 2 | + |
| 3 | +A GitHub Copilot app canvas extension for discovering and connecting hosted MCP |
| 4 | +servers from [Azure Connector Namespace](https://learn.microsoft.com/en-us/azure/connector-namespace/connector-namespace-overview). |
| 5 | +It brings the Microsoft and partner connector catalog, guided browser sign-in, |
| 6 | +and connected-server management into the Copilot side panel. |
| 7 | + |
| 8 | +## Features |
| 9 | + |
| 10 | +- **Connector catalog** - browse and search Microsoft and partner MCP servers |
| 11 | + available in your namespace. |
| 12 | +- **Guided Azure setup** - sign in from the canvas, then choose a subscription |
| 13 | + and Connector Namespace. |
| 14 | +- **Browser-based connection flow** - complete each connector's authentication |
| 15 | + or consent without leaving the setup experience. |
| 16 | +- **My MCPs** - see which servers are connected and ready to add to Copilot. |
| 17 | +- **Namespace playground** - open any connected server in the Connector |
| 18 | + Namespace playground with **Sandbox**. |
| 19 | +- **Persistent setup** - retain the selected namespace and restore Azure sign-in |
| 20 | + securely across app restarts. |
21 | 21 |
|
22 | 22 | ## Install |
23 | 23 |
|
24 | | -Install it from the public Awesome Copilot repository: |
| 24 | +Open the GitHub Copilot app, go to **Settings > Plugins**, search for |
| 25 | +`connector-namespaces`, and select **Install**. |
25 | 26 |
|
26 | | -``` |
27 | | -install_extension https://github.com/github/awesome-copilot/tree/main/extensions/connector-namespaces |
28 | | -``` |
| 27 | +You can also open the |
| 28 | +[MCP Connectors gallery page](https://awesome-copilot.github.com/extension/connector-namespaces/) |
| 29 | +and select **Install in GitHub Copilot app**. |
29 | 30 |
|
30 | | -For a reproducible install, swap `main` for a reviewed commit SHA from this |
31 | | -repository. |
| 31 | +## Requirements |
32 | 32 |
|
33 | | -The destination **scope** is chosen at install time: |
| 33 | +- Access to an Azure subscription with a Connector Namespace. If you do not |
| 34 | + have one, follow the |
| 35 | + [Connector Namespace creation guide](https://learn.microsoft.com/en-us/azure/connector-namespace/create-connector-namespace). |
| 36 | +- Permission to view the namespace and create its connections and hosted MCP |
| 37 | + server configurations. |
| 38 | +- A browser for Microsoft Entra sign-in and connector consent. |
| 39 | +- An operating-system secure credential store. Windows and macOS provide one by |
| 40 | + default. Linux and WSL require a Secret Service-compatible keyring, such as |
| 41 | + GNOME Keyring, with `libsecret` available. Unencrypted token storage is |
| 42 | + intentionally disabled. |
34 | 43 |
|
35 | | -- **user** (default) — installs globally for you at |
36 | | - `$COPILOT_HOME/extensions/connector-namespaces/`. The usual choice for a |
37 | | - personal tool. |
38 | | -- **project** — installs into the current repo. |
39 | | -- **session** — scoped to a single CLI session. |
| 44 | +Connector Namespace is currently an Azure preview service and availability can |
| 45 | +vary by region. |
40 | 46 |
|
41 | 47 | ## Usage |
42 | 48 |
|
43 | | -1. Open the **MCP Connectors** canvas from Copilot CLI. |
44 | | -2. The canvas loads subscriptions from your signed-in Azure CLI account. Pick an |
45 | | - Azure **subscription** and a **Connector Namespace**. The choice is saved for |
46 | | - future sessions (change it any time via **Change namespace**). |
47 | | -3. Browse or filter the connector catalog, then **Connect**. A browser tab |
48 | | - opens for Microsoft sign-in; complete it and the canvas updates on its own. |
49 | | -4. Connected connectors move into **My MCPs**. Use **Sandbox** on a tile to open |
50 | | - that server directly in the namespace MCP playground. |
51 | | -5. Restart the Copilot CLI session so the agent can load the connected tools. |
52 | | - |
53 | | -The extension registers the native `connector_namespaces_open_playground` tool, |
54 | | -so GitHub Copilot can open a named connector from **My MCPs** without installing |
55 | | -an additional Agent Skill. |
56 | | - |
57 | | -## How it works |
58 | | - |
59 | | -- `extension.mjs` — entry point; declares the canvas, `open_sandbox` action, and |
60 | | - native `connector_namespaces_open_playground` tool. |
61 | | -- `server.mjs` — a loopback HTTP server (bound to `127.0.0.1` only) that serves |
62 | | - the canvas UI and the JSON/OAuth endpoints the iframe calls. |
63 | | -- `armClient.mjs` — thin ARM client (token brokered by Azure CLI, public ARM |
64 | | - base only, SSRF-guarded path segments). |
65 | | -- `catalog.mjs` — fetches and curates the connector list for a namespace. |
66 | | -- `install.mjs` — the connect/install pipeline (managed-API connection, consent, |
67 | | - rollback on cancel, and native HTTPS MCP config registration). |
68 | | -- `renderer.mjs` — all canvas HTML/CSS/client JS. |
69 | | -- `sandbox.mjs` — builds namespace playground links and resolves named My MCPs. |
70 | | -- `state.mjs` — saved namespace and connector state. |
71 | | - |
72 | | -## Privacy & security |
73 | | - |
74 | | -- ARM tokens come from `az account get-access-token`, stay in process memory, |
75 | | - and are never logged or written by the extension. Azure CLI owns sign-in and |
76 | | - credential storage. |
77 | | -- All servers bind to loopback (`127.0.0.1`) and are never exposed externally. |
78 | | -- ARM requests go only to `https://management.azure.com/`; path segments are |
79 | | - validated to prevent SSRF-style host smuggling. |
80 | | -- The minted gateway API key is stored in the selected Copilot MCP config and |
81 | | - sent to its validated HTTPS endpoint as the `X-API-Key` header. |
| 49 | +1. Open the **MCP Connectors** canvas in the GitHub Copilot app. |
| 50 | +2. Select **Sign in to Azure** and complete Microsoft Entra authentication in |
| 51 | + your browser. |
| 52 | +3. Choose an Azure subscription and Connector Namespace. |
| 53 | +4. Browse or search the catalog, then select **Connect** on an MCP server. |
| 54 | +5. Complete the connector's sign-in or consent flow when prompted. |
| 55 | +6. Confirm the server appears under **My MCPs**. |
| 56 | +7. Restart the GitHub Copilot app so the new tools become available to the |
| 57 | + agent. |
| 58 | + |
| 59 | +Use **Sandbox** on a connected server to inspect it in the Connector Namespace |
| 60 | +playground. Use **Change namespace** to switch subscriptions or namespaces. |
| 61 | + |
| 62 | +## Authentication and privacy |
| 63 | + |
| 64 | +Azure sign-in and connector sign-in are separate: |
| 65 | + |
| 66 | +- **Azure sign-in** lets the canvas discover and manage Connector Namespace |
| 67 | + resources. Access and refresh tokens are stored in the operating system's |
| 68 | + encrypted credential store. To select that encrypted cache entry after an app |
| 69 | + restart, the extension separately saves a non-secret authentication record |
| 70 | + containing the authority, client ID, account ID, tenant ID, and username under |
| 71 | + `~/.copilot/extensions/connector-namespaces/artifacts/azure-auth-record.json`, |
| 72 | + with user-only permissions where supported. Raw tokens are never written to |
| 73 | + extension files. |
| 74 | +- **Connector sign-in** grants an individual MCP server access to its backing |
| 75 | + service. The resulting connection is managed by Connector Namespace. |
| 76 | + |
| 77 | +The canvas serves its interface from loopback only (`127.0.0.1`). Azure |
| 78 | +management requests are restricted to `https://management.azure.com/`. |
| 79 | +The gateway API key that lets Copilot reach a connected server is stored in the |
| 80 | +user-scoped GitHub Copilot MCP configuration and sent only to that server's |
| 81 | +configured HTTPS endpoint. |
82 | 82 |
|
83 | 83 | ## License |
84 | 84 |
|
|
0 commit comments