Skip to content

Commit 748ded9

Browse files
[Docs] Update MCP authentication from headers to query parameters
1 parent 34067c0 commit 748ded9

File tree

1 file changed

+96
-18
lines changed

1 file changed

+96
-18
lines changed
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+

0 commit comments

Comments
 (0)