Skip to content

Server Card

An MCP Server Card (SEP-2127, extension io.modelcontextprotocol/server-card) is a JSON document that names and describes one server. A server on streamable HTTP serves it at GET <streamable-http-url>/server-card with the media type application/mcp-server-card+json: a server at http://127.0.0.1:8000/mcp serves it at /mcp/server-card. A client reads it before it connects.

When you add a server to a local NimbleBrain by its URL, NimbleBrain reads its card. The card’s title, description and first icon name the connector, and the placements in its ai.nimblebrain/host block put the server’s views in the sidebar, with no catalog entry. Without a card the server still connects, named by its serverInfo and with no placements.

card_server.py
"""A server that describes itself with an MCP Server Card, read before a host connects."""
from fastmcp import FastMCP
from mcp.types import Icon
from nimblebrain_server_sdk import READS, add_server_card
mcp = FastMCP(
"com.example/notes", # the card's name: reverse-DNS, one slash
version="1.2.0",
website_url="https://example.com/notes",
icons=[Icon(src="https://example.com/notes.png", mime_type="image/png")],
)
add_server_card(
mcp,
title="Notes",
description="Saves and reads short notes.",
placements=[
{
"slot": "sidebar.apps",
"resourceUri": "ui://notes/board",
"label": "Notes",
"route": "notes",
}
],
)
@mcp.resource("ui://notes/board", mime_type="text/html;profile=mcp-app")
async def board() -> str:
return "<!doctype html><p>Notes</p>"
@mcp.tool(annotations=READS)
async def count_notes() -> int:
"""How many notes there are."""
return 0
if __name__ == "__main__":
mcp.run(transport="http", host="127.0.0.1", port=8000) # card at /mcp/server-card
Field From
name The server’s name, FastMCP("com.example/notes"). The card requires reverse-DNS form with one slash.
version FastMCP(version=...). Unset, FastMCP reports its own version, so set it.
description add_server_card(description=...), 1 to 100 characters, for a person choosing the server. Not the instructions, which are for the model.
title add_server_card(title=...), 1 to 100 characters. Omitted when not given. It is also the handshake’s serverInfo.title.
websiteUrl, icons FastMCP(website_url=..., icons=...). NimbleBrain shows the first icon that is https:, a data:image/... URI, or http: on a loopback host.
_meta["ai.nimblebrain/host"] add_server_card(placements=[...]), as {"hostVersion": "1.0", "placements": [...]}. Each placement has the keys of a catalog entry’s placement. Omitted when there are none.

name, version, websiteUrl and icons are the values the server’s serverInfo reports, so the card cannot contradict the live connection. FastMCP has no place for a title or a description, so you declare them, once, in add_server_card.

add_server_card also reports the title as the server’s serverInfo.title: in the initialize result on 2025-11-25, and in the serverInfo stamp of the server/discover result on 2026-07-28. A client that reads only the live connection then shows the title, not the reverse-DNS name. If the server already reports a title there through its own middleware, that title is kept. The serverInfo stamp on other 2026-07-28 results carries no title, since a FastMCP middleware cannot reach it.

  • Refused at import: a name that is not reverse-DNS, an empty or over-long description or title, a version range, a placement whose resourceUri is not ui://<authority>/<path>, placements under two authorities, an unknown placement key, and a second card on one server. The name, version, description and title limits are the Server Card schema’s, so a reader that validates against it refuses such a card; NimbleBrain drops the placement ones.
  • Streamable HTTP only. The card follows the MCP path (mcp.http_app(path="/api/mcp") serves /api/mcp/server-card). Over stdio, or on the SSE transport, nothing is served.
  • Public and read-only. GET only, with no authentication even when the server has an auth provider, CORS open to any origin, Cache-Control: public, max-age=3600, and an ETag that If-None-Match revalidates. FastMCP’s host and origin checks still apply to a server bound to a loopback address.
  • No remotes. A server cannot reliably know the URL its clients reach it at (it binds 0.0.0.0, sits behind a proxy, or is reached through a container’s host alias), and a client that fetched the card already has it.
  • Advisory. A host prefers what the live connection reports, and nothing in a card decides access. On a card NimbleBrain reads only the placements of the host block; hooks, notifications, admin tools and record arguments are grants an operator makes in a catalog entry.
test_card_server.py
"""The Server Card as a host fetches it before it connects, and its title in the handshake."""
import httpx2
from card_server import mcp
from fastmcp import Client
from nimblebrain_server_sdk import SERVER_CARD_MEDIA_TYPE
async def test_the_card_is_served_under_the_mcp_path() -> None:
app = mcp.http_app() # the streamable-HTTP app `mcp.run(transport="http")` serves
transport = httpx2.ASGITransport(app=app)
async with httpx2.AsyncClient(transport=transport, base_url="http://127.0.0.1") as http:
response = await http.get("/mcp/server-card", headers={"accept": SERVER_CARD_MEDIA_TYPE})
assert response.status_code == 200
assert response.headers["content-type"] == SERVER_CARD_MEDIA_TYPE
card = response.json()
assert (card["name"], card["version"], card["title"]) == ("com.example/notes", "1.2.0", "Notes")
assert (
card["_meta"]["ai.nimblebrain/host"]["placements"][0]["resourceUri"] == "ui://notes/board"
)
async def test_the_handshake_names_the_server_by_its_title() -> None:
async with Client(mcp) as client:
assert client.server_info is not None
assert client.server_info.title == "Notes"