From 124b92aa500e7275f3cec0536bd44991b4523a29 Mon Sep 17 00:00:00 2001 From: Joaquim Verges Date: Sun, 27 Jul 2025 11:07:15 +1200 Subject: [PATCH] [Docs] Update MCP authentication from headers to query parameters --- apps/portal/src/app/Header.tsx | 36 +++++--- apps/portal/src/app/ai/llm-txt/page.mdx | 30 ++++++- apps/portal/src/app/ai/mcp/page.mdx | 114 ++++++++++++++++++++---- apps/portal/src/app/page.tsx | 32 +++++-- 4 files changed, 170 insertions(+), 42 deletions(-) diff --git a/apps/portal/src/app/Header.tsx b/apps/portal/src/app/Header.tsx index 4dec4a429cf..4d91309b59c 100644 --- a/apps/portal/src/app/Header.tsx +++ b/apps/portal/src/app/Header.tsx @@ -141,6 +141,17 @@ const apisLinks = [ }, ]; +const aiLinks = [ + { + href: "/ai/mcp", + name: "MCP", + }, + { + href: "/ai/llm-txt", + name: "LLMs.txt", + }, +]; + const sdkLinks = [ { href: "/references/typescript/v5", @@ -288,16 +299,7 @@ export function Header() {
setShowBurgerMenu(false)} />
@@ -358,13 +360,25 @@ export function Header() { ))} +
+

AI

+ {aiLinks.map((link) => ( + setShowBurgerMenu(false)} + /> + ))} +
+

SDKs

{sdkLinks.map((link) => ( setShowBurgerMenu(false)} /> diff --git a/apps/portal/src/app/ai/llm-txt/page.mdx b/apps/portal/src/app/ai/llm-txt/page.mdx index f1766ac20d5..223891ee745 100644 --- a/apps/portal/src/app/ai/llm-txt/page.mdx +++ b/apps/portal/src/app/ai/llm-txt/page.mdx @@ -2,20 +2,42 @@ Use these llms.txt files to instruct your LLM on how to use the thirdweb API. -### thirdweb API reference +## How to use + +Download the llms.txt file you want to use and add it to your project files or ruleset. + +Reference them in your prompts when asking to build a feature, or alternatively inject the url directly in your prompt. + +Example: + +```txt +Add a login screen that lets the user enter the email and confirm a verification code. +then display their email and wallet address in the header. +Docs: https://api.thirdweb.com/llms.txt +``` + +## thirdweb API reference The [thirdweb HTTP API reference](https://api.thirdweb.com/reference) as markdown. Available at: https://api.thirdweb.com/llms.txt -### Typescript SDK quick reference +**Recommended for:** Web and native applications, servers, agents using the HTTP thirdweb API. + + +## Typescript SDK quick reference Contains a table of contents for the thirdweb Typescript SDK documentation. Available at: https://portal.thirdweb.com/llms.txt -### Typescript SDK full documentation +**Recommended for:** Typescript, react or react native applications that deal with external wallets and advanced blockchain features. + + +## Typescript SDK full documentation Contains the entire thirdweb Typescript SDK documentation as markdown. Requires large context windows. -Available at: https://portal.thirdweb.com/llms-full.txt \ No newline at end of file +Available at: https://portal.thirdweb.com/llms-full.txt + +**Recommended for:** Typescript, react or react native applications that deal with external wallets and advanced blockchain features. \ No newline at end of file diff --git a/apps/portal/src/app/ai/mcp/page.mdx b/apps/portal/src/app/ai/mcp/page.mdx index 135ec5a101a..311195d42dc 100644 --- a/apps/portal/src/app/ai/mcp/page.mdx +++ b/apps/portal/src/app/ai/mcp/page.mdx @@ -1,25 +1,33 @@ +import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"; + # MCP server You can use the thirdweb MCP server to interact with the thirdweb API from your agents or LLM client. -### Remote MCP endpoint +## Remote MCP endpoint You can access the MCP server at the following url, with your project secret key. ```http -# endpoint -POST /mcp -Host: api.thirdweb.com - -# auth header (required) -x-secret-key +POST https://api.thirdweb.com/mcp?secretKey= ``` -### Usage with LLM clients +Make sure to keep your secret key safe and never share it with anyone. + +## Usage with LLM clients You can also use the MCP server on your own LLM client, like cursor, claude code and more. Refer to your LLM client's documentation for more information. -#### Example usage with Cursor: + + + +Cursor +WindSurf +VS Code +Claude Code + + + Add the following to your `.cursor/mcp.json` file: @@ -27,16 +35,59 @@ Add the following to your `.cursor/mcp.json` file: { "mcpServers": { "thirdweb-api": { - "url": "https://api.thirdweb.com/mcp", - "headers": { - "x-secret-key": "" - } + "url": "https://api.thirdweb.com/mcp?secretKey=", + } + } +} +``` + + + + + +Add the following to your `~/.codeium/windsurf/mcp_config.json` file: + +```json +{ + "mcpServers": { + "thirdweb-api": { + "url": "https://api.thirdweb.com/mcp?secretKey=", + } + } +} +``` + + + + + +Add the following to your VS Code `.vscode/mcp.json` file: + +```json +{ + "mcp.servers": { + "thirdweb-api": { + "url": "https://api.thirdweb.com/mcp?secretKey=", } } } ``` -### Usage with agents + + + + +Run the following command to add the MCP server to your Claude Code configuration: + +```bash +claude mcp add --transport http "thirdweb-api" "https://api.thirdweb.com/mcp?secretKey=" +``` + + + + + +## Usage with agents Use your favorite agent framework to plug in the MCP server as a collection of tools for your agent. Refer to your agent framework's documentation for more information. @@ -50,10 +101,7 @@ client = MultiServerMCPClient( { "thirdweb-api": { "transport": "streamable_http", - "url": "https://api.thirdweb.com/mcp", - "headers": { - "x-secret-key": "" - }, + "url": "https://api.thirdweb.com/mcp?secretKey=", } } ) @@ -62,3 +110,33 @@ agent = create_react_agent("openai:gpt-4.1", tools) response = await agent.ainvoke({"messages": "create a server wallet called 'my-wallet'"}) ``` +Once installed, you can use the entire thirdweb API with natural language. + +## Example prompts + +#### Managing server wallets + +``` +List my server wallets +``` + +``` +Create a server wallet called treasury +``` + +``` +What's the balance of treasury wallet? +``` + +#### Managing contracts + +``` +List my contracts +``` + +#### Executing transactions + +``` +approve 100 USDC from treasury wallet to executor wallet +``` + diff --git a/apps/portal/src/app/page.tsx b/apps/portal/src/app/page.tsx index bb29b677422..a9bd452f6db 100644 --- a/apps/portal/src/app/page.tsx +++ b/apps/portal/src/app/page.tsx @@ -1,4 +1,4 @@ -import { MessageCircleIcon, WebhookIcon } from "lucide-react"; +import { BotIcon, MessageCircleIcon, WebhookIcon, ZapIcon } from "lucide-react"; import Image from "next/image"; import Link from "next/link"; import { Heading } from "@/components/Document"; @@ -66,14 +66,28 @@ function Hero() { function PlaygroundSection() { return (
- - + +
+ + + +
); }