Skip to content

fix: Use PNG icon from server.json instead of hardcoded favicon URL - #1938

Merged
jancurn merged 2 commits into
masterfrom
claude/youthful-meitner-3xl1vm
Nov 19, 2026
Merged

jancurn merged 2 commits into
masterfrom
claude/youthful-meitner-3xl1vm

Conversation

@jancurn

@jancurn jancurn commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

The server card's iconUrl now points at the 512×512 PNG from server.json instead of the low-res https://apify.com/favicon.ico. PNG rather than SVG because clients that render icons must support PNG, not SVG (SEP-2127). No issue: requested ad hoc by a maintainer. Written with Claude Code.

Breaking / unchanged

No contract change. apify-mcp-server-internal needs to bump @apify/actors-mcp-server from 0.21.12 to ship this and the "Apify" title from #1925.

Proof: unit tests pass. The existing test includes a PNG icon, which every icon-rendering client must support fails if server.json loses the PNG entry that iconUrl reads.

🤖 Generated with Claude Code

https://claude.ai/code/session_015KycPoRts1z2T24pspdzjz

`getServerCard()` set the SEP-1649 `iconUrl` field to
https://apify.com/favicon.ico, a low-resolution ICO. It now uses the
PNG entry of `icons` in `server.json` (512x512), so the card has one
icon source and `iconUrl` cannot drift from `icons`.

SEP-1649 puts no format rule on `iconUrl`. PNG is chosen over the SVG
because the registry `icons` field requires icon-rendering clients to
support PNG and JPEG, not SVG.

`APIFY_FAVICON_URL` had no other users and is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KycPoRts1z2T24pspdzjz
Comment thread src/server_card.ts Resolved
@jancurn
jancurn requested review from jirispilka and a balanced review from Copilot November 19, 2026 15:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the server card’s switch to the configured PNG icon.

No open issues 🎉

What changed in this PR

Updates the MCP server card to use the 512×512 PNG icon from server.json instead of the hardcoded favicon URL, without changing the card’s contract.

Changes:

  • Selects the PNG icon from the existing server metadata.
  • Removes the unused favicon URL constant.
  • Adds a unit test asserting that the card uses the configured PNG icon.
File Description
tests/​unit/​server_card.test.ts Adds coverage for the PNG icon URL selection.
src/​server_card.ts Sources iconUrl from the PNG entry in server.json.
src/​const.ts Removes the unused APIFY_FAVICON_URL constant.

Review effort: Balanced

@jirispilka

Copy link
Copy Markdown
Collaborator

The new test points iconUrl at the PNG icon from server.json repeats the same serverJson.icons.find(...) the code uses, so it only checks that the code equals itself. It would still pass if the lookup changed in both places. The case it could catch, server.json having no PNG icon, is already covered by includes a PNG icon, which every icon-rendering client must support. I'd drop the test. A one-line config swap doesn't need a regression test (see tests/UNIT_TESTING_GUIDE.md, "Do not re-assert fixture data").

Nit: the code comment cites SEP-1649 for the PNG reason, but the PR body cites SEP-2127. The "every client supports PNG" rule comes from 2127.

@jirispilka jirispilka left a comment

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 would fix the test, otherwise LGTM

The test repeated the same `icons.find()` lookup as `getServerCard()`,
so it only checked the code against itself. A `server.json` without a
PNG icon is already caught by `includes a PNG icon, which every
icon-rendering client must support`.

The code comment now cites SEP-2127, where the rule that clients must
support PNG comes from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KycPoRts1z2T24pspdzjz

jancurn commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

@jirispilka Both done in 01cd439: dropped the test, and the code comment now cites SEP-2127 for the PNG rule. Updated the Proof line in the PR body to match.


Generated by Claude Code

@jancurn
jancurn merged commit 27123db into master Nov 19, 2026
20 checks passed
@jancurn
jancurn deleted the claude/youthful-meitner-3xl1vm branch November 19, 2026 20:49
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.

4 participants