Skip to content

Documentation

MCP server

7 tools 5 prompts 7 resources

This site is also an MCP server. Everything the pages here render - the catalog of every component, each one's full parameter table, the worked examples, the theming reference and the per-hosting-model setup - is exposed as tools an AI coding agent can call, answering from the packages this deployment actually references rather than from what a model half-remembers.

Connect your agent

One endpoint, no SDK, no key. Point any MCP client at it and the tools appear.

The server speaks MCP over streamable HTTP at /mcp - one POST endpoint with JSON-RPC in the body. Every tool is also a plain GET under /api/mcp/..., which is what makes each of them inspectable from a browser address bar. Both URLs below are this deployment's own.

MCP POST https://blazorui.bitplatform.dev/mcp
HTTP mirror GET https://blazorui.bitplatform.dev/api/mcp/{tool}?argument=value

Register the server

.vscode/mcp.json - VS Code and GitHub Copilot:

{
  "servers": {
    "bitBlazorUI": {
      "type": "http",
      "url": "https://blazorui.bitplatform.dev/mcp"
    }
  }
}

mcp.json - Cursor, Claude, Windsurf and anything else that speaks MCP:

{
  "mcpServers": {
    "bitBlazorUI": {
      "type": "http",
      "url": "https://blazorui.bitplatform.dev/mcp"
    }
  }
}

Tell the agent to use it

Add these rules to your agents.md, copilot-instructions.md, .cursor/rules, or whatever your agent reads. Most of what an agent needs to know is already in the server's own instructions - see the handshake below - so these say only which server to prefer and when.

### bit BlazorUI

- For all UI work in this Blazor project, you **MUST** use the bit BlazorUI MCP server.
- Start with `SearchBitBlazorUI`: this library's name for a thing is often not the one the task
  suggests (a select is `BitDropdown`, a toast is `BitSnackBar`, a skeleton is `BitShimmer`).
- Before writing markup, call `GetBitBlazorUIComponent` for every component you are about to use,
  and `GetBitBlazorUIComponentExamples` for the working code of anything non-obvious.
- Prefer `Bit*` components over plain HTML/CSS or another UI library.
Installing the library itself - the packages, the shared styles and scripts, cache busting - is on the Getting started page.

1. Handshake

Every session opens with initialize - and the answer carries the one block of text the server writes straight into the model's context.

The client states the protocol version it speaks and what it supports; the server answers with the same for itself. Each capability comes back as an empty object, which is the protocol working as intended: the key's presence is the declaration, and what goes inside is only the optional extras. A capability a server does not have is absent, not empty. Nothing here hands back a session id - streamable HTTP is stateless, so every request stands on its own and any replica can answer it. The client then sends an initialized notification, which takes no id and gets no result back. This page does both automatically when it loads.

POST https://blazorui.bitplatform.dev/mcp
Content-Type: application/json
Accept: application/json, text/event-stream

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-11-25",
    "capabilities": {},
    "clientInfo": { "name": "bit-blazorui-docs", "version": "1.0" }
  }
}

Connecting...

2. Discover the tools

tools/list is how an agent learns what a server can do. Nothing about this list is configured on the client - which is the point of the protocol.

Every tool comes back with its name, the description the model reads to decide whether to call it, a JSON Schema for its arguments, and its annotations. There are seven, and the count is the design rather than what was left over: a tool's description is paid for in every request of every session, so a listing is not a tool here - it is what a retrieval tool answers when it is called with no argument.

Nothing sent yet.

3. Call a tool

The one that does the work. Pick a tool, edit its arguments, and send.

The response pane shows the JSON-RPC envelope the client receives; the pane under it shows the text inside it, which is what an agent would actually put in front of the model. Try SearchBitBlazorUI with a screen described in your own words, or GetBitBlazorUIComponent with the name of another library's component - Select, Toast, Skeleton all resolve. Three of the seven take no required argument: send GetBitBlazorUIComponent with an empty object and the whole catalog comes back instead of one component.

Nothing sent yet.

4. Prompts and resources

The half of the server a person reaches rather than a model: ready-made workflows, and the same knowledge as documents to attach.

A prompt is a workflow a client lists as a slash command; each of these five spends its words on the order to call the tools in, because the failure mode of an agent here is not ignorance - it is writing markup from a remembered API before it has read the current one. A resource is a document addressed by URI, for a client that wants to attach documentation up front or let someone browse it. Both read the same catalogs the tools do, so neither can go stale relative to the other. resources/list deliberately leaves out the parameterised ones: a template is not a document, it is the shape of the URIs that address a family of them.

Nothing sent yet.

5. Completing an argument

How a client's picker offers the component names, the type names and the theming chapters without anyone typing one blind.

Every prompt argument and every template placeholder on this server is drawn from a closed set it already holds, so completion/complete can answer with the values that are valid for one argument, filtered by what has been typed so far. Type below and watch the request go out on each keystroke - which is exactly how an editor's picker uses it. Prefix matches come first, then anything containing what was typed.

Nothing sent yet.

6. The same tools over plain HTTP

No envelope, no framing, no client - every tool is a GET you can open in a browser tab.

The MCP methods are ordinary controller actions, so each one is also reachable as GET /api/mcp/{tool}. That is the quickest way to see what a tool answers - and it is what makes this server inspectable by anything that can fetch a URL, including a shell script and a browser address bar.

Nothing sent yet.

What the server exposes

And the three decisions behind it, because they are the ones that decide what a session costs.

Tools 7, over MCP and as GET /api/mcp/{tool} Search across everything; the full API of one component; its worked examples; any public type; the setup per hosting model; the theming reference a chapter at a time; and the icon search. Three of them answer with a listing when called with no argument, which is why there are no listing tools.
Annotations readOnlyHint, idempotentHint, destructiveHint, openWorldHint Every tool reads, reads only from this process, and answers the same way twice. A client that is told so can consult the documentation without stopping to ask permission first.
Answers one Markdown text block per call A component's parameter table is sixty rows of four fields: as JSON that is the four field names repeated sixty times. No tool declares an outputSchema either - with one, the SDK sends the object in structuredContent AND the identical payload in the text block the protocol wants there anyway, so every answer would cross the wire twice.
Instructions returned by initialize The one block of text the server writes into the model's context before it has called anything: which tool to reach for first, and the six rules that separate markup that compiles from markup that looks right.
Prompts add-bit-blazorui-to-app, build-bit-blazorui-screen, migrate-to-bit-blazorui, theme-bit-blazorui-app, debug-bit-blazorui-issue Ready-made workflows, each spending its words on the order to call the tools in rather than repeating the standing rules the instructions already carry.
Resources bitblazorui://components, /components/{name}, /components/{name}/examples, /types/{typeName}, /setup/{hostingModel}, /theming, /theming/{section} The same knowledge as documents a client can attach or browse, addressed by URI and read out of the same catalogs the tools answer from.
Completions completion/complete Every prompt argument and template placeholder is drawn from a closed set - the component names, the public types, the theming chapters, the hosting models - so a client's picker can offer them rather than ask someone to type one blind.
Transport POST /mcp (streamable HTTP, stateless) JSON-RPC in the body; the result arrives as a text/event-stream frame. No session id - SEP-2567 removed them from this transport, so any replica can answer any request.

How it stays true

Nothing on this server is written down twice. The site's own navigation decides which components exist and what they are also called; the loaded assemblies decide which package each one ships in and what it is generic over; the demo pages carry the hand-written parameter tables and the worked examples; the XML documentation compiled beside the library carries everything else. Adding a component to the nav is all it takes for it to appear in the catalog, in the search index and in the completions above - so the tools cannot describe a version of bit BlazorUI that this deployment is not running.

Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.