Repository navigation
Ship a Claude Code skill and an MCP server with the CLI - #108
Open
arav-agarwal2 wants to merge 1 commit into
Open
arav-agarwal2 wants to merge 1 commit into
arav-agarwal2 wants to merge 1 commit into
Conversation
Two ways for Claude to drive the CLI, both in the package. Skill: skills/mlperf-submissions/SKILL.md ships as package data, and `endpoints-submission-cli install-skill` copies it to ~/.claude/skills/ (or ./.claude/skills/ with --project, or --dest). It is versioned with the CLI, refuses to overwrite an edited copy without --force, and teaches Claude the commands, --json, and to confirm every write first. MCP server: `endpoints-submission-mcp`, from the new `mcp` extra. Every command is a tool, and each tool runs the installed CLI under the server's interpreter: JSON commands return parsed JSON, the rest return their status text. `runs get` and `submissions get` are split into get and download tools, since --download-to appends text to the JSON. - Tools carry MCP annotations: five read-only, four destructive (update, remove-run, withdraw, delete), so clients know what to confirm. - A provisional submission needs confirm_public_provisional=true, which stands in for the CLI's prompt; stdin is closed so no prompt can hang. - CLI failures are raised as ToolError: mcp 2.x hides any other exception's message, so "No API token provided" never reached the client. - The extra pins mcp>=2,<3: 2.x renamed FastMCP to MCPServer. mcp is also in `dev`, so CI type-checks and tests the server. Tests: every CLI command and option must reach a tool (verified by removing --pinned, which fails it); the skill's commands must exist; and a built wheel must contain the server, the skill, and both scripts, since setuptools' package list is explicit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
Collaborator
Author
|
Double-checked by hand - this LGTM. This should help a fair bit in terms of UI/UX |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two ways for Claude to drive the CLI, both shipped in the package.
Claude Code skill
skills/mlperf-submissions/SKILL.mdships as package data.endpoints-submission-cli install-skillcopies it to~/.claude/skills/. Use--projectfor./.claude/skills/, or--destfor anywhere else.--force.--json, and to confirm every write with the user first.MCP server
endpoints-submission-mcp, installed by the newmcpextra:--jsonreturn parsed JSON; the rest return their status text.runs getandsubmissions geteach become a get tool and a download tool, because--download-toappends text after the JSON.update_submission,remove_run_from_submission,withdraw_submission,delete_run). Clients use these to decide what to confirm with the user.confirm_public_provisional=true, which stands in for the CLI's interactive prompt. The server closes the command's input, so any prompt fails at once instead of hanging.Packaging
mcpextra pinned tomcp>=2,<3. 2.x renamedFastMCPtoMCPServer, and the server is written against 2.x.endpoints-submission-mcp) and a package-data entry for the skill.__main__.py, so the server can run the CLI with its own interpreter (python -m endpoints_submission_cli).mcpis also in thedevextra, so CI type-checks and tests the server.uv.lock:mcpand its dependencies.Notes for review
ToolError. Without the conversion, "No API token provided" reached the client only as "Error executing tool".--token, andcheck-submission's--quietand-o. The tool already returns the full report.create_run(..., test=True)would cover that end to end.Test plan
pytest: 1244 passed.ruffandmypyclean.--pinnedfromcreate_run, which failed withruns create: no tool sets {'pinned'}.mcpextra as an extra, not a hard dependency.endpoints-submission-mcpsays to install[mcp], andinstall-skillworks.check_submissionpassesvalid_standardizedand reports 17 errors oninvalid_submission.create_runwithdry_runreturns the payload.🤖 Generated with Claude Code