如何将 CastHTML 远程 MCP 连接到 ChatGPT
约 1 分钟即可把 CastHTML 的远程 MCP 服务端接入 ChatGPT。如需排查 OAuth / 401 问题,可先用 OAuth 2.1 调试器体检端点。
🔒 Client-side only — never leaves your browser.
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"casthtml": {
"url": "https://casthtml.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}claude mcp add --transport http casthtml https://casthtml.com/mcp
With credential header:
claude mcp add --transport http casthtml https://casthtml.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
Or add to .vscode/mcp.json:
{
"servers": {
"casthtml": {
"type": "http",
"url": "https://casthtml.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}- Open Settings → Connectors (Integrations) → Add Custom Connector.
- Paste the endpoint URL:
https://casthtml.com/mcp - Provide your API key / Bearer token when prompted.
Bridge the remote endpoint into stdio with mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"casthtml": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://casthtml.com/mcp",
"--header",
"Authorization: Bearer YOUR_API_KEY"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"casthtml": {
"serverUrl": "https://casthtml.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace), then reopen Kiro's Agent panel to pick up the server:
{
"mcpServers": {
"casthtml": {
"url": "https://casthtml.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.codex/config.toml — Codex reads remote HTTP servers from [mcp_servers.*] tables:
[mcp_servers.casthtml] url = "https://casthtml.com/mcp" bearer_token_env_var = "CASTHTML_TOKEN"
Add to cline_mcp_settings.json (Cline → MCP Servers → Configure), or paste it via Cline's MCP marketplace file:
{
"mcpServers": {
"casthtml": {
"type": "streamableHttp",
"url": "https://casthtml.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:
{
"mcpServers": {
"casthtml": {
"httpUrl": "https://casthtml.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}接入步骤
- 启用开发者模式 — ChatGPT → Settings → Connectors → Advanced 开启 Developer Mode。
- 添加连接器 — 新建 Custom Connector,将
https://casthtml.com/mcp填入 MCP Server URL。 - 完成认证 — 在 CastHTML 控制台获取凭据,并将其作为
Authorization: Bearer <密钥>请求头加入配置。 - 验证 — 在 在线 Inspector 中粘贴
https://casthtml.com/mcp并运行 initialize + tools/list 验证连通性。
🧰 工具预览(5)
| Tool | Safety | Description | Parameters |
|---|---|---|---|
| publish_report ~140 tok | 🟠 Write | Publish an HTML page or Markdown report into a secure sandbox and get a shareable /r/{slug} link. | content*: stringtitle: stringformat: stringrender_mode: stringis_public: boolean |
| update_report ~97 tok | 🟠 Write | Update an existing report in place by id_or_slug while keeping the share link unchanged. | id_or_slug*: stringcontent*: stringtitle: string |
| list_reports ~40 tok | 🟢 Read | List the most recent 50 reports on the current account. | — |
| get_report ~56 tok | 🟢 Read | Fetch report metadata and body by id_or_slug. | id_or_slug*: string |
| delete_report ~63 tok | 🔴 Destructive | Permanently delete a report by id_or_slug and invalidate its share link. | id_or_slug*: string |