Skip to content

Add option to enable either stdio or SSE transports when running server-everything using npx #1594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
olaservo opened this issue Apr 26, 2025 · 1 comment · Fixed by #1673
Labels
enhancement New feature or request server-everything Reference implementation for the Everything MCP server - src/everything

Comments

@olaservo
Copy link
Member

Is your feature request related to a problem? Please describe.
Sometimes it would be more convenient to test or demo a client using server-everything without having to build it.

Describe the solution you'd like
An option to pass the start-sse command (or the new streamable sse equivalent) to the server when using npx (i.e. installing it as a package).

Describe alternatives you've considered
The alternative that works today is to build the server and run it using the node command. This is fine but takes more steps to set up.

@olaservo olaservo added enhancement New feature or request server-everything Reference implementation for the Everything MCP server - src/everything labels Apr 26, 2025
@olaservo olaservo changed the title Add option to enable either stdio or streamable SSE transport when running server-everything using npx Add option to enable either stdio or SSE transports when running server-everything using npx Apr 26, 2025
@cliffhall
Copy link
Contributor

cliffhall commented May 5, 2025

With server-everything@latest installed globally, this works:

npm run -g start:streamableHttp --prefix "$(npm root -g)/@modelcontextprotocol/server-everything"

This isn't the greatest solution so I'm looking into it further.

cliffhall added a commit to cliffhall/mcp-servers that referenced this issue May 5, 2025
…mand line.

# Run the default (stdio) server
```npx @modelcontextprotocol/server-everything```

# Or specify stdio explicitly
```npx @modelcontextprotocol/server-everything stdio```

# Run the SSE server
```npx @modelcontextprotocol/server-everything sse```

# Run the streamable HTTP server
```npx @modelcontextprotocol/server-everything streamableHttp```

* In src/everything/index.ts
  - refactor/extracted contents to stdio.ts
  - replaced with code that
    - Gets the single argument from the commandline as scriptName
    - switches on scriptName
    - imports the appropriate server script or outputs usage options
  - scripts run on import

* In src/everything/stdio.ts
  - added console log "Starting default (STDIO) server..."

* In src/everything/sse.ts
  - added console log "Starting SSE server..."

* In src/everything/streamableHttp.ts
  - added console log "Starting Streamable HTTP server..."

* This fixes modelcontextprotocol#1594
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server-everything Reference implementation for the Everything MCP server - src/everything
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants