-
Notifications
You must be signed in to change notification settings - Fork 213
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
Updated example in README.md for increased outreach #82
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@logan-markewich feel free to move that to a discussion https://github.com/orgs/modelcontextprotocol/discussions
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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