Skip to content

Add share project info MCP tool#6118

Merged
aryairani merged 4 commits intounisonweb:trunkfrom
bbarker:ShareProjectInfoTool
Jan 26, 2026
Merged

Add share project info MCP tool#6118
aryairani merged 4 commits intounisonweb:trunkfrom
bbarker:ShareProjectInfoTool

Conversation

@bbarker
Copy link
Contributor

@bbarker bbarker commented Jan 15, 2026

Add share-project-info MCP tool for authenticated project lookups

Overview

Adds a new MCP tool share-project-info that retrieves project information from Unison Share using the authenticated /ucm/v1/projects/project endpoint.

Why: Tools like reflex that check for dependency updates were making direct unauthenticated HTTP calls, which fails for private projects. The existing share-project-search tool doesn't return latestRelease info.

Example:

// Input: { "projectName": "@nusentry/timecapsule" }
// Output:
{
  "projectId": "P-2ceca6d1-e103-418f-93d4-7416ecf24932",
  "projectName": "@nusentry/timecapsule",
  "latestRelease": "0.0.1",
  "defaultBranch": "main"
}

Implementation notes

  • Added ShareProjectInfoTool to Types.hs with argument parsing
  • Added shareProjectInfo and ProjectInfoResponse to Share/API.hs
  • Added tool handler in Tools.hs

Test coverage

Tested manually by querying private project @nusentry/timecapsule - successfully returned project info with authentication.

@bbarker bbarker changed the title [Draft] and share project info MCP tool Add share project info MCP tool Jan 15, 2026
@bbarker
Copy link
Contributor Author

bbarker commented Jan 15, 2026

I added an mcp transcript test, with the caveat it will need updating as it stands whenever a new release of the example project is updated. Perhaps, the best thing to do is to use a project that never expects to be updated? open to suggestions on if there is a canonical project to use

@aryairani
Copy link
Contributor

Thanks — there is still a minor build error though; I'm assuming an overridden stack.yaml setting on your end caused it to be overlooked (or are you using cabal for development?)

Copy link
Member

@ChrisPenner ChrisPenner left a comment

Choose a reason for hiding this comment

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

Cool stuff!

Just wondering, were you aware of getProjectByName in Unison.Cli.Share.Projects?

I believe it already implements the call into this endpoint and it'd be nice not to duplicate that if we can avoid it :)

You can use cliToMCP to run it in the tool.

If it's possible to use that instead I'd prefer that.

Also, not sure what @aryairani prefers, but I think I'd prefer to omit the transcript entirely rather than include a transcript that depends on an external server and which could change at any time.

@aryairani
Copy link
Contributor

Cool stuff!

Just wondering, were you aware of getProjectByName in Unison.Cli.Share.Projects?

I believe it already implements the call into this endpoint and it'd be nice not to duplicate that if we can avoid it :)

You can use cliToMCP to run it in the tool.

If it's possible to use that instead I'd prefer that.

Also, not sure what @aryairani prefers, but I think I'd prefer to omit the transcript entirely rather than include a transcript that depends on an external server and which could change at any time.

Not sure if I understood — an MCP transcript that hits Share seems okay (or no?); but yeah it should be a project that wouldn't get updated. If we decide to go that way, we can create it.

@aryairani
Copy link
Contributor

@bbarker Looking forward to getting all of your recent contributions merged, just have some small loose ends on each. Feel free to let us know if you want an executive decision from our end, or else we can pick up the convo at any point.

@ChrisPenner
Copy link
Member

Not sure if I understood — an MCP transcript that hits Share seems okay (or no?); but yeah it should be a project that wouldn't get updated. If we decide to go that way, we can create it.

I personally prefer when all tests can run locally and aren't subject to changes in the outside world, but in this case it's between a test like that or no test at all, so whichever you like is okay with me 👍🏼

@ChrisPenner
Copy link
Member

@bbarker Arya and I chatted, I'll go ahead and remove the test and merge without it 👍🏼

Thanks for the contribution!

@ChrisPenner ChrisPenner added the ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved label Jan 22, 2026
@aryairani aryairani merged commit 6df4ba2 into unisonweb:trunk Jan 26, 2026
17 checks passed
@bbarker
Copy link
Contributor Author

bbarker commented Jan 27, 2026

Thanks, sorry for not seeing the comments earlier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants