Conversation
…the removed McpServerFactory
chrikrah
left a comment
There was a problem hiding this comment.
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)
|
Thanks for the sweep, good catches. Took all three here: |
Fixes #1893.
.github/copilot-instructions.mdline 258 tells agents to useMcpServerFactory, 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 nameMcpServer.Create.Documentation-only change; no code or tests affected.