xserver-mcp CLAUDE.md

xserver-mcp CLAUDE.md is an instructions file for coding agents from Mink16/xserver-mcp. It costs 2,449 tokens per session, scanned A, original, MIT.

Project instructions for an MCP server that connects to XServer’s server-panel REST API, a web interface for managing hosting services.

In plain words
What is it for?
They guide work involving domains, email addresses, DNS records, hosting operations, tests, branches, commits, and pull requests.
Why use it?
They give the agent the repository rules, development workflow, API-specific details, and review requirements it must follow.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/mink16/xserver-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/Mink16/xserver-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xserver-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mink16/xserver-mcp/claude-md.svg)](https://agentmods.dev/instructions/mink16/xserver-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mink16/xserver-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/mink16/xserver-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,449 This file is loaded in full into every session.
When invoked 2,449 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02449 $0.02449
Opus 5 $0.01224 $0.01224
Sonnet 5 $0.00490 $0.00490
Haiku 4.5 $0.00245 $0.00245

Measured 4d ago against content hash 3da2aad48a3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

xserver-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

xserver-mcp

Xserver 公式の サーバーパネル REST API (https://api.xserver.ne.jp) をラップする MCP サーバー。

運用ルール (.claude/rules/)

リポジトリ運用の詳細ルールは .claude/rules/ 以下に分割している。各ファイルは CLAUDE.md と同様にセッション開始時のコンテキストへ読み込まれる。

  • tdd-workflow.mdTDD 必須ポリシーとエージェント (tdd-developer / test-writer / implementer / reviewer) の使い分け基準。src/ / tests/ のコード変更は原則これらに委譲する。
  • github-flow.md — ブランチ命名・マージ戦略・禁止事項。
  • commit-messages.md — Conventional Commits の type/scope と本プロジェクトの既定フッタ。
  • pull-requests.md — PR テンプレート・セルフレビュー観点・マージ条件。セルフレビューは read-only の reviewer エージェント (.claude/agents/reviewer.md) に委譲し、IDN 正規化・runApi・registry 登録・破壊的操作ガードなどの固有観点を Blocker/Major/Minor/Nit の verdict で機械的に受け取るのが既定運用。

Xserver API の癖

  • 日本語ドメイン (IDN) は MCP が自動変換: 全ツールの domain 入力と mail_address の domain 部は src/tools/domain.tstoPunycodeDomain / normalizeMailAddress で ASCII (Punycode) に正規化してから XServer に送る。ユーザーや上位エージェントは 日本.jp / user@日本.jp をそのまま渡してよい。書き込み系ツールのレスポンスには resolved_domain (および resolved_mail_address) が含まれ、実際に送信された ASCII 値を確認できる。DNS レコードの host / content はラベル・任意文字列なので変換しない
  • 公式エラーレスポンス形式: XServer は { "error": { "code", "message", "errors": [...] } } を返す。src/client/errors.tserrorFromResponse がこれをパースし、旧 { "message": "..." } 形式にもフォールバック対応する。抽出された code / errors[]XserverApiError.code / XserverApiError.errors に格納され、ツール応答の code / detail.errors として LLM に届く。
  • HTTP ステータス → エラークラス / code 正規化: マッピングの真の情報源は src/client/errors.tsSTATUS_TO_CODE / STATUS_CLASS。TXT 認証失敗など 409 の特別扱いが必要な場合は err instanceof XserverOperationError で判定する (createMailAccountWithVerification.ts 参照)。それ以外のステータス分岐は err.code で行うこと (派生クラスを増やさない)。
  • レート制限ヘッダ: httpClient はレスポンスから X-RateLimit-Limit / -Remaining / -Reset / -Concurrent-Limit / -Concurrent-RemainingRetry-After を抽出 (src/client/rateLimit.ts)。429 発生時は XserverRateLimitError.rateLimit.retryAfterSeconds に格納され、ツール応答の detail.rate_limit / detail.retry_after_seconds として LLM に届く。成功時のヘッダは破棄している (MVP)。
  • 429 の自動リトライ: httpClient は 429 のうち「Retry-AfterXSERVER_HTTP_RETRY_MAX_WAIT_SEC 以下」かつ「X-RateLimit-Concurrent-Remaining !== 0」のケースのみ、XSERVER_HTTP_RETRY_MAX_ATTEMPTS 回まで自動待機 & 再送する。同時接続由来の 429 は他の in-flight が捌けるまで解消しないのでリトライ対象外。それ以外の status はリトライせず LLM に即返す。無効化は XSERVER_HTTP_RETRY_MAX_ATTEMPTS=1
  • 同時接続セマフォ: createHttpClientconfig.concurrency (既定 3) の軽量セマフォで fetch を直列化する。XServer プラン別上限 (スタンダード 5 / プレミアム 10 / ビジネス 20) に対して保守的に振る舞う。無効化したい場合は XSERVER_HTTP_CONCURRENCY=100 などで十分大きな値を与える。
  • 422 バリデーション: err.errors[] に詳細メッセージが配列で入る。ツール出力では detail.errors として LLM に渡す。
  • 204 No Content: DELETE などで返る場合あり。httpClientnull を返す。
  • mail_address の URL エンコード: @ を含むため必ず encodeMailAccount (= encodeURIComponent) を通すこと (IDN 正規化後に適用)。
  • ドメイン所有権確認 (TXT): POST /mail は毎回 _xserver-verify.{domain} TXT レコードで所有権検証を行う。サーバーパネル経由で作成済みのドメインは TXT 未登録のことが多く、初回 API 作成は 409 OPERATION_ERROR「TXTレコードによるドメイン認証に失敗しました。」 になる。create_mail_account_with_verification はこれを内部で吸収する (API 内部リゾルバへの TXT 反映は 30–90 秒遅延)。

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 71 lines · 2,449 tokens per session scan A 3da2aad48a3a

Subscribe to this mod's changes

xserver-mcp CLAUDE.md is an instructions file published in the GitHub repository Mink16/xserver-mcp (0 stars, last pushed 2mo ago), licensed MIT. It adds 2,449 tokens to every session, about $0.0122 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.