Implementation:21st dev Magic mcp tools list
| Knowledge Sources | |
|---|---|
| Domains | Protocol, Discovery |
| Last Updated | 2026-10-19 16:40 GMT |
Overview
Concrete tool for discovering the tools available to the authenticated account, provided by the 21st MCP server (reached through the proxy).
Description
The tools/list JSON-RPC method returns the tool list the 21st MCP server exposes to the authenticated account. Tool discovery requires authentication and reflects the account's AI access — `generate` and `iterate_generation` appear only when AI is enabled. The proxy forwards discovery verbatim, so existing proxy versions receive new tools without an npm update. Hosted server-side at `https://21st.dev/api/mcp`; this repo only forwards the request opaquely over the proxy.
This is a Wrapper Doc: the call is the standard MCP `tools/list` method, used here through the forward() proxy to verify auth and AI entitlement.
Usage
Call `tools/list` to (1) confirm the connection/auth works (a successful reply proves `x-api-key` is valid), and (2) see which tools the account can use — in particular whether `generate` is listed (confirming AI access). After enabling AI, refresh the tool list or reconnect before generating.
Code Reference
Source Location
- Repository: magic-mcp (proxy; method is server-side)
- Docs: README.md:L61, llms-install.md:L50, skills/21st-ui/SKILL.md:L34
- Transport: forwarded via Implementation:21st_dev_Magic_mcp_forward (src/index.ts:L118-204)
Signature
// Standard MCP JSON-RPC method, proxied to https://21st.dev/api/mcp
// No arguments.
tools/list(): Array<{
name: string;
description: string;
inputSchema: object; // JSON schema for the tool's arguments
}>;
Import
// Not imported. Call as the standard MCP method through the proxy:
// { "jsonrpc": "2.0", "id": <n>, "method": "tools/list" }
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | No params; gated by authenticated `x-api-key` |
Outputs
| Name | Type | Description |
|---|---|---|
| tools | Array | Tool list available to the account (presence of `generate` confirms AI on) |
Usage Examples
Verify connection and AI access
{
"jsonrpc": "2.0",
"id": 9,
"method": "tools/list"
}
A successful reply confirms auth works. If `generate` is absent, AI is off — use `search`/`get_component` instead, and do not retry generation.
Related Pages
Implements Principle
Requires Environment
Notes
- A successful reply also confirms auth — making this a connection-verification tool (Principle:21st_dev_Magic_mcp_Auth_Failure_Recovery checks the failure path).
- Companion: Implementation:21st_dev_Magic_mcp_get_usage reports the `aiGenerationEnabled` flag.