ac4af582301a4e8a29245dbba767eba31334ddf9
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
969868ccda |
library: a Python MCP server in a GitHub repository's folder is found and added filled in (CyberCaius on Discord)
CyberCaius pasted https://github.com/volcengine/mcp-server#subdirectory=server/mcp_server_askecho_search_infinity (Volcengine's askecho web search) into the Library's MCP search. The fragment was dropped, the MCP Registry was asked for "mcp-server" and "volcengine", nothing it lists is there, so the page offered only a blank command named "server". A GitHub address naming a folder (#subdirectory=, /tree/<ref>/…, /blob/<ref>/…/file) is now read before the registry: the folder's pyproject.toml names the program ([project.scripts]) and its README's "env": {…} examples the keys. It is offered as a normal market card: uvx --from git+https://github.com/o/r[@ref]#subdirectory=<path> <program>, with the keys asked for in the install sheet. Of several keys none is required (askecho takes an API key, or an access key and secret); one alone is. A bare repository is read that way only when the registry has nothing at it. A pypi.org/project/ page, or a one-word search naming mcp (with - _ or .) that the registry lists nothing by, asks PyPI's JSON API and offers uvx <package> with its description's keys. Claude Desktop is already wired for local Library servers (claude_desktop_config.json); the test installs it there. Run (mote): - go test ./internal/library -run 'TestMarket|TestParseRepoAt|TestEnvInputs': ok - go test ./internal/library rebased on |
||
|
|
6f4fb883eb |
library, gui: an MCP server's tools are listed by name and description (nf1qaz2w on Discord)
nf1qaz2w on Discord: "mcp现在好像只能看到有几个工具,看不到具体的工具名和描述等, 能否支持下?" The Library's MCP check kept only len(tools) from tools/list. What changed: - internal/library/mcp_check.go: ServerHealth carries ToolList (json "toolList"): each tool's name and the first paragraph of its description, whitespace collapsed and cut at 500 runes (a tool with only a title gets the title); names cut at 128; at most 500 tools kept while Tools still counts all. tools/list is now asked through listTools, shared by the stdio, streamable HTTP and SSE checks: it follows nextCursor up to 10 pages, each page with a step budget of its own (the #1467 per-step timeout), and a page after the first that is refused ends the list there. Before, nextCursor was ignored and only the first page counted. - internal/gui/assets/library.js/.css: a server whose check listed tools shows a chevron on its "N tools" status; a click opens the list under the row (name in the code font, description under it, "N more not shown" when magpie kept fewer than the server has, and Check again). Clicking the count again shuts it. A server with no listed tools keeps the old click, which checks it again. The list stays while it is checked again, no editor opens, no left-border stripe, no native select. The click guard keeps the clicked status in place (a centred row gives up 1px as it grows). - i18n: "Click to see them", "Click to hide them", "{n} more not shown" in zh, zh-TW, ja, de. - docs/subsystems/library.md: the check's tool list and paging. There is no CLI/TUI output of a server's check, so nothing changed there. What was run: - go test ./internal/library: TestCheckKeepsToolNames runs the check on the tools/list reply @modelcontextprotocol/server-filesystem really gave (captured with npx, testdata/filesystem-tools-list.json, 14 tools, the longest description 457 chars); TestCheckToolPages (no description, title only, a 1000-char description cut, two pages by nextCursor, the JSON the page reads); TestCheckToolPagesEnd (a server that pages forever is asked 10 times). With the list not kept and paging off, the first two fail: "got {State:ok Tools:14 ToolList:[] ...}, want ok with 14 tools, each listed" and "...Tools:3 ToolList:[]..., want ok with 4 tools over 2 pages". - GUI: internal/gui/tests/library-mcp-tools.test.cjs, Chromium and WebKit, en/zh/zh-TW/ja/de, at 980 and 420 wide: 20/20 pass; against the old library.js it fails. library-*.test.cjs, mcp-signin, search-mcp, i18n-keys and click-scroll in both engines: 377/377 pass. - gofmt -l (nothing), go vet / GOOS=linux / GOOS=windows go vet -tags nogui on internal/library and internal/gui, go build for darwin, linux and windows (nogui). Full go test -tags nogui ./... under the queue lock: every package ok but internal/provider, where TestClaudeSavedAccountDir failed "sign-in never finished" (waitDone's 2s bound on a fake claude process under full-suite load); alone it passes 5/5. Not touched here. |