A high-performance, sandboxed Model Context Protocol (MCP) server written in Rust and executed as a WebAssembly component using Spin.
Computes the deterministic cryptographic SHA-256 checksum of the provided text data.
Input Schema:
{
"data": "Text payload to hash"
}Output:
{
"sha256": "eeed4e41a4a2ca2ae378df140dbe1eea73bcc8ca3ca34cb5cd1c64089bf2b52d"
}Scans untrusted text and redacts sensitive patterns (API keys, bearer tokens, passwords, and email addresses) before the agent logs or forwards data.
Input Schema:
{
"text": "Payload containing potential credentials"
}Output:
{
"sanitized": "Text with secrets replaced by [REDACTED] and [REDACTED_EMAIL]"
}# Build the Wasm component
spin build
# Start the Spin HTTP server
spin upThe server listens on http://127.0.0.1:3000.
curl -X POST http://127.0.0.1:3000 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'curl -X POST http://127.0.0.1:3000 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "calculate_hash",
"arguments": {
"data": "Hello, Spin!"
}
}
}'curl -X POST http://127.0.0.1:3000 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "redact_secrets",
"arguments": {
"text": "Contact alice@example.com with api_key=sk-secret123"
}
}
}'Add this server to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"sandboxed-tools": {
"command": "curl",
"args": [
"-s",
"-X", "POST",
"http://127.0.0.1:3000",
"-H", "Content-Type: application/json",
"-d"
]
}
}
}