Skip to content
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

Add MCP Client Support #39

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mconflitti-pbc
Copy link

Issue #21

Adds ability to register an SSE or stdio MCP server with any Chat provider.

Tests provide contained examples of these MCP servers that the tests interact with to register tools remotely.

Slightly modifies how tools are created: Tool.from_func (maintains existing behavior) and Tool.from_mcp static methods.

The use of MCP does mean that Python 3.9 support would be dropped. If this is a major problem, happy to brainstorm ways to make MCP an extra and conditionally import it when needing it.

TODOs:

  • More docs
  • Updating Readme(s)
  • Verify tests

@wch
Copy link

wch commented Feb 5, 2025

It's great to see MCP support for Chatlas. A few thoughts about dependencies and requirements: The mcp dependency could be conditional on Python version, like "mcp>=1.2.1;python_version>='3.10'", and then the imports could be done conditional on Python version. But it might also make sense to make mcp an optional dependency, in a group named mcp.

@mconflitti-pbc
Copy link
Author

It's great to see MCP support for Chatlas. A few thoughts about dependencies and requirements: The mcp dependency could be conditional on Python version, like "mcp>=1.2.1;python_version>='3.10'", and then the imports could be done conditional on Python version. But it might also make sense to make mcp an optional dependency, in a group named mcp.

Sure thing! Out of curiosity, is there something that would require us to keep py3.9 support? I suppose that would be considered a breaking change.

@schloerke
Copy link
Contributor

schloerke commented Feb 5, 2025

Out of curiosity, is there something that would require us to keep py3.9 support?

Posit Open Source tries to support all python versions that are receiving security updates. Py3.9 will end its support in Oct '25.

Similarly, given the mcp is a non-critical code path, the mcp requirements shouldn't hinder the core functionality from running on an earlier python versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants