Skip to content

Update copilot-instructions.md: McpServerFactory was removed - #1892

Open
Zir0-93 wants to merge 2 commits into
modelcontextprotocol:mainfrom
Zir0-93:docs/copilot-instructions-mcpserver-create
Open

Zir0-93 wants to merge 2 commits into
modelcontextprotocol:mainfrom
Zir0-93:docs/copilot-instructions-mcpserver-create

Conversation

@Zir0-93

@Zir0-93 Zir0-93 commented Sep 26, 2026 •

Copy link
Copy Markdown

Fixes #1893.

.github/copilot-instructions.md line 258 tells agents to use McpServerFactory, which was marked obsolete in 38b4a26 ("Use McpServer.Create instead") and removed in #985. The instructions file was not part of that diff, so the reference stayed. This changes the line to name McpServer.Create.

Documentation-only change; no code or tests affected.

@chrikrah chrikrah left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve at b05c876. The change checks out.

$ git grep -n McpServerFactory c40ee04
.github/copilot-instructions.md:258:- Use `McpServerFactory` to create server instances with configured options

$ git grep -n McpServerFactory b05c876

$ git grep -n "static McpServer Create" b05c876 -- 'src/**/*.cs'
src/ModelContextProtocol.Core/Server/McpServer.Methods.cs:60:    public static McpServer Create(

I swept the rest of the file for the same defect. 76 backticked names went in, three came out.

$ git show b05c876:.github/copilot-instructions.md \
    | grep -oP '(?<=`)[A-Za-z.()<>]+(?=`)' | sed 's/^\.//; s/(.*//; s/<.*//' \
    | grep -xP '[A-Z][A-Za-z0-9]*' | sort -u \
    | while read n; do git grep -qw "$n" b05c876 -- src tests samples || echo "ABSENT: $n"; done
ABSENT: AddMcpClient
ABSENT: CustomizableJsonStringEnumConverter
ABSENT: McpEndpoint

non-blocking: CustomizableJsonStringEnumConverter sits at :77 and :249, and b993ae0 (#957) deleted it in the same diff that rewrote McpJsonUtilities.cs:50 to the BCL JsonStringEnumConverter. :60 offers McpEndpoint as the prefix example, and 38b4a26, the commit you cite, deleted that class file. :67 has agents call .AddMcpClient(), where McpServerServiceCollectionExtensions.cs:20 registers only the server side.

Two blind spots in that sweep, both pointing the same way. Whole-word matching makes a name that survives only as a prefix read absent, and McpEndpointRouteBuilderExtensions is what Mcp-plus-endpoint looks like today. A name living only under docs/ reads absent as well, since the pathspec skips it. Whole-tree git grep -w for all three returns nothing but these instruction lines.

@Zir0-93 these are three separate lines from the one you fixed. Take them here if you want them, or say the word and I will open an issue for them. @jeffhandley merged the last change to this file, in #1794.

…nt, AddMcpClient, CustomizableJsonStringEnumConverter)
@Zir0-93

Zir0-93 commented Oct 4, 2026

Copy link
Copy Markdown
Author

Thanks for the sweep, good catches. Took all three here: McpServerOptions replaces McpEndpoint as the prefix example, .AddMcpClient() is gone since only the server side registers through DI, and both enum lines now point at the built-in JsonStringEnumConverter.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

copilot-instructions.md references McpServerFactory, which was removed in #985

2 participants