rig icon indicating copy to clipboard operation
rig copied to clipboard

feat: Add support for mcp tools with rig agents + add anthropic prompt caching

Open edisontim opened this issue 11 months ago • 7 comments

Allows developers to use mcp tools and servers with rig.

Example usage:

        use mcp_client_rs::client::ClientBuilder;

        let fetch_client = ClientBuilder::new("uvx")
            .arg("mcp-server-fetch")
            .spawn_and_initialize()
            .await?;
        let fetch_tools = fetch_client.list_tools().await?.tools;

        let fetch_client = Arc::new(fetch_client);
        
        for tool in fetch_tools {
            agent = agent.mcp_tool(tool, fetch_client.clone());
        }

edisontim avatar Jan 17 '25 21:01 edisontim

@cvauclair could you have a look at this please?

edisontim avatar Jan 26 '25 20:01 edisontim

Hey @edisontim thanks for the PR! FYI we are currently looking at implementing MCP (clients, servers and compatibility with existing agents) directly into Rig, which is why there's been a delay to get this reviewed. I'll make a tracking issue for this so we can have a central place to discuss everything MCP related!

cvauclair avatar Feb 03 '25 15:02 cvauclair

Hey @cvauclair, any news on the issue to track MCP development?

edisontim avatar Feb 06 '25 23:02 edisontim

any issue to track this? I'm willing to contribute if there're some clear planing for MCP

caibirdme avatar Feb 11 '25 02:02 caibirdme

@cvauclair do you guys have a path for MCP?

edisontim avatar Feb 14 '25 15:02 edisontim

@cvauclair an answer would be appreciated. I'm continuing to push on this branch and imo it brings to the table multiple interesting features for anthropic users, namely the thinking feature for the new sonnet3.7 and prompt caching. It would be interesting to merge this branch to the main so I can also use new features implemented in the main branch, and how I should proceed with MCP

edisontim avatar Feb 24 '25 20:02 edisontim

Closed because I opened https://github.com/0xPlaygrounds/rig/pull/328, which has a refactor of the bedrock provider as well

edisontim avatar Feb 28 '25 19:02 edisontim