Skip to content

Adding unpack as cli command and exposing via index.ts for typescript#5

Merged
felixrieseberg merged 1 commit intomodelcontextprotocol:mainfrom
Flux159:dxt-unpack
Jun 28, 2025
Merged

Adding unpack as cli command and exposing via index.ts for typescript#5
felixrieseberg merged 1 commit intomodelcontextprotocol:mainfrom
Flux159:dxt-unpack

Conversation

@Flux159
Copy link
Copy Markdown
Contributor

@Flux159 Flux159 commented Jun 26, 2025

Summary:

Adding an unpack command that allows users to unpack dxts. References #4.

Test plan:

Added an automated test in cli.test.ts that checks that pack and unpack work for a test directory with a manifest file.


Feel free to close out if you don't intend on adding this to the API, just thought it would be easy enough to get working that I might as well open up a PR.

Copy link
Copy Markdown
Collaborator

@felixrieseberg felixrieseberg left a comment

Choose a reason for hiding this comment

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

Oh wonderful, thank you so much!

@felixrieseberg
Copy link
Copy Markdown
Collaborator

@Flux159 We require all commits to be signed, would you be able to force push with signed commits? I'd love merge this in, this was actually on my todo list 🙇

@Flux159
Copy link
Copy Markdown
Contributor Author

Flux159 commented Jun 27, 2025

@felixrieseberg Thanks, just signed & squashed the commits.

Comment on lines +87 to +88
// Ensure the CLI is built
execSync("yarn build", { cwd: join(__dirname, "..") });
Copy link
Copy Markdown
Contributor Author

@Flux159 Flux159 Jun 28, 2025

Choose a reason for hiding this comment

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

@felixrieseberg - not sure if this is only on my machine, but if I do a clean git clone, sometimes I'm getting test failures because this yarn build doesn't actually build & create a dist/cli.js. Doing yarn build && yarn test via cli works fine & all tests pass.

Unsure if this is due to a conflict with the other yarn build on line 19 in this file or something else. Edit: Could be because of tsconfig.tsbuildinfo / something around incremental builds not creating dist - I have to rm tsconfig.tsbuildinfo && yarn build sometimes. Still unclear if this is just my environment.

Wanted to give a heads up incase it's failing some internal CI tests. I guess separate question: Do you want a PR for running tests in github actions?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I've seen this too and I can't quite figure out under what conditions TypeScript ends up with a borked tsbuildinfo. It's for sure not just you.

@felixrieseberg felixrieseberg merged commit 2c1d058 into modelcontextprotocol:main Jun 28, 2025
bryan-anthropic pushed a commit to bryan-anthropic/mcpb that referenced this pull request Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants