Skip to content

feat(mcp): add branded icons to MCP server-card - #8289

Merged
vanrensbird merged 3 commits into
mainfrom
geo/mcp-server-card-icons
Sep 17, 2026
Merged

vanrensbird merged 3 commits into
mainfrom
geo/mcp-server-card-icons

Conversation

@vanrensbird

@vanrensbird vanrensbird commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

What

Completes the registry-branding fields on the MCP server-card served at /.well-known/mcp/server-card.json (built by buildMcpServerCard() in apps/site/src/lib/agent-skills.ts):

  • icons — array of branded icons (the flagged gap)
  • title — human display name ("Prisma"), distinct from the technical name
  • websiteUrl — canonical link to prisma.io, as an authority/entity signal

Why

Part of the GEO / AI-visibility work with ora.ai. Their audit flagged "Registry branding":

MCP manifest has name and description but no icon at /.well-known/mcp/server-card.json. Agents choosing between servers see this first; a bare entry looks abandoned. Give the card a display name, an icon/logo, and a description — all three together read as a complete, branded listing.

The card already had name ("Prisma MCP") and description; the icon was the missing piece. title and websiteUrl round out the branded listing that agents and MCP registries surface.

How

  • Icon shape follows SEP-2127 (MCP Server Cards) and the MCP registry server.json schema: an icons array of { src, sizes, mimeType } — the format ora.run reads (same shape Apify adopted for ora.run + registry + SEP compat).
  • Points at the site's existing Next.js app-router assets /icon.svg (scalable) and /apple-icon.png (180×180 PNG fallback — clients are required to support PNG and only recommended to support SVG, so both are included).
  • All URLs are built from getBaseUrl() so they resolve correctly on preview deployments, not just production.

Resulting card (excerpt)

"name": "Prisma MCP",
"title": "Prisma",
"description": "Manage Prisma Postgres databases using natural language. …",
"websiteUrl": "https://www.prisma.io",
"icons": [
  { "src": "https://www.prisma.io/icon.svg",      "sizes": ["any"],     "mimeType": "image/svg+xml" },
  { "src": "https://www.prisma.io/apple-icon.png", "sizes": ["180x180"], "mimeType": "image/png" }
]

No test or snapshot asserts the card shape; no other callers affected (buildMcpServerCards() and the route handler use the default baseUrl).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • MCP server cards now include a display title, website URL, and icon metadata.
    • Cards provide both SVG and PNG icon options with size and format details for improved compatibility across supported surfaces.
  • Tests

    • Added coverage to verify card links, titles, icon availability, image dimensions, and consistency across individual and grouped server cards.

Add an `icons` array to the MCP server-card served at
/.well-known/mcp/server-card.json. The card already exposes a display
name and description; adding icons completes the branded listing that
agents and MCP registries surface when choosing between servers.

Uses the SEP-2127 / MCP registry icon shape ({ src, sizes, mimeType })
and references the site's existing /icon.svg and /apple-icon.png assets
via getBaseUrl() so URLs stay correct across preview deployments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
blog Ready Ready Preview Sep 16, 2026 8:22pm UTC
docs Ready Ready Preview Sep 16, 2026 8:22pm UTC
eclipse Ready Ready Preview Sep 16, 2026 8:22pm UTC
site Ready Ready Preview Sep 16, 2026 8:22pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 2f34dc06-d57f-4321-a070-af8c0a039a92

📥 Commits

Reviewing files that changed from the base of the PR and between 5d5207c and 3ddee7c.

📒 Files selected for processing (2)
  • apps/site/src/lib/agent-skills.test.ts
  • apps/site/src/lib/agent-skills.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


Walkthrough

buildMcpServerCard now accepts an optional base URL and returns title, website URL, and SVG/PNG icon metadata. New tests validate URL resolution, icon files, MIME types, dimensions, and parity with the collection builder.

Changes

MCP server card icons

Layer / File(s) Summary
Server card metadata and validation
apps/site/src/lib/agent-skills.ts, apps/site/src/lib/agent-skills.test.ts
buildMcpServerCard adds title, website URL, and SVG/PNG icon entries. Tests validate URL resolution, icon metadata, PNG dimensions, and parity with buildMcpServerCards.

Priority: ⚪ Not assessed

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: ankur-arch

Merge Risk: ⚪ Minimal · up to 3ddee

The server-card metadata uses the normalized deployment URL and references the existing icon assets. No merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding branded icons to the MCP server-card. It is concise and directly related to the changeset.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch geo/mcp-server-card-icons

Comment @coderabbitai help to get the list of available commands.

Complete the registry-branding fields on the MCP server-card: a human
display `title` ("Prisma") distinct from the technical `name`, and a
`websiteUrl` pointing at the site (via getBaseUrl()) as an authority /
entity signal linking the server to prisma.io.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d assets

The card now advertises icons by URL, but nothing checked that those URLs
map to files Next.js actually serves. Add agent-skills.test.ts so the
suite fails if /icon.svg or /apple-icon.png is renamed or moved out of
src/app, if the PNG is resized without updating its declared size, or if
an icon's mimeType/sizes drift from the MCP registry schema. Also assert
that websiteUrl and the icon URLs follow the baseUrl argument and that
title stays distinct from name.
@prisma-robot

prisma-robot Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Reviewed at d041c1f (the head after the title/websiteUrl commit).

Checked and fine

  • Icon shape (src / sizes / mimeType), title, and websiteUrl match the MCP registry server.json schema (sizes must be WxH or any; image/svg+xml and image/png are both allowed).
  • src/app/icon.svg and src/app/apple-icon.png exist, the PNG header really is 180×180, and production already serves /icon.svg (image/svg+xml) and /apple-icon.png (image/png) with 200. Nothing in next.config.mjs or proxy.ts intercepts those paths.
  • Gates on this head: apps/site tests 85/85, types:check clean, oxfmt/oxlint clean.

One finding, fixed

  • Nothing tested the new card fields, and the icon URLs point at Next metadata-file paths by convention, so renaming, moving, or resizing either asset would ship a broken icon without any signal. I added apps/site/src/lib/agent-skills.test.ts (6 tests): icon URLs and websiteUrl follow the baseUrl argument; every icon maps to a real file under src/app; mimeType/sizes are valid per the schema; the PNG's declared size equals its actual header; title stays distinct from name; the server-cards.json collection carries the same icons. Pushed as 3ddee7c; suite is now 86/86.

I'll re-read the new head cold in a couple of minutes.

— reviewer

@prisma-robot

prisma-robot Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Review clean at 3ddee7c

What the PR does
buildMcpServerCard() in apps/site/src/lib/agent-skills.ts now takes an optional baseUrl (defaulting to getBaseUrl(), like its sibling builders) and adds title: "Prisma", websiteUrl: <baseUrl>, and an icons array pointing at the site's existing Next metadata files /icon.svg (any, image/svg+xml) and /apple-icon.png (180x180, image/png). The server-card.json and server-cards.json routes pick this up unchanged. apps/site/src/lib/agent-skills.test.ts pins the URLs, the on-disk assets, the PNG dimensions, and the schema shape.

Fresh read of this head

  • Branch is 0 commits behind main; three commits, two files, nothing outside the task.
  • getBaseUrl() returns URL.origin, so the ${baseUrl}/... concatenation never produces a double slash; the same pattern the other builders use.
  • Both assets exist in src/app, the PNG header really is 180×180, and production serves /icon.svg and /apple-icon.png with the right content types. No rewrite or redirect in next.config.mjs or proxy.ts claims those paths.
  • Field shape matches SEP-2127 / the MCP registry server.json icon schema.
  • No doc or spec in the repo describes the card, no CLAUDE.md invariant touched, no secrets.
  • Gates: apps/site tests 86/86, types:check green, oxfmt/oxlint clean.

One cosmetic note, not worth another push: the PR body's line "No test or snapshot asserts the card shape" is now stale since the test file landed.

Risk: low. Purely additive fields on a static JSON route; the assets it references are already live in production and the tests would fail if either moved or changed size.

— reviewer

@vanrensbird
vanrensbird merged commit d854179 into main Sep 17, 2026
16 checks passed
@vanrensbird
vanrensbird deleted the geo/mcp-server-card-icons branch September 17, 2026 08:39
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.

1 participant