Proposal for Client Examples Repository or Section in MCP Python SDK
Is your feature request related to a problem? Please describe.
While the MCP ecosystem has a dedicated repository for server examples (modelcontextprotocol/servers), there doesn't seem to be a centralized location for sharing client implementations.
This makes it harder for new developers to:
- Find reference implementations
- Learn best practices for client development
- See real-world examples of MCP integration
- Understand different patterns for tool handling
Describe the solution you'd like
I propose either:
- Creating a new
modelcontextprotocol/clientsrepository to showcase different client implementations, similar to the servers repository - Adding a subdirectory in the
examples/clientsdirectory in the python-SDK repository for community-contributed client examples.
I have developed a Python chatbot example that demonstrates:
- Connecting to multiple MCP servers
- Discovering and executing tools
- Supporting any OpenAI API-compatible LLM provider
- Tracking progress and handling capabilities
This example could serve as an initial reference implementation.
Describe alternatives you've considered
- Including example clients directly in the SDK documentation.
- Creating a separate repository exclusively for community-contributed client resources.
Additional context
The example CLI chatbot follows the SDK's development guidelines:
- Uses proper type hints
- Includes comprehensive docstrings
- Follows PEP 8 style
- Implements proper error handling
The code is ready for contribution and can be adjusted to fit any preferred format or additional guidelines.
I am happy to accept a examples/clients PR. Do you want to take a stab?
I like the idea of an clients repository with a README listing different clients. I'll talk to @jspahrsummers and see what he thinks and we can get that going.
Note that there is also https://modelcontextprotocol.io/clients
Great! I'll send a PR to add the client example to the examples/clients directory.
Hi! I believe this issue can be closed now — I just checked and saw that the example is now present under the examples/client directory. 👍