DS

dnovitski/surfshield

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

0 stars 0 forks 品質 51 トレンド 14

Safe, policy-controlled web access for AI agents (MCP server and CLI)

概要

A Rust tool that accesses websites over HTTP GET/HEAD/POST/PUT/PATCH/DELETE under a security policy, usable as an (for Claude Code, Claude Desktop and other MCP clients) or as a . This installs the prebuilt binary from the latest release (Apple Silicon), so no Rust toolchain or access to crates.io is needed. An example config is then in $(brew --prefix)/share/surfshield/surfshield.example.toml. To update, run brew upgrade surfshield. The result consists of a JSON block with metadata (status, final URL, redirects, response headers, truncation) and, except with save_to, a second block with the body. In markdown mode the body is wrapped in >> markers; in raw mode it is unchanged. , , , : HTTP POST, PUT, PATCH and DELETE. These tools change state on the remote site (forms, API calls, deletions). They are separate tools, so you can choose per method in your MCP client whether to ask for confirmation. At most one of body, json and form.

README

以下は原文 README の抜粋です。原文を見る。

surfshield: controlled web access for AI agents

A Rust tool that accesses websites over HTTP GET/HEAD/POST/PUT/PATCH/DELETE under a security policy, usable as an MCP server (for Claude Code, Claude Desktop and other MCP clients) or as a CLI.

Install

With Homebrew:

brew install dnovitski/tap/surfshield

This installs the prebuilt binary from the latest release (Apple Silicon), so no Rust toolchain or access to crates.io is needed. An example config is then in $(brew --prefix)/share/surfshield/surfshield.example.toml. To update, run brew upgrade surfshield.

Or from source:

cargo install --path .

Use as an MCP server

claude mcp add surfshield -- surfshield serve

With your own config:

claude mcp add surfshield -- surfshield serve --config /path/to/surfshield.toml

Tools

fetch_url: HTTP GET.

Parameter Description
url http(s) URL
format markdown (default): HTML → Markdown, JSON pretty-printed. raw: the body exactly as received (base64 if it is not valid UTF-8)
headers Extra request headers, e.g. {"Accept": "application/json"}
max_chars Max. number of body characters (capped by max_output_chars)
save_to Save the exact body to this path, relative to download_dir. Only metadata is returned (path, bytes, SHA-256)
overwrite Replace an existing file at save_to

The result consists of a JSON block with metadata (status, final URL, redirects, response headers, truncation) and, except with save_to, a second block with the body. In markdown mode the body is wrapped in >> markers; in raw mode it is unchanged.

post_url, put_url, patch_url, delete_url: HTTP POST, PUT, PATCH and DELETE. These tools change state on the remote site (forms, API calls, deletions). They are separate tools, so you can choose per method in your MCP client whether to ask for confirmation.

Parameter Description
url http(s) URL
body Raw body, sent exactly (default Content-Type: text/plain; charset=utf-8)
json JSON body, sent with Content-Type: application/json
form Form fields, URL-encoded with Content-Type: application/x-www-form-urlencoded
headers, format, max_chars, save_to, overwrite As with fetch_url

At most one of body, json and form. Without a body, POST, PUT and PATCH send an empty body (Content-Length: 0) and DELETE sends none. A Content-Type in headers overrides the default. The result has the same shape as with fetch_url.

head_url: HTTP HEAD; returns status, final URL and response headers.

Use as a CLI

surfshield get https://example.com
surfshield get --raw https://example.com > page.html
surfshield get -o page.html https://example.com
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →