-
Notifications
You must be signed in to change notification settings - Fork 43
feat: update Node.js samples to MCP V2 per-audience token model #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,12 @@ | ||
| { | ||
| "mcpServers": [ | ||
| { | ||
| "mcpServerName": "mcp_MailTools", | ||
| "mcpServerUniqueName": "mcp_MailTools", | ||
| "url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_MailTools", | ||
| "scope": "McpServers.Mail.All", | ||
| "audience": "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1" | ||
| }, | ||
| { | ||
| "mcpServerName": "mcp_WordServer", | ||
| "mcpServerUniqueName": "mcp_WordServer", | ||
| "url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_WordServer", | ||
| "scope": "McpServers.Word.All", | ||
| "audience": "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1" | ||
| "mcpServerName": "mcp_CalendarTools", | ||
| "mcpServerUniqueName": "mcp_CalendarTools", | ||
| "url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_CalendarTools", | ||
|
Comment on lines
2
to
+6
|
||
| "scope": "Tools.ListInvoke.All", | ||
| "audience": "910333d2-47e9-43ca-981f-6df2f4531ef4", | ||
| "publisher": "Microsoft" | ||
|
Comment on lines
+6
to
+9
|
||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,6 +12,9 @@ OPENAI_MODEL=gpt-4o | |||||||||||||
|
|
||||||||||||||
| # MCP Tooling Configuration | ||||||||||||||
| BEARER_TOKEN= | ||||||||||||||
| # V2 per-server bearer tokens (dev mode — SDK reads BEARER_TOKEN_<SERVER_NAME_UPPER>) | ||||||||||||||
| BEARER_TOKEN_MCP_MAILTOOLS= | ||||||||||||||
|
Comment on lines
14
to
+16
|
||||||||||||||
| BEARER_TOKEN= | |
| # V2 per-server bearer tokens (dev mode — SDK reads BEARER_TOKEN_<SERVER_NAME_UPPER>) | |
| BEARER_TOKEN_MCP_MAILTOOLS= | |
| # Legacy/global fallback token. Prefer per-server bearer tokens in the V2 per-audience model. | |
| BEARER_TOKEN= | |
| # Preferred V2 per-server bearer tokens (dev mode — SDK reads BEARER_TOKEN_<SERVER_NAME_UPPER>) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,12 @@ | ||
| { | ||
| "mcpServers": [ | ||
| { | ||
| "mcpServerName": "mcp_MailTools", | ||
| "mcpServerUniqueName": "mcp_MailTools", | ||
| "url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_MailTools", | ||
| "scope": "McpServers.Mail.All", | ||
| "audience": "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1" | ||
| "mcpServerName": "mcp_CalendarTools", | ||
| "mcpServerUniqueName": "mcp_CalendarTools", | ||
| "url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_CalendarTools", | ||
|
Comment on lines
2
to
+6
|
||
| "scope": "Tools.ListInvoke.All", | ||
| "audience": "910333d2-47e9-43ca-981f-6df2f4531ef4", | ||
| "publisher": "Microsoft" | ||
|
Comment on lines
+6
to
+9
|
||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,6 +13,9 @@ AZURE_OPENAI_API_VERSION=2024-10-21 | |||||||||||||
|
|
||||||||||||||
| # MCP Tooling Configuration | ||||||||||||||
| BEARER_TOKEN= | ||||||||||||||
| # V2 per-server bearer tokens (dev mode — SDK reads BEARER_TOKEN_<SERVER_NAME_UPPER>) | ||||||||||||||
| BEARER_TOKEN_MCP_MAILTOOLS= | ||||||||||||||
|
Comment on lines
15
to
+17
|
||||||||||||||
| BEARER_TOKEN= | |
| # V2 per-server bearer tokens (dev mode — SDK reads BEARER_TOKEN_<SERVER_NAME_UPPER>) | |
| BEARER_TOKEN_MCP_MAILTOOLS= | |
| # Leave BEARER_TOKEN empty when using V2 per-server bearer tokens. | |
| BEARER_TOKEN= | |
| # V2 per-server bearer tokens (dev mode — SDK reads BEARER_TOKEN_<SERVER_NAME_UPPER>) |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,18 +1,12 @@ | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| "mcpServers": [ | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| "mcpServerName": "mcp_MailTools", | ||||||||||||||||||||||
| "mcpServerUniqueName": "mcp_MailTools", | ||||||||||||||||||||||
| "url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_MailTools", | ||||||||||||||||||||||
| "scope": "McpServers.Mail.All", | ||||||||||||||||||||||
| "audience": "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1" | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
|
||||||||||||||||||||||
| { | |
| { | |
| "mcpServerName": "mcp_MailTools", | |
| "mcpServerUniqueName": "mcp_MailTools", | |
| "url": "https://agent365.svc.cloud.microsoft/agents/servers/mcp_MailTools", | |
| "scope": "Tools.ListInvoke.All", | |
| "audience": "910333d2-47e9-43ca-981f-6df2f4531ef4", | |
| "publisher": "Microsoft" | |
| }, | |
| { |
Copilot
AI
Apr 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL/audience values here don’t match the PR description (“V2 URLs” under test.agent365.svc.cloud.dev.microsoft and per-server audiences for Mail vs Calendar). Update the url to the V2 hostname and set the audience to the Calendar audience GUID intended for mcp_CalendarTools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per-server bearer tokens were added for MailTools and CalendarTools, but the updated
ToolingManifest.jsononly lists CalendarTools. Please either add MailTools back to the manifest or remove the unusedBEARER_TOKEN_MCP_MAILTOOLSvariable. It would also help to document whetherBEARER_TOKENshould be unset when using per-server tokens in the V2 per-audience model.