Add custom MCP server URL support in Node.js SDK#129
Merged
pontemonti merged 19 commits intomainfrom Jan 26, 2026
Merged
Conversation
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
…pe safety Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for custom MCP server URLs in SDK
Add custom MCP server URL support in Node.js SDK
Dec 29, 2025
pontemonti
reviewed
Dec 29, 2025
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
pontemonti
reviewed
Dec 29, 2025
pontemonti
reviewed
Dec 29, 2025
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
pontemonti
approved these changes
Dec 30, 2025
pontemonti
reviewed
Dec 30, 2025
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
pontemonti
approved these changes
Dec 30, 2025
…vice.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pontemonti <7850950+pontemonti@users.noreply.github.com>
pontemonti
approved these changes
Dec 30, 2025
tmlsousa
reviewed
Dec 30, 2025
tmlsousa
previously approved these changes
Jan 22, 2026
…ts to use cross-env for consistency
Removed commented-out MCP server configuration.
mrunalhirve128
approved these changes
Jan 26, 2026
rahuldevikar761
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Custom MCP Server URL Support Implementation Plan
getMCPServerConfigsFromManifest()to respect custom URLs when provided in ToolingManifest.jsonImplementation Complete
This PR adds support for custom MCP server URLs in the Node.js SDK, replicating the functionality from the .NET SDK PR #147.
Changes Made:
McpToolServerConfigurationService.ts:getMCPServerConfigsFromManifest()method now checks for custom URLs in manifest entries before falling back to default URL buildingmcpServerUniqueNameas fallback whenmcpServerNameis not provided (matching .NET implementation)anytype with properMCPServerManifestEntryinterface for type safetyMCPServerManifestEntryinterface incontracts.ts:mcpServerName,mcpServerUniqueName,url, andheadersfieldsMCPServerConfigtype for clarityUtility.BuildMcpServerUrl()for precision.process.envNODE_OPTIONS=--experimental-vm-modulesflag to properly handle ES module imports with.jsextensions used by the@modelcontextprotocol/sdkpackagecross-envpackage and updated all test scripts to use it for settingNODE_OPTIONS, ensuring tests work correctly on Windows, macOS, and LinuxUsage:
Users can now specify custom MCP server URLs and headers in their
ToolingManifest.json:{ "mcpServers": [ { "mcpServerName": "customServer", "url": "http://localhost:3000/custom-mcp", "headers": { "Authorization": "Bearer token123", "X-Custom-Header": "custom-value" } }, { "mcpServerName": "mcp_MailTools" }, { "mcpServerUniqueName": "mcp_OneDriveServer" } ] }The server name is determined by using
mcpServerNameif present, otherwise falling back tomcpServerUniqueName. Custom headers can be specified and will be preserved.Backward Compatibility:
The changes are fully backward compatible. If the
urlfield is not provided, the URL is automatically constructed using the server name as before.Testing:
All 241 tests pass across all platforms, including the 10 new tests for custom MCP URL functionality.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.