Skip to content

added mcp_tool + Example #335

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

Merged
merged 16 commits into from
Mar 25, 2025
Merged

added mcp_tool + Example #335

merged 16 commits into from
Mar 25, 2025

Conversation

stevohuncho
Copy link
Contributor

Minimal implementation of MCP tooling via mcp-core. Includes an example of starting an MCP Server, creating an MCP client, and adding those MCP tools to a rig agent and executing a tool call.

Currently using mcp-core dep while the official mcp/rust-sdk is in development as it is not currently on crates.io. mcp-core is contributing its efforts to the official repo in the meantime.

Copy link
Contributor

@0xMochan 0xMochan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty straightforward. I have other plans on making working with tools in Rig much easier but I think my main suggestion here is using optional features for rig itself.

I think separately, mcp-core currently aligns itself to actix and other async web stuff but theoretically, it might be worthwhile to make it framework agnostic (similar to how rig doesn't force tokio). this could be a future goal!

Copy link
Contributor

@0xMochan 0xMochan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks pretty good!

@cvauclair
Copy link
Contributor

Hey @stevohuncho big thanks for the contribution! Would like to merge this asap, could you resolve the merge conflicts so we can push this forward? Thanks!

@stevohuncho
Copy link
Contributor Author

@cvauclair fixed the conflicts and updated the deps for a more recent version of the package allowing for a cleaner example

@cvauclair
Copy link
Contributor

@stevohuncho awesome! Now just need to get CI passing 😅

@0xMochan
Copy link
Contributor

I did some research, this is due to a recent unintentional breaking change made with a chrono patch release in one of our deps.

We'll have to mitigate this with a pinned dep ver but this pr is unblocked, we'll fix it on main.

apache/arrow-rs#7196

@0xMochan
Copy link
Contributor

0xMochan commented Mar 25, 2025

@stevohuncho So we have two options:

  1. we pin arrow=54.2.1 (which has the fix for chrono compat) in rig
  2. or we pin in mcp-core

Currently, this wasn't an issue with rig bc our chrono / arrow is before this but somehow, mcp-core added to the deps has changed this.. I'll see if we can fix it rig side

nvm, i'm figuring that it's entangled with the lance project like you mentioned, i have a fix coming!

@0xMochan 0xMochan merged commit 53b6a5f into 0xPlaygrounds:main Mar 25, 2025
5 checks passed
@github-actions github-actions bot mentioned this pull request Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants