🙆
セキュリティ装置がいる環境で開発ツールが壊れる問題集(mcp/ uvx)
Claude for Desktop (mcp/uvx) で TLS エラーが発生する
Claude for Desktop の内部では、uvx 経由で mcp サーバー(fetch)を起動します。
2025-06-22T22:54:37.554Z [fetch] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0} { metadata: undefined }
× Failed to fetch: `https://pypi.org/simple/mcp-server-fetch/`
├─▶ Request failed after 3 retries
├─▶ error sending request for url (https://pypi.org/simple/mcp-server-fetch/)
├─▶ client error (Connect)
╰─▶ invalid peer certificate: UnknownIssuer
help: Consider enabling use of system TLS certificates with the
`--native-tls` command-line flag
2025-06-22T22:54:43.380Z [fetch] [info] Server transport closed { metadata: undefined }
しかし、セキュリティ装置によって差し込まれた自己署名証明書を信頼できないため、HTTPS リクエストで TLS エラーが発生します。
解決策
エラーメッセージにも書かれている通り、uvx の args
に --native-tls
を追加します。
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["--native-tls", "mcp-server-fetch"],
"env": {}
}
}
}
補足
この--native-tls
フラグにより、uvx は独自の証明書バンドルではなく、システムに登録された CAを使って TLS を検証するようになります。
Discussion