-
Notifications
You must be signed in to change notification settings - Fork 288
mcp/examples: HTTP server example with a simple client built-in #168
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
60422ed
HTTP example.
wkoszek 2b21dbb
Add more details to README.
wkoszek 8d8a0b6
Add logging to make sure we know what's going on
wkoszek 45bff55
Fix arguments and log formatting.
wkoszek f832730
Split up logging middleware.
wkoszek f3d0ada
get_time -> cityTime
wkoszek d5c9351
Format.
wkoszek e312ab5
README updates.
wkoszek 1e2c65c
Dots
wkoszek cdb64ce
Accept URL
wkoszek 73c10f2
Bring better docs.
wkoszek 797dce4
Back to flags.
wkoszek ff8dcdd
Fix the docs.
wkoszek 391a32e
Format.
wkoszek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the server is always http, what's the point of letting the client be something different?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jba The very good use case of this example is testing with real-world MCP client. In my testing, I take this code and put it on the remote VPS server behind the HTTPS load-balancer, and then I can use our client to connect to this https. And then I can use real-world client like Claude.
In other words: server is listening on 8080 HTTP but the HTTPS is provided by Caddy. And then I can test different clients with our server code