Skip to main content
Glama
mgcrea

mcp-ovh-api

by mgcrea

@mgcrea/mcp-ovh-api

npm version GHCR

OVHcloud API 向けの Model Context Protocol サーバーで、Object Storage に焦点を当てています。バケット、オブジェクト、プロジェクトユーザー、S3 認証情報、そしてそれらを結びつけるストレージポリシーを扱います。

このサーバーはデフォルトで読み取り専用です。書き込みを無効にしている場合、変更系ツールは単に拒否されるだけでなく、そもそも登録されないため、エージェントはそれらを呼び出すことができません。

特徴

  • OVHcloud の /1.0 API に対する精選されたツール群。説明には API の落とし穴が明記されています(知っておくべき落とし穴 を参照)。

  • デフォルトで読み取り専用。 OVH_ALLOW_WRITES=1 で書き込みツールが追加されます。破壊的なツールはさらに、呼び出しのたびに明示的な confirm: true が必要です。

  • OVH の認証方式をすべてサポートし、環境変数の有無に応じて自動的に選択されます。OAuth2 サービスアカウント(推奨)、アプリケーションキー + コンシューマーキー(SHA1 署名、自動クロックドリフト補正付き)、または静的アクセストークン

  • ポリシープリセット — OVH のロールショートカットにはない write-only を含みます。

  • リスト結果は要約され、OVH の非推奨であるバケットごとの objects[] 配列(バケット内のすべてのオブジェクトを埋め込む)は両端で抑制されます。

  • X-Ovh-QueryID はすべてのエラーで表示されます。OVH サポートが最初に尋ねるものだからです。

  • 残りの API のための ovh_request エスケープハッチ(書き込みが有効でない限り GET のみ)。

  • ネイティブ fetch を使用し、MCP SDK と Zod 以外のランタイム依存関係はありません。

Related MCP server: saveformedearai

インストール

pnpm install
pnpm build

設定

認証方式を 1 つ選択します。

(A) OAuth2 サービスアカウント — 推奨

  1. https://www.ovh.com/manager/#/iam/service-account で IAM サービスアカウントを作成します。

  2. パブリッククラウドプロジェクトに権限を付与する IAM ポリシーをアタッチします(オブジェクトストレージの場合: プロジェクトリソースに対して publicCloudProject:apiovh:*)。

  3. クライアント ID とシークレットを .env にコピーします。

トークンの有効期限は 1 時間で、期限前にキャッシュされ更新されます。

(B) アプリケーションキー + コンシューマーキー

https://eu.api.ovh.com/createToken/ で 3 つ組を一度に作成します。ここで指定したアクセスルールは永久に固定されます — コンシューマーキーは後から拡張できないため、必要なものを最初に付与してください:

GET    /cloud/project/*
POST   /cloud/project/*
PUT    /cloud/project/*
DELETE /cloud/project/*
GET    /me

リクエストは secret+consumerKey+METHOD+URL+BODY+TIMESTAMP に対して SHA1 署名されます。OVH の時刻から ~30 秒以上ずれていると、すべての呼び出しが誤解を招く Invalid signature で失敗します。そのため、サーバーは起動時に /auth/time を一度プローブし、その差を補正します。

(C) 静的アクセストークン

OVH_ACCESS_TOKEN を設定すると、Authorization: Bearer として送信されます。

cp .env.example .env

変数

必須

説明

OVH_ENDPOINT

いいえ

ovh-eu(デフォルト)、ovh-caovh-uskimsufi-*soyoustart-*

OVH_CLIENT_ID / OVH_CLIENT_SECRET

(A)

IAM サービスアカウント。これらの存在により OAuth2 が選択されます。

OVH_APPLICATION_KEY / _SECRET

(B)

アプリケーションキーのペア。

OVH_CONSUMER_KEY

(B)

それらと一緒に発行されたコンシューマーキー。

OVH_ACCESS_TOKEN

(C)

事前に発行されたベアラートークン。

OVH_AUTH_METHOD

いいえ

oauth2signatureaccessToken を強制します。それ以外の場合は推測されます。

OVH_CLOUD_PROJECT

いいえ

デフォルトプロジェクト — 表示名ではなく、32 文字の 16 進数 serviceName

OVH_REGION

いいえ

デフォルトのストレージリージョン。大文字(GRASBGDEUK)。

OVH_ALLOW_WRITES

いいえ

1 に設定すると書き込みツールが登録されます。デフォルトではオフ。

OVH_API_URL

いいえ

API のベース URL を完全に上書きします。

OVH_MAX_RETRIES

いいえ

401 / 429 / 5xx の再試行回数。デフォルトは 3

OVH_REFRESH_SKEW_SECONDS

いいえ

有効期限のこの秒数前に OAuth2 トークンを更新します。デフォルトは 60

OVH_DEBUG

いいえ

1 に設定するとデバッグ出力を stderr に記録します。

実行

pnpm start   # speaks JSON-RPC over stdio

Claude Code に組み込む

.mcp.json(プロジェクト)または ~/.claude.json(グローバル)に追加します:

{
  "mcpServers": {
    "ovh": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-ovh-api/dist/cli.js"],
      "env": {
        "OVH_CLIENT_ID": "...",
        "OVH_CLIENT_SECRET": "...",
        "OVH_CLOUD_PROJECT": "abcdef0123456789abcdef0123456789",
        "OVH_REGION": "UK"
      }
    }
  }
}

ツールを調べる

npx @modelcontextprotocol/inspector node dist/cli.js

知っておくべき落とし穴

すべてツールの説明に組み込まれていますが、このサーバーの形状を説明しています:

  1. **OVH にはバケットポリシーはなく、ユーザーポリシーのみがあります。** プロジェクトユーザーごとに 1 つの生の JSON ドキュメントがあり、そのドキュメントがアクセス制御の全表面です。ポリシーを設定すると、そのユーザーが以前にできたすべてのことを、すべてのバケットにわたって置き換えます。

  2. ポリシーはバケットの所有者を制限できません。 OVH は ACL にフォールバックし、所有者は FULL_CONTROL を保持します: 「ユーザーがバケット所有者であり、ポリシーファイルに明示的な許可がない場合でも、ユーザーは許可されます。」 したがって、制限されたキーは、バケットを作成していない新しいプロジェクトユーザーに属している必要があります。ovh_provision_s3_user はバケットの ownerId をチェックし、所有者を指定すると拒否します。

  3. 同じフォールバックがオブジェクトごとに適用されます。 オブジェクトをアップロードした人は誰でもそのオブジェクトを所有し、オブジェクト ACL を通じて FULL_CONTROL を取得します。したがって、s3:GetObject を単に省略しても、アップロード専用キーが自分が書き込んだすべてを読み戻すことを防げません — ライブ API で検証済みで、許可リストのみのポリシーは、他の誰かがアップロードしたすべてのオブジェクトを正しく拒否しながら、自分のアップロードをキーに提供しました。明示的な Deny 必要であり、ACL に勝ります。そのため、write-only プリセットには、単純な許可リストではなく Deny ステートメントが含まれています。

もう 2 つ小さなものがあります。s3:PutObject だけでは、許可されたプレフィックス内の既存キーの盲目的な上書きが可能です — 「書き込み専用」キーは追記専用キーではありません。これはバケットでバージョニングを有効にする良い理由です。また、ポリシーの変更が反映されるまでに最大 ~30 秒かかります: ovh_set_storage_policy の 5 秒後にプローブを実行しても、まだ古い動作が表示され、ポリシーが静かに失敗したように見えます。

ツール

プロジェクトスコープのすべてのツールはオプションの project を受け取り、すべてのストレージツールはオプションの region を受け取り、呼び出しごとに OVH_CLOUD_PROJECT / OVH_REGION を上書きします。W とマークされたツールは OVH_ALLOW_WRITES=1 の場合のみ存在します。⚠️ とマークされたツールは破壊的であり、さらに confirm: true が必要です。

ovh_whoami から始めてください。 どの認証方法が有効か、どのアカウントか、OVH とのクロック差を報告します — 署名方式での 401 はほぼ常にこれが原因です。

エリア

ツール

メタ

ovh_whoamiovh_list_projectsovh_get_projectovh_list_regionsovh_get_region

バケット

ovh_list_bucketsovh_get_bucketovh_get_bucket_lifecycle · W ovh_create_bucketovh_update_bucketovh_set_bucket_lifecycle、⚠️ ovh_delete_bucket_lifecycle、⚠️ ovh_delete_bucket

オブジェクト

ovh_list_objectsovh_get_objectovh_list_object_versionsovh_presign_object · W ovh_copy_object、⚠️ ovh_delete_object、⚠️ ovh_delete_object_version、⚠️ ovh_bulk_delete_objects

ユーザーとキー

ovh_list_project_usersovh_get_project_userovh_list_s3_credentials · W ovh_create_project_userovh_create_s3_credentialsovh_reveal_s3_secret、⚠️ ovh_delete_s3_credentials、⚠️ ovh_delete_project_user

ポリシー

ovh_get_storage_policyovh_preview_policy · W ⚠️ ovh_set_storage_policy、⚠️ ovh_grant_bucket_access、⚠️ ovh_provision_s3_user

エスケープハッチ

ovh_request — 任意の /1.0 パス。書き込みが有効でない限り GET のみ

ovh_presign_object がバイトが移動する唯一の方法です。サーバーはオブジェクトコンテンツをプロキシせず、期限付きの署名付き S3 URL を発行します。書き込みがオフの場合、GET のみに署名します。

ポリシープリセット

ovh_preview_policyovh_set_storage_policyovh_provision_s3_user は 3 つのプリセットを共有し、すべてキープレフィックスにスコープできます:

プリセット

許可

write-only

プレフィックスに対して s3:PutObjects3:AbortMultipartUploads3:ListMultipartUploadParts を許可 — さらにバケット全体で s3:GetObject / s3:GetObjectAcl に対する明示的な Deny

read-only

バケットに対して s3:ListBucket + s3:GetBucketLocation、オブジェクトに対して s3:GetObject

read-write

両方に加えて s3:DeleteObject

OVH の組み込みロール(admindenyreadOnlyreadWriteovh_grant_bucket_access 経由)には書き込み専用の同等物がありません — そのため生のポリシーパスが存在します。マルチパートのペアは意図的に含まれています。すべての S3 SDK は ~8-16MB を超えると自動的にマルチパートに切り替わり、abort/list がないと、失敗したアップロードはキー所有者がクリーンアップできない孤立したパーツを残し、支払いが続きます。

OVH はポリシーアクションを固定の列挙型に対して検証し、未知のものがあるとドキュメント全体を 400 で拒否します — s3:GetObjectVersions3:DeleteObjectVersion は AWS には存在しますが、ここにはありません。プリセットは受け入れられたアクションのみを使用し、テストで固定されています。

書き込み専用アップロードキーの発行

動機となるケース: アプリが S3 キーを出荷バイナリに埋め込むため、キーはアップロードのみ可能で、読み書きキーは開発者が保持する必要があります。

ovh_get_bucket           bucket=dev-rgis-ar          → note ownerId
ovh_preview_policy       bucket=dev-rgis-ar preset=write-only prefix=uploads/
ovh_provision_s3_user    bucket=dev-rgis-ar preset=write-only prefix=uploads/ \
                         description=ar-app-uploader confirm=true

これにより新しいプロジェクトユーザー(バケット所有者ではない)が作成され、ポリシーが適用され、その後でのみ認証情報が発行されます — ポリシーより前に存在するキーは、デフォルトが許可するものを一時的に持っていたキーです。シークレットは一度だけ返されます。

引き渡す前に実際の S3 API に対して検証してください — 正しく読めるポリシーでも所有権によって影が薄くなることがあり、設定後 ~30 秒待ってからプローブしないと、以前のポリシーを調べることになります:

export AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=...
# An array, not a string: zsh does not word-split an unquoted $var, so the
# `S3='aws ...'` form you would write in bash silently becomes "command not found".
S3=(aws --endpoint-url https://s3.uk.io.cloud.ovh.net --region uk s3api)
"${S3[@]}" put-object      --bucket dev-rgis-ar --key uploads/probe.txt --body /dev/null   # 200
"${S3[@]}" get-object      --bucket dev-rgis-ar --key uploads/probe.txt /dev/null          # 403
"${S3[@]}" list-objects-v2 --bucket dev-rgis-ar                                            # 403
"${S3[@]}" delete-object   --bucket dev-rgis-ar --key uploads/probe.txt                    # 403
"${S3[@]}" put-object      --bucket dev-rgis-ar --key elsewhere/probe.txt --body /dev/null # 403

get-object 行が重要です。これは落とし穴 3 を検出するチェックであり、プリセットの Deny があるためだけに成功します。

開発

pnpm dev            # tsdown --watch
pnpm test           # vitest
pnpm typecheck
pnpm lint
pnpm format

ライセンス

MIT

Available Tools

1 tool
ovh_auth_statusOVHcloud: Auth StatusA
Read-only

Report whether this server has working OVHcloud credentials, which auth method and endpoint it uses, the default project and region, whether writes are enabled, and — when something is missing — exactly what to set. Call this first when a tool you expected is not listed: an absent tool here means missing configuration, not a bug.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint annotation already marks this as safe, and the description adds useful behavioral context by stating it reports credential validity, auth method, endpoint, project/region, and write status. It also says missing credentials explain absent tools, which clarifies what the status check means. It doesn't explicitly describe network/read behavior, but the annotation plus 'report' wording make the safety profile clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences carry a full purpose statement, a detailed list of outputs, and a usage rule. The key diagnostic trigger ('Call this first when a tool you expected is not listed') is placed second and is memorable. No word is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no parameters, no siblings, and no output schema, the description is self-sufficient: it tells the agent what information the tool produces and when to invoke it. The only omitted detail, the exact configuration values to set, is precisely what the tool's output is described as providing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, so there is nothing to document beyond the empty schema. The description still clarifies the kind of status data returned, which is consistent with a no-input diagnostic tool. Baseline 4 is appropriate for a 0-parameter definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Report whether this server has working OVHcloud credentials,' then enumerates exactly what is reported (auth method, endpoint, default project/region, write enablement). This is unambiguous and fully distinguishes the tool from any conceivable alternative, even though no siblings are listed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit call heuristic: 'Call this first when a tool you expected is not listed,' and even frames the diagnostic interpretation ('an absent tool here means missing configuration, not a bug'). This tells an agent not only when to run it but how to interpret the result.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.2/5.0
Disambiguation5/5

With only one tool, there is no possibility of confusion between tools. The single tool's purpose is clearly defined and distinct.

Naming Consistency5/5

The lone tool name follows a clean snake_case verb_noun pattern. With only one tool, there are no inconsistencies to evaluate.

Tool Count1/5

A single status-check tool is drastically insufficient for a server named 'mcp-ovh-api' covering the OVH cloud API. The count represents an extreme mismatch between the server's implied scope and its actual surface.

Completeness1/5

The server exposes no operations beyond an authentication status check. Any actual OVH API functionality is absent, making the tool surface severely incomplete for the stated domain.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for uploading, listing, and retrieving files on S3-compatible storage (AWS S3, DigitalOcean Spaces) with public/private access and temporary URLs.
    15
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for Oracle Cloud Infrastructure (OCI) that provides tools to manage Compute, Object Storage, Block Storage, Networking, Autonomous Database, and IAM via the official OCI SDK.
    23
    67
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mgcrea/mcp-ovh'

If you have feedback or need assistance with the MCP directory API, please join our Discord server