CastHTML リモートMCPを Gemini CLI にMCP接続する方法(設定手順)
CastHTML のリモートMCPサーバーを Gemini CLI に約1分でMCP接続。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"
}
}
}
}接続手順
- 設定ファイルを編集 —
~/.gemini/settings.jsonを開きます。 - サーバーを追加 —
mcpServersに"casthtml": { "httpUrl":https://casthtml.com/mcp}を追加します。 - 認証を完了 — 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 |