跳过主要内容

MCP

图片、PDF 与文件 MCP 工具

使用 Streamable HTTP 连接,让 AI 客户端发现并调用同一套工具契约。

连接信息

Endpoint: https://attachready.com/mcp

每个请求都需要 Better Auth session cookie 或 API key Bearer token。服务端会返回 requestId,并拒绝无效或过期凭证。

MCP 上传使用 upload_file 的 name、mimeType 和 contentBase64 参数;后续转换工具使用返回的 file id。

BASE_URL="https://attachready.com"
# Set API_KEY to your private account API key.
INIT=$(curl -si -N "$BASE_URL/mcp" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"example","version":"1.0.0"}}}')
SESSION_ID=$(printf '%s' "$INIT" | awk 'tolower($0) ~ /mcp-session-id:/ {print $2}' | tr -d '\r')
curl -N "$BASE_URL/mcp" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Session-Id: $SESSION_ID" \
  --data '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
工具发现

inspect_file

public · sync · 70s

Inspect uploaded bytes by fileId, or normalize explicitly supplied file facts.

upload_file

user · sync · 70s

Store an authenticated input file for later tool jobs.

validate_file

public · sync · 70s

Compare file facts with explicit submission rules.

compress_image

user · async · 70s

Compress an image to a verified byte target with optional downsampling.

inspect_image

user · async · 70s

Decode an uploaded image and inspect pixels, DPI and privacy metadata.

convert_image

user · async · 70s

Convert an image to JPEG, PNG, WebP or AVIF and remove private metadata.

resize_image

user · async · 70s

Resize an image proportionally with contain or cover fit.

crop_image

user · async · 70s

Crop an orientation-corrected image using validated pixel coordinates.

compress_pdf

user · async · 70s

Optimize a PDF and verify its actual output size and rules.

convert_image_to_pdf

user · async · 70s

Place one or more images into a checked PDF.

merge_pdfs

user · async · 70s

Merge PDFs in an explicit order and validate the result.

split_pdf

user · async · 70s

Split a PDF by a validated page range.

rotate_pdf

user · async · 70s

Rotate selected PDF pages and re-check the output.

create_submission_package

user · async · 70s

Build a named material package with a manifest and report.

get_job

user · sync · 70s

Read an authenticated asynchronous job status.

list_jobs

user · sync · 70s

List authenticated asynchronous jobs with cursor pagination.

cancel_job

user · sync · 70s

Cancel an authenticated non-terminal asynchronous job.

download_artifact

user · sync · 70s

Create an authenticated short-lived artifact download.

save_rule

user · sync · 70s

Save an authenticated reusable submission rule template.

list_rules

user · sync · 70s

List authenticated owner-scoped submission rule templates.

get_rule

user · sync · 70s

Read one authenticated owner-scoped submission rule template.

delete_rule

user · sync · 70s

Delete one authenticated owner-scoped submission rule template.

get_entitlements

user · sync · 70s

Read authenticated daily usage, quota and tool limits.