Skip to content

add stdio-http proxy example #736

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

ochafik
Copy link
Contributor

@ochafik ochafik commented Jul 4, 2025

Example proxy wrapper around an stdio MCP server that expose it as a Streamable HTTP endpoint on the web (+ gives example usage guidelines w/ the Claude API)

This shows how to do transport-level proxying. A subsequent example will delve into higher-level proxying (w/ support for augmentations / filtering / etc).

Motivation and Context

Provide canonical code for simple transport-level proxying (lots of options on the web), and simple, preliminary security guidelines.

This is the full code of the upcoming tutorial in modelcontextprotocol/modelcontextprotocol#918

How Has This Been Tested?

Local testing + Claude API testing

Breaking Changes

None

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed
@ochafik ochafik changed the title Ochafik/stdio wrapper example add stdio-http proxy example Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant