Skip to content

Conversation

Copy link

Copilot AI commented Nov 7, 2025

Addresses modelcontextprotocol#889. PR modelcontextprotocol#709 converted EverythingServer to HTTP-only; this restores stdio support while maintaining HTTP.

Architecture

Split EverythingServer into three projects following the approach suggested in modelcontextprotocol#709 review:

  • EverythingServer.Core - Shared library with all MCP handlers (tools, prompts, resources, subscription management). Exposes AddEverythingMcpHandlers() extension method.
  • EverythingServer.Http - HTTP transport using ASP.NET Core. Per-session subscriptions managed via RunSessionHandler.
  • EverythingServer.Stdio - Stdio transport using Microsoft.Extensions.Hosting. Single-session with global subscriptions, background services as hosted services, stderr logging.

Usage

Both implementations share identical MCP functionality:

// HTTP (EverythingServer.Http/Program.cs)
var builder = WebApplication.CreateBuilder(args);
builder.Services
    .AddMcpServer()
    .WithHttpTransport(options => { /* session handler */ })
    .AddEverythingMcpHandlers(subscriptions);

// Stdio (EverythingServer.Stdio/Program.cs)
var builder = Host.CreateApplicationBuilder(args);
builder.Services
    .AddMcpServer()
    .WithStdioServerTransport()
    .AddEverythingMcpHandlers(subscriptions);

Files Changed

  • Created samples/EverythingServer.Core/ with shared handlers
  • Created samples/EverythingServer.Stdio/ for stdio implementation
  • Renamed samples/EverythingServer/samples/EverythingServer.Http/
  • Updated ModelContextProtocol.slnx with new projects
  • Added README files documenting each project

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

can you create a PR to address modelcontextprotocol#889 ? the PR modelcontextprotocol#709 moved the EverythingServer sample from being stdio to http, but we need the option to run stdio too.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 7, 2025 18:40
Co-authored-by: asklar <22989529+asklar@users.noreply.github.com>
Co-authored-by: asklar <22989529+asklar@users.noreply.github.com>
Copilot AI changed the title [WIP] Add option to run EverythingServer sample with stdio Add stdio transport support to EverythingServer sample Nov 7, 2025
Copilot AI requested a review from asklar November 7, 2025 18:51
Copilot finished work on behalf of asklar November 7, 2025 18:51
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