Skip to content

chore: replacing deprecated server with McpServer - #187

Merged
juliandescottes merged 1 commit into
mozilla:mainfrom
f3tchcodes:chore/rewrite-deprecated-mcp-server
Sep 7, 2026
Merged

chore: replacing deprecated server with McpServer#187
juliandescottes merged 1 commit into
mozilla:mainfrom
f3tchcodes:chore/rewrite-deprecated-mcp-server

Conversation

@f3tchcodes

Copy link
Copy Markdown
Contributor

No description provided.

@f3tchcodes
f3tchcodes force-pushed the chore/rewrite-deprecated-mcp-server branch from 06ef823 to 15f5f32 Compare September 6, 2026 19:19
@f3tchcodes f3tchcodes changed the title chore: removing deprecated syntax for initiating mcp server chore: replacing deprecated server with McpServer Sep 6, 2026
Comment thread src/index.ts Outdated
}

const server = new Server(
const server = new McpServer(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe rename to mcp or mcpServer to avoid the server.server bits?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done!

Comment thread src/index.ts Outdated

// List available tools
server.setRequestHandler(ListToolsRequestSchema, async () => {
server.server.setRequestHandler(ListToolsRequestSchema, async () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@deprecated Use McpServer instead for the high-level API. Only use Server for advanced use cases.

I don't really understand the deprecation policy here. Server is "deprecated" unless you want to use advanced APIs. And apparently setRequestHandler is one of those? Is it then better to keep instantiating Server or to access it via MCPServer.server? Will one or both be removed in the future?

Let's move forward with this for now, but it's not really clear to me what the guideline is.

(no action needed here, but let's be mindful of this if other "deprecation" cleanups come up in the future)

@f3tchcodes f3tchcodes Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah now that you mention it, that's confusing to me as well. My understanding is that McpServer is now the intended high level entry point while lower level methods like setRequestHandler are still exposed through McpServer.server. The deprecation wording is still a little uncertain about whether Server is completely deprecated or the access method is slightly changed (though probably the later).

@f3tchcodes
f3tchcodes force-pushed the chore/rewrite-deprecated-mcp-server branch from 15f5f32 to 09a5219 Compare September 7, 2026 20:47
@f3tchcodes

Copy link
Copy Markdown
Contributor Author

I've made all the requested changes!

@juliandescottes juliandescottes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Perfect, thanks!

@juliandescottes
juliandescottes merged commit a70e6dd into mozilla:main Sep 7, 2026
2 checks passed
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.

2 participants