8000 Feature Request: Add MCP Support · Issue #397 · charmbracelet/mods · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature Request: Add MCP Support #397

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

Open
roychri opened this issue Nov 28, 2024 · 9 comments · May be fixed by #460 or #486
Open

Feature Request: Add MCP Support #397

roychri opened this issue Nov 28, 2024 · 9 comments · May be fixed by #460 or #486
Labels
enhancement New feature or request

Comments

@roychri
Copy link
roychri commented Nov 28, 2024

Is your feature request related to a problem? Please describe.

Anthropic just released MCP which will simplify how we can integrate new and diverse tools to LLM apps like this one. It would be useful and it would augment the value of mods if users could indicate if they want mods to talk to their SQLlite, or access files on their filesystem, or query some API, etc...
This would not only be supported by Anthropic models but any models which understand tools/function calling.
Anthropic released Python and Typescript SDK but people have started making GO equivalent.
Here's one: https://github.com/mark3labs/mcp-go (not affiliated)
And I think more will have appeared once you read this :-)

Describe the solution you'd like

Add in support for MCP Client to Mods and
Allow the user to specify in the config the various MCP Server they would like the LLM to access.

Something like:

mcpServers:
    sqlite:
        command: "uvx",
        args: ["mcp-server-sqlite", "--db-path", "/Users/YOUR_USERNAME/test.db"]

And then the user would be able to do:

$ mods how many users do I have in my sqlite?

and it would send the requests/calls using JSONRPC over Stdio or SSE Transports to fetch the data necessary to get a response.
There's already a number of MPC Server available like fetching web pages and sending messages on slack to name a few:
https://github.com/modelcontextprotocol/servers

Describe alternatives you've considered

No alternative since this might be the one common solution that will be the most successful/popular.
I do not know golang and I do not know if that go mcp sdk is mature enough to be used in this way yet.
But I thought I would see if anyone would be interested in using or implementing this.

Additional context

@roychri roychri added the enhancement New feature or request label Nov 28, 2024
@ezynda3
Copy link
ezynda3 commented Dec 1, 2024

+1 to this!!!

@ezynda3
Copy link
ezynda3 commented Dec 1, 2024

I'm the creator of the the Go SDK mentioned. It already supports clients for both the stdio and SSE transports. The Claude desktop app currently only supports stdio clients and most of the currently available servers as well.

Also this is my first go library so would be happy to have some more experienced Go devs have a look and possibly contribute even if just suggesting improvements.

Cheers!

@caarlos0
Copy link
Member

this would be awesome to add indeed! happy to help implementing/reviewing it if anyone is interested in helping :D

@ivishalgandhi
Copy link

+1

@roychri
Copy link
Author
roychri commented Feb 9, 2025

I've been trying to make progress on this... just a proof of concept really...

I have no experience in Go. I've been using AI to try to make progress on this. I can add the various data structure changes and call the Claude LLM which respond with a stream to call a tool/function, BUT, I cannot have "mods" see this tool call request, so I am not even at the step of calling the function and loop back. I am not familiar with how BubbleTea works. And the AI doesn't seem to know how that works either 😆

I could use some help here. I'll work on getting my current progress on a fork so you can see... and perhaps someone could even contribute? Maybe if I can get passed this hurdle I can continue with AI a bit more...

I'm focusing on getting it to work on Anthropic Claude as a first step, before trying to make it work on ALL models.

This was referenced Mar 8, 2025
@dexhorthy
Copy link

@roychri thanks for writing this up - I took a stab at starting this in #460 but there's plenty more to do if you wanna collab

@ezynda3 i can't speak for the internals, but the SDK you made worked like a charm, super easy to use and felt really idiomatic!

@ezynda3
Copy link
ezynda3 commented Mar 8, 2025

This is awesome! Glad the SDK is useful. Also open to any PRs if you feel anything is missing or can be improved.

@roychri
Copy link
Author
roychri commented Mar 10, 2025

@dexhorthy Nice job! I was also having trouble getting the tool's response back to the LLM for a loop.
What do you think about having the ability to assign mpc servers for a role? I could have a CLI Troubleshooter role with an MCP server that can execute cli commands for example.
Roles being already handled by MCP, it would be simply being able to indicate that this role have these mcp servers by default or something...
just a thought.

@dexhorthy
Copy link
dexhorthy commented Mar 11, 2025

@roychri from a UX perspective I really like that, and fits with agent paradigm of "agent is system prompt + tools" - I can't believe I didn't think of that.

It would require breaking change to roles, since today roles value is just a list of strings. Unless we added some kind of mcp::fetch mcp::sqlite sort of coding which feels kinda janky

Maybe there's a new thing called toolroles or agents that supports

toolroles:
  default:
    prompt: []
    mcpServers:
      - sqlite
      - fetch

and would be mutually exclusive with roles (maybe even honoring the same -r flags, etc)

just riffing here, and tbh not sure exactly when I'll be able to put in more time on this

@caarlos0 caarlos0 marked this as a duplicate of #212 Apr 11, 2025
@caarlos0 caarlos0 linked a pull request Apr 25, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
5 participants
0