Updated example in README.md for increased outreach#82
Updated example in README.md for increased outreach#82dsp-ant merged 1 commit intomodelcontextprotocol:mainfrom miguelg719:80
Conversation
| # Initialize the connection | ||
| await session.initialize() | ||
| async def run(): | ||
| async with stdio_client(server_params) as (read, write): |
There was a problem hiding this comment.
meanwhile I'm just trying to figure out how to launch a client that doesn't require launching a server in the same script lol
There was a problem hiding this comment.
It seems like anyio supports tcp (connect_tcp). One option is to follow that route, having the server listen in a port and the client connect to it. That's probably the idea moving forward when running client/servers from different hosts (better if upgraded to TLS).
There was a problem hiding this comment.
@logan-markewich feel free to move that to a discussion https://github.com/orgs/modelcontextprotocol/discussions
dsp-ant
left a comment
There was a problem hiding this comment.
Thank you. These improvements make a lot of sense and help quite a bit. Really appreciated.
| # Initialize the connection | ||
| await session.initialize() | ||
| async def run(): | ||
| async with stdio_client(server_params) as (read, write): |
There was a problem hiding this comment.
@logan-markewich feel free to move that to a discussion https://github.com/orgs/modelcontextprotocol/discussions
Updated the examples in README.md for improved accessibility and further outreach.
Fixes #80
Motivation and Context
Took a while to get the first test server running while trying to build a new custom MCP server. Although I did not give up, I'm afraid other people might; especially during first contact. I'm just trying to make it more accessible.
How Has This Been Tested?
Simplified running of the two proposed snippets into two separate files. As long as python is executable from the terminal, it will work.
Breaking Changes
Types of changes
Checklist
Additional context
Thanks for your efforts