-
Notifications
You must be signed in to change notification settings - Fork 291
Integrated MCP server #5775
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
Integrated MCP server #5775
Conversation
It confuses the AI and we don't actually need it since the AI can specify the project in every request
| "args": ["mcp"] | ||
| } | ||
| } | ||
| ``` |
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.
I wonder why Github is freaking out here.
stack.yaml
Outdated
| # - github: ChrisPenner/hs-mcp | ||
| # commit: e903b3e63ec74057d35aa9fe82613f165f2f7b9f | ||
| - github: ChrisPenner/hs-mcp | ||
| commit: 14fe82d086a04e82b1c05d7f5a4bbd30eec22042 |
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.
Probably don't need both of these?
|
Nice. One suggestion for the prompts - just fetch them on use from https://github.com/unisoncomputing/unison-llm-support/tree/main I imagine we'll do a bunch more iteration on them... pretty much every time I use it I end up making tweaks so I'd rather not bundle the text with UCM until they're a bit more stable. I also had an idea for standardizing prompts. It's maybe out of scope for this PR, but the gist is you put some definitions in the Then there could be standard MCP commands to list available prompts for a project and/or load them as context. The prompts don't need to repeat the docs, they might literally say "read the docs for this function, then view the source for this definition blah blah blah" What I've observed is that the generic prompts can be relatively effective, but a more specialized prompt can be even better. |
|
@pchiusano Ah, good idea, I'll merge this with the concrete file but will look at changing that. |
Overview
Adds an MCP server into UCM itself via the
ucm mcpcommand, with tools for typechecking code, listing/searching/viewing definitions and searching Share.See the new mcp.md doc for setup instructions.
Implementation Details
NOTE: The
ucm mcpcommand needs to connect to your codebase, and is executed by AI agents, so will need to be able to run in tandem with UCM. To that end it opens the codebase without checking codebase locks.Currently the only endpoint which can mutate anything is
lib.install.UCM is much safer than it used to be w/r to concurrent commands, it no longer keeps an in-memory branch which would cause issues if altered; so any changes will be picked up automatically whenever a command is run.
The only potential issue would be running a
lib.installin MCP DURING a similar pull/lib.install in UCM, in which case one or the other update would be clobbered (but not corrupted or anything). It's worth looking into improving this.ucm mcpcommand for agents to call as a STDIO mcp server (the standard method)./docs/mcp.mdTesting
Paul and I have been experimenting with this branch, it's not an exact science since you just interact with the AI via prompts and stuff.
We don't have a transcript testing strategy for the STDIO MCP command, but see the MCP HTTP server PR adds transcript tests: #5788