Skip to content

Commit 8ddf378

Browse files
[Docs] Update MCP authentication from headers to query parameters (#7726)
1 parent 34067c0 commit 8ddf378

File tree

4 files changed

+170
-42
lines changed

4 files changed

+170
-42
lines changed

apps/portal/src/app/Header.tsx

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,17 @@ const apisLinks = [
141141
},
142142
];
143143

144+
const aiLinks = [
145+
{
146+
href: "/ai/mcp",
147+
name: "MCP",
148+
},
149+
{
150+
href: "/ai/llm-txt",
151+
name: "LLMs.txt",
152+
},
153+
];
154+
144155
const sdkLinks = [
145156
{
146157
href: "/references/typescript/v5",
@@ -288,16 +299,7 @@ export function Header() {
288299
<div className="px-1">
289300
<DropdownLinks
290301
category="AI"
291-
links={[
292-
{
293-
href: "/ai/mcp",
294-
name: "MCP",
295-
},
296-
{
297-
href: "/ai/llms-txt",
298-
name: "LLMs.txt",
299-
},
300-
]}
302+
links={aiLinks}
301303
onLinkClick={() => setShowBurgerMenu(false)}
302304
/>
303305
</div>
@@ -358,13 +360,25 @@ export function Header() {
358360
))}
359361
</div>
360362

363+
<div className="flex flex-col gap-4">
364+
<h3 className="font-semibold text-lg">AI</h3>
365+
{aiLinks.map((link) => (
366+
<NavLink
367+
href={link.href}
368+
key={link.name}
369+
name={link.name}
370+
onClick={() => setShowBurgerMenu(false)}
371+
/>
372+
))}
373+
</div>
374+
361375
<div className="flex flex-col gap-4">
362376
<h3 className="font-semibold text-lg">SDKs</h3>
363377
{sdkLinks.map((link) => (
364378
<NavLink
365379
href={link.href}
366-
icon={link.icon}
367380
key={link.name}
381+
icon={link.icon}
368382
name={link.name}
369383
onClick={() => setShowBurgerMenu(false)}
370384
/>

apps/portal/src/app/ai/llm-txt/page.mdx

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,42 @@
22

33
Use these llms.txt files to instruct your LLM on how to use the thirdweb API.
44

5-
### thirdweb API reference
5+
## How to use
6+
7+
Download the llms.txt file you want to use and add it to your project files or ruleset.
8+
9+
Reference them in your prompts when asking to build a feature, or alternatively inject the url directly in your prompt.
10+
11+
Example:
12+
13+
```txt
14+
Add a login screen that lets the user enter the email and confirm a verification code.
15+
then display their email and wallet address in the header.
16+
Docs: https://api.thirdweb.com/llms.txt
17+
```
18+
19+
## thirdweb API reference
620

721
The [thirdweb HTTP API reference](https://api.thirdweb.com/reference) as markdown.
822

923
Available at: https://api.thirdweb.com/llms.txt
1024

11-
### Typescript SDK quick reference
25+
**Recommended for:** Web and native applications, servers, agents using the HTTP thirdweb API.
26+
27+
28+
## Typescript SDK quick reference
1229

1330
Contains a table of contents for the thirdweb Typescript SDK documentation.
1431

1532
Available at: https://portal.thirdweb.com/llms.txt
1633

17-
### Typescript SDK full documentation
34+
**Recommended for:** Typescript, react or react native applications that deal with external wallets and advanced blockchain features.
35+
36+
37+
## Typescript SDK full documentation
1838

1939
Contains the entire thirdweb Typescript SDK documentation as markdown. Requires large context windows.
2040

21-
Available at: https://portal.thirdweb.com/llms-full.txt
41+
Available at: https://portal.thirdweb.com/llms-full.txt
42+
43+
**Recommended for:** Typescript, react or react native applications that deal with external wallets and advanced blockchain features.
Lines changed: 96 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,93 @@
1+
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";
2+
13
# MCP server
24

35
You can use the thirdweb MCP server to interact with the thirdweb API from your agents or LLM client.
46

5-
### Remote MCP endpoint
7+
## Remote MCP endpoint
68

79
You can access the MCP server at the following url, with your project secret key.
810

911
```http
10-
# endpoint
11-
POST /mcp
12-
Host: api.thirdweb.com
13-
14-
# auth header (required)
15-
x-secret-key <your-project-secret-key>
12+
POST https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>
1613
```
1714

18-
### Usage with LLM clients
15+
Make sure to keep your secret key safe and never share it with anyone.
16+
17+
## Usage with LLM clients
1918

2019
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.
2120

22-
#### Example usage with Cursor:
21+
<Tabs defaultValue="cursor">
22+
23+
<TabsList>
24+
<TabsTrigger value="cursor">Cursor</TabsTrigger>
25+
<TabsTrigger value="windsurf">WindSurf</TabsTrigger>
26+
<TabsTrigger value="vscode">VS Code</TabsTrigger>
27+
<TabsTrigger value="claudecode">Claude Code</TabsTrigger>
28+
</TabsList>
29+
30+
<TabsContent value="cursor">
2331

2432
Add the following to your `.cursor/mcp.json` file:
2533

2634
```json
2735
{
2836
"mcpServers": {
2937
"thirdweb-api": {
30-
"url": "https://api.thirdweb.com/mcp",
31-
"headers": {
32-
"x-secret-key": "<your-project-secret-key>"
33-
}
38+
"url": "https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>",
39+
}
40+
}
41+
}
42+
```
43+
44+
</TabsContent>
45+
46+
<TabsContent value="windsurf">
47+
48+
Add the following to your `~/.codeium/windsurf/mcp_config.json` file:
49+
50+
```json
51+
{
52+
"mcpServers": {
53+
"thirdweb-api": {
54+
"url": "https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>",
55+
}
56+
}
57+
}
58+
```
59+
60+
</TabsContent>
61+
62+
<TabsContent value="vscode">
63+
64+
Add the following to your VS Code `.vscode/mcp.json` file:
65+
66+
```json
67+
{
68+
"mcp.servers": {
69+
"thirdweb-api": {
70+
"url": "https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>",
3471
}
3572
}
3673
}
3774
```
3875

39-
### Usage with agents
76+
</TabsContent>
77+
78+
<TabsContent value="claudecode">
79+
80+
Run the following command to add the MCP server to your Claude Code configuration:
81+
82+
```bash
83+
claude mcp add --transport http "thirdweb-api" "https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>"
84+
```
85+
86+
</TabsContent>
87+
88+
</Tabs>
89+
90+
## Usage with agents
4091

4192
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.
4293

@@ -50,10 +101,7 @@ client = MultiServerMCPClient(
50101
{
51102
"thirdweb-api": {
52103
"transport": "streamable_http",
53-
"url": "https://api.thirdweb.com/mcp",
54-
"headers": {
55-
"x-secret-key": "<your-project-secret-key>"
56-
},
104+
"url": "https://api.thirdweb.com/mcp?secretKey=<your-project-secret-key>",
57105
}
58106
}
59107
)
@@ -62,3 +110,33 @@ agent = create_react_agent("openai:gpt-4.1", tools)
62110
response = await agent.ainvoke({"messages": "create a server wallet called 'my-wallet'"})
63111
```
64112

113+
Once installed, you can use the entire thirdweb API with natural language.
114+
115+
## Example prompts
116+
117+
#### Managing server wallets
118+
119+
```
120+
List my server wallets
121+
```
122+
123+
```
124+
Create a server wallet called treasury
125+
```
126+
127+
```
128+
What's the balance of treasury wallet?
129+
```
130+
131+
#### Managing contracts
132+
133+
```
134+
List my contracts
135+
```
136+
137+
#### Executing transactions
138+
139+
```
140+
approve 100 USDC from treasury wallet to executor wallet
141+
```
142+

apps/portal/src/app/page.tsx

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MessageCircleIcon, WebhookIcon } from "lucide-react";
1+
import { BotIcon, MessageCircleIcon, WebhookIcon, ZapIcon } from "lucide-react";
22
import Image from "next/image";
33
import Link from "next/link";
44
import { Heading } from "@/components/Document";
@@ -66,14 +66,28 @@ function Hero() {
6666
function PlaygroundSection() {
6767
return (
6868
<section>
69-
<SectionTitle anchorId="playground" title="Live Demos" />
70-
<ArticleCardIndex
71-
description="Try out our interactive playground to get started"
72-
external
73-
href="https://playground.thirdweb.com"
74-
icon={PlaygroundIcon}
75-
title="Playground"
76-
/>
69+
<SectionTitle anchorId="playground" title="Quick Starts" />
70+
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
71+
<ArticleCardIndex
72+
description="Try out our interactive playground to get started"
73+
external
74+
href="https://playground.thirdweb.com"
75+
icon={PlaygroundIcon}
76+
title="Playground"
77+
/>
78+
<ArticleCardIndex
79+
description="For agents and humans: use the thirdweb API with natural language"
80+
href="/ai/mcp"
81+
icon={BotIcon}
82+
title="MCP"
83+
/>
84+
<ArticleCardIndex
85+
description="Inject the thirdweb API reference in your prompts"
86+
href="/ai/llm-txt"
87+
icon={ZapIcon}
88+
title="LLMs.txt"
89+
/>
90+
</div>
7791
</section>
7892
);
7993
}

0 commit comments

Comments
 (0)