fio-net-tools-mcp
# fio-net-tools-mcp
ネットとデータを触る小道具を、MCP サーバーとして出します。標準ライブラリだけで動きます(`mcp` を除く)。
Network and data utilities as an MCP server (stdio). Standard library only, apart from the `mcp` package.
自律エージェント「フィオ」の道具から切り出した物です。
| 道具 | すること |
|---|---|
| `ssl_cert_info` | host:port の証明書(発行者・期限・SAN・TLS の版) |
| `dns_lookup` | DNS を引く(A/AAAA は標準ライブラリ、ほかは dig / nslookup があれば) |
| `whois_lookup` | whois(IANA に担当を訊いてから本照会・TCP 43) |
| `url_healthcheck` | 複数 URL の状態と応答時間を並列に |
| `http_request` | 任意の HTTP リクエスト(ヘッダ・本文・JSON) |
| `json_query` | JSON を `a.b[0].c` の形で掘る |
| `tcp_check` | host:port に繋がるかと遅延 |
| `encode_decode` | base64 / hex / URL と md5 / sha1 / sha256 |
| `csv_preview` | CSV / TSV の列と先頭の行 |
- 失敗は `isError: true` で返します。返りの字面ではなく型で失敗を分けています([fio-typed-failure](https://github.com/su-mi-ka/fio-typed-failure) と同じ物を同梱)。
- `http_request` は外へ書き込む要求(POST など)も送れます。使う側で宛先を確かめてください。
- 相手の持ち物でない機体を探る道具(ポートを掃く等)は入れていません。
## 起動
```
pip install .
fio-net-tools-mcp # stdio の MCP サーバー
```
MCP クライアントの設定例は `mcp.example.json` にあります。
## テスト
```
pip install -e .[dev]
pytest
```
テストは手元の口(127.0.0.1)だけを叩きます。外のネットには出ません。
## License
MIT
TDQS
Scored across 9 tools
Each tool targets a distinct operation (HTTP request, JSON extraction, TCP liveness, encode/hash, CSV preview, TLS cert, DNS, whois, multi-URL healthcheck). The closest overlaps are url_healthcheck vs http_request and tcp_check vs ssl_cert_info, but the descriptions explicitly state the boundaries (multi-URL status-only vs full request/body; TCP port liveness vs TLS handshake details).
Snake_case is used throughout and most names follow a clear resource_action pattern (http_request, csv_preview, tcp_check, ssl_cert_info, dns_lookup, whois_lookup, json_query, url_healthcheck). The only outlier is encode_decode, which uses a verb_verb form instead of the dominant noun_verb shape.
Nine tools is well within the sweet spot and each one maps to a concrete network/diagnostic utility. No redundant or trivially thin entries; no obvious tool that should be merged away.
The surface covers HTTP, JSON, TCP, DNS, whois, TLS, encoding/hashing, CSV, and bulk URL health — a solid lifecycle for network diagnostics. Minor gaps remain: no ICMP ping/traceroute, no generic port-range or UDP check, and csv_preview is the only local-file reader, so broader local inspection isn't supported.