Skip to content

feat(mcp): advertise CodeGraph server branding#879

Open
fedosov wants to merge 2 commits into
colbymchenry:mainfrom
fedosov:mcp-server-branding-icon
Open

feat(mcp): advertise CodeGraph server branding#879
fedosov wants to merge 2 commits into
colbymchenry:mainfrom
fedosov:mcp-server-branding-icon

Conversation

@fedosov

@fedosov fedosov commented Jun 14, 2026

Copy link
Copy Markdown

feat(mcp): advertise CodeGraph server branding

Why

CodeGraph already has a clear identity on the website and in docs, but MCP clients can only show a plain codegraph server unless we advertise branding metadata.

This makes CodeGraph easier to recognize in source/tool pickers instead of blending into generic server or tool entries (also feels good).

Screenshot

CodeGraph source icon rendering in Codex

Summary

  • Advertise the human-readable CodeGraph title and embedded SVG icon during MCP initialize.
  • Attach the same icon metadata to CodeGraph tools returned from tools/list, so tool-level UI entries can render the CodeGraph icon too.
  • Share the branding metadata between direct sessions and the local daemon proxy path to avoid drift.

Risks and mitigations

  • Client compatibility: title/icon fields are optional and additive; existing required handshake and tool schema fields stay unchanged.
  • Direct vs daemon drift: direct, unindexed, and daemon/proxy paths are covered by tests.
  • Icon availability: the SVG is optimized and embedded as data:image/svg+xml;base64,..., so hosts do not need to resolve a remote URL.

Tests

  • npm run build
  • npx vitest run __tests__/mcp-initialize.test.ts __tests__/mcp-unindexed.test.ts
  • npx vitest run __tests__/mcp-daemon.test.ts
  • Manual MCP probe against /Users/fedosov/Dev/psnprices confirmed Base64 icon metadata in both serverInfo and all visible CodeGraph tools.

@fedosov fedosov force-pushed the mcp-server-branding-icon branch from 20a4463 to 88fb811 Compare June 14, 2026 11:23
@fedosov fedosov force-pushed the mcp-server-branding-icon branch from 88fb811 to b817e60 Compare June 14, 2026 11:54
@fedosov fedosov marked this pull request as ready for review June 14, 2026 12:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b817e60756

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/mcp/branding.ts Outdated
export const SERVER_ICON = {
src: `data:image/svg+xml;base64,${SERVER_ICON_BASE64}`,
mimeType: 'image/svg+xml',
sizes: '32x32',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Send icon sizes as an array

The MCP Icon schema defines sizes as string[] (see https://modelcontextprotocol.io/specification/2025-11-25/schema#icon), but this shared icon constant serializes it as a string. Because SERVER_ICON is emitted in both serverInfo.icons and every tool's icons/_meta.icons, clients that validate icon metadata can reject or drop the initialize/tools-list branding; use sizes: ['32x32'] or omit it for the SVG.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Could you do this please 🙏

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Alright! I will do this myself. Thanks anyway mister Codex 🫡

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