-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: Enhance MCP integration and example #8060
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
Conversation
pyproject.toml
Outdated
@@ -41,10 +41,12 @@ dependencies = [ | |||
"json-repair>=0.30.0", | |||
"tenacity>=8.2.3", | |||
"anyio", | |||
"mcp>=1.6.0", |
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.
Please don't include mcp in the main dependency. Include it in the extra dependency instead
pyproject.toml
Outdated
@@ -99,7 +101,7 @@ repository = "https://github.com/stanfordnlp/dspy" | |||
keywords = ["dspy", "ai", "language models", "llm", "openai"] | |||
|
|||
[tool.poetry.dependencies] | |||
python = ">=3.9,<3.13" | |||
python = ">=3.10,<3.13" |
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.
Please don't change the minimum support Python version
examples/README_mcp.md
Outdated
@@ -0,0 +1,127 @@ | |||
# DSPy Model Context Protocol (MCP) Guide |
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.
Examples are not actively used. Can we have a documentation page in docs/docs/tutorials?
@ThanabordeeN Thank you for the PR. The maintainer team is discussing how we should support the MCP integration in |
Okay , with pleasure. |
Hi, @ThanabordeeN. Regarding the MCP support in
|
Of course, I am interested in being a part of this development because I have personally benefited from using this tool in research and other personal projects. |
Thank you @ThanabordeeN ! Looking forward to collaborating with you. (+ Thank you @TomeHirata !) |
Could you please inform me where this part is located, or confirm if it has not yet been released in any branch?
|
@ThanabordeeN That quote is a plan, not a statement about something that exists. Read Tomu's post again, this is a list of proposals that this PR should adhere to.
|
Thank you for the explanation. |
1 similar comment
Thank you for the explanation. |
Hi, @ThanabordeeN. How's the progress so far? We got some requests for the MCP tool integration with ReAct, and want to ship the first version soon. If it would take time for you, would you mind us working on the development based on the idea in this PR? We can add you as a co-author of the PR. |
Hi , @TomeHirata Thank you for your message and the proposal regarding the MCP tool integration with ReAct. However, I am keen to collaborate closely to ensure this integration is completed successfully. |
@TomeHirata For cleaner commits, I'm going to open a new PR for the upcoming update. |
📝 Changes Description
TLDR; Enhanced DSPy's ReAct with concurrent MCP server support, enabling efficient integration with external APIs (e.g., Airbnb) through asynchronous operations and robust resource management.
This MR/PR introduces significant improvements to DSPy's ReAct framework, enabling concurrent interaction with multiple MCP (Model Context Protocol) servers. Key enhancements include:
mcp_multi_server_example.py
:mcp.py
:async_forward
inreact.py
) for efficient management of multiple server connections.Example Usage
✅ Contributor Checklist