ustore-backoffice-mcp
ustore-backoffice-mcp
https://produproduce.mysite.com/ustorebackofficerestapi にある XMPie uStore BackOffice REST API 用の MCP サーバー。
ステータス: 動作確認済み、実 API に対してエンドツーエンドで検証済み。 スペックの読み込み(15 のタググループにわたる 52 パス / 63 オペレーション)、ログイン、ustore_call_endpoint GET /v1/admin/stores の HTTP 200 応答を確認済み。読み取り専用ガードは DELETE を正しく拒否します。
設計
このサーバーはエンドポイントをハードコードしません。初回使用時に API 自身の OpenAPI 3.0 ドキュメントを取得し、その上に 5 つのツールを公開します:
ツール | 目的 |
| コントローラグループ + オペレーション数 — 最初の方向確認用 |
| タグ、メソッド、テキストによるオペレーションの検索/フィルタ |
| 完全な契約: パラメータ、リクエストボディ、レスポンス形状 |
| リクエストを実行; 認証はサーバー側で処理 |
| 診断: ベース URL、スペックソース、認証モード、書き込みポリシー |
これは MSSQL MCP サーバー(list_databases → list_tables → describe_table → query)と同じ形状で、API が公開するエンドポイント数に関係なくツール数を低く抑えられます。また、uStore のアップグレードにも耐えます — 新しいエンドポイントは次のスペック更新時に自動的に現れます。
書き込みはデフォルトで無効です。サーバープロセスに USTORE_ALLOW_WRITES=true が設定されるまで、GET 以外のメソッドは拒否されます。
Related MCP server: mcp-db-server
セットアップ
produproduce への内部ネットワークアクセスがあるホストで実行する必要があります。
cd /opt/mcp/ustore-backoffice-mcp
npm install
cp .env.example .env
$EDITOR .env # credentials — the base URL and spec URL are preset
npm run probe # optional: re-confirm the spec URL and auth handshake認証ハンドシェイクは実 API に対して確認済みで、すでにデフォルトです:
POST {base}/v1/admin/auth/login {"email": "...", "password": "..."}
-> 200 {"Token": "..."}
Authorization: uStoreBackoffice <token> # on every subsequent requestログインボディは username ではなく email を使用し、トークンフィールドは大文字の Token であることに注意してください。スキームは文字通り uStoreBackoffice です — API は他のプレフィックスを {"Errors":[{"Message":"Invalid security token."}]} で拒否します。
スペック URL も同様に確認済みで、プリセットされています:
USTORE_SPEC_URL=https://produproduce.mysite.com/ustorebackofficerestapi/ustore-oas3これは明示的に設定する必要があります — このデプロイメントは OAS3 を /ustore-oas3 で提供しており、loadSpec() が他にプローブするパスはすべて 404 を返します。
次に:
npm run http # or: npm run stdio確認:
$ curl -s localhost:8931/healthz
{"ok":true,"target":"https://produproduce.mysite.com/ustorebackofficerestapi"}/healthz はプロセスが起動していることだけを示します。API 側が機能していることを確認するには、クライアントから ustore_server_info を呼び出してください — 解決された認証スキームとオペレーション数を報告し、ログインが壊れている場合は明確に失敗します。
デプロイメント
pm2
pm2 start index.js --name ustore-mcp --node-args="--enable-source-maps"
pm2 savesystemd
[Unit]
Description=uStore BackOffice MCP server
After=network-online.target
[Service]
Type=simple
User=tc
WorkingDirectory=/opt/mcp/ustore-backoffice-mcp
EnvironmentFile=/opt/mcp/ustore-backoffice-mcp/.env
ExecStart=/usr/bin/node index.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target.env は chmod 600 に保ってください — 管理権限を持つ uStore BackOffice の資格情報が含まれています。
HAProxy
SSE はバッファリングをオフにし、長いサーバータイムアウトが必要です。そうしないとセッションが切断されます:
backend be_mcp_ustore
mode http
option http-server-close
timeout server 3600s
timeout tunnel 3600s
http-request set-header X-Accel-Buffering no
server ustore1 127.0.0.1:8931 check両方のトランスポートが提供されます: POST /mcp(Streamable HTTP、現在のスペック)と GET /sse + POST /messages(レガシー SSE、既存のスタックに一致)。HAProxy の ACL だけに頼るのではなく、サーバー自体が共有シークレットをチェックするようにしたい場合は MCP_BEARER_TOKEN を設定してください。
クライアント設定
ローカル stdio(同じマシン上の Claude Desktop):
{
"mcpServers": {
"ustore-backoffice": {
"command": "node",
"args": ["/opt/mcp/ustore-backoffice-mcp/index.js"],
"env": { "MCP_TRANSPORT": "stdio" }
}
}
}設定ファイルは BOM なしの UTF-8 で書き込んでください。
その env ブロックには資格情報は不要です: サーバーは index.js の隣にある .env を読み取ります。Claude Desktop は MCP サーバーを cwd=/ とほぼ空の環境で起動するため、config.js は作業ディレクトリではなく自身のファイル位置に対して .env を解決します。env に入れたものは引き続き優先されます — 実際の環境変数はファイルより優先されます。
設定を編集した後は、Claude Desktop を完全に終了してください(macOS ではウィンドウを閉じるだけでなく Cmd-Q)— サーバープロセスが再起動されるように。
注意点と落とし穴
資格情報の範囲。 BackOffice API アカウントは通常、完全な管理者権限を持ちます。uStore が制限付きオペレーターロールをサポートしている場合は、それを使用してください — このサーバーの読み取り専用ガードは事故を防ぐものであり、侵害されたトークンを防ぐものではありません。
USTORE_ALLOW_PATHSは正規表現の許可リストです。これを設定すると、サーバーを実際に必要なコントローラに絞り込めます。これは書き込みフラグ単独よりも強力な制御です。レスポンスの切り詰めはデフォルトで 60k 文字です。リストエンドポイントがオーバーフローする場合は、上限を上げるのではなくページングパラメータを使用してください — この API では
pageNumber(1 始まり)とpageSize(デフォルト 50)と表記されます。スペックのキャッシュは 15 分ごとに更新されます。uStore のアップグレード後は、
refreshSpec: trueを指定してustore_server_infoを呼び出し、変更をすぐに反映してください。接続障害のように見える認証障害。 サーバーは資格情報がなくても起動し、ツールを一覧表示します — ログインは最初の API 呼び出しでのみ発生します。ツールが表示されるのにすべての呼び出しがエラーになる場合は、
ustore_server_infoを実行してhasTokenを確認してください。これは SQL MCP サーバーを補完するものであり、置き換えるものではありません。 REST API は uStore のビジネスロジックを強制するため、状態を変更するものには正しい経路です。直接の
[PRODUPRODUCE].ustoreクエリは、レポート用の結合やスキーマの調査には引き続き適しています。
Available Tools
5 toolsustore_call_endpointCall a uStore endpointA
Execute a request against the uStore BackOffice REST API. Path placeholders such as {orderId} are filled from pathParams. Authentication is handled by the server. Non-GET methods are refused unless writes are explicitly enabled.
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | JSON request body for POST/PUT/PATCH | |
| path | Yes | Spec path, e.g. /api/Orders/{orderId} | |
| query | No | Query string parameters | |
| method | Yes | GET, POST, PUT, DELETE, PATCH | |
| headers | No | Extra request headers | |
| pathParams | No | Values substituted into {placeholders} |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries the burden, and it does add useful behavioral context: authentication is server-side, and non-GET methods are refused unless writes are explicitly enabled. However, it does not clarify what 'explicitly enabled' means, nor does it describe errors, response behavior, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences deliver the essential facts without filler. The most critical constraints and behaviors are placed up front, and every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is adequate for a generic endpoint caller, covering auth, path substitution, and write protection. However, the ambiguous 'writes explicitly enabled' condition and the lack of any guidance about the response format or failure modes leave meaningful gaps for an agent choosing to invoke likely mutating endpoints.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is complete, but the description adds meaningful context beyond the schema by explaining how pathParams fill placeholders and by adding an operational constraint on the method parameter. This behavior cannot be inferred from the input schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific action ('Execute a request against the uStore BackOffice REST API') and clearly identifies the target resource and mechanism. It distinguishes the tool from siblings like list_endpoints or describe_endpoint by being the actual invocation tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use—executing a request—is implied by the name and description, but there is no explicit guidance about when to choose this against discovering or describing endpoints. The write-refusal note is a restriction, not a usage guideline with alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ustore_describe_endpointDescribe a uStore endpointA
Show the full contract for one operation: path/query/header parameters, request body shape, and response shape. Call this before ustore_call_endpoint.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | e.g. /api/Orders/{orderId} | |
| method | No | Required when path is ambiguous | |
| operationId | No | Alternative to path+method |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description implies a read-only operation (showing the contract) but does not explicitly state that it has no side effects or require permissions. It does add useful behavioral context by explaining what the tool returns and the required sequence, but lacks mention of error behavior or edge cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences that front-load the core purpose and then give actionable guidance. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers what the tool returns and its recommended usage sequence. Missing mention of error behaviors or parameter ambiguity resolution, but given its simple role and lack of output schema, it is sufficiently complete for an agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides descriptions for all three parameters with 100% coverageging. The description mentions the contract contents but doesn't add further semantic meaning to the parameters themselves, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Show the full contract for one operation' and enumerates the contract's contents (path/query/header parameters, request body, response shape). It distinguishes this from sibling tools by tying it to ustore_call_endpoint, making its purpose unambiguous and specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly directs the agent to 'Call this before ustore_call_endpoint', providing a clear temporal use case. It doesn't discuss when not to use it or contrast with list_endpoints, but the core guidance is strong and actionable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ustore_list_endpointsList uStore API endpointsA
List operations in the uStore BackOffice REST API. Filter by tag, HTTP method, or a free-text search across path, operationId and summary.
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Restrict to one tag group | |
| limit | No | Default 100 | |
| method | No | GET, POST, PUT, DELETE, PATCH | |
| search | No | Substring match on path/operationId/summary |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of indicating safety and behavior. 'List operations' conveys a read-only action and the filterable fields are stated, but it does not describe pagination behavior, output shape, or authentication expectations. This is acceptable for a simple list tool but not highly transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences with the key action first and filtering capabilities in the second. Every word earns its place; there is no repetition or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple discovery tool with four fully documented optional parameters and no output schema, the description is largely complete: it states the resource, the filtering dimensions, and implies the fields available in results. It does not add alternative-tool guidance, but given the low complexity, this is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description rephrases tag, method, and search filtering but adds little beyond the schema's parameter descriptions; the search field details are already present in the schema. The limit parameter is left entirely to the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists operations in the uStore BackOffice REST API, with a specific verb and resource. It distinguishes itself from siblings like ustore_describe_endpoint, ustore_call_endpoint, and ustore_list_tags by focusing on discovering operations rather than describing, calling, or listing tags.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use is implied by the purpose — discover API operations and optionally filter them — but the description does not explicitly state when to prefer this tool over alternatives, nor does it mention excluded cases or prerequisites. There is no when/when-not guidance, only the clear listing behavior.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ustore_list_tagsList uStore API groupsA
List the tag groups (controllers) exposed by the uStore BackOffice REST API, with the number of operations in each. Start here to orient yourself.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It clearly identifies the operation as a read-only listing ('List') and specifies what is returned (tag groups with operation counts). It does not mention auth or rate limits, but for a simple zero-parameter list this is not a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the action and resource, and every sentence earns its place. 'Start here to orient yourself' adds practical guidance without unnecessary verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter orientation tool with no output schema, the description is sufficiently complete: it states what is listed, what counts are included, and how to use it as a starting point. It could mention relationship to sibling tools, but this is not essential for the tool's simple purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and schema description coverage is 100%, so the baseline is 4. The description does not need to add parameter details, and it appropriately focuses on the output and purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') with a clear resource ('tag groups (controllers) exposed by the uStore BackOffice REST API') and adds useful detail ('with the number of operations in each'). It distinguishes itself from sibling tools like list_endpoints and describe_endpoint by focusing specifically on tag groups/controllers.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Start here to orient yourself' provides clear context for when to use this tool, positioning it as the initial discovery step. However, it does not explicitly name alternatives or state when not to use it, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ustore_server_infouStore MCP server diagnosticsA
Report the configured base URL, spec source, auth mode, and write policy. Use this when calls are failing to confirm how the server is wired up.
| Name | Required | Description | Default |
|---|---|---|---|
| refreshSpec | No | Re-fetch the OpenAPI document |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations, but description implies a read-only reporting operation. The parameter description covers refreshSpec's side effect (re-fetching OpenAPI), providing adequate transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: first states purpose, second gives usage context. No redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple info tool with one optional parameter and no output schema, the description covers what it does and when to use it, making it complete enough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Parameter refreshSpec is fully described in the schema (coverage 100%). The main description adds no extra meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it reports the configured base URL, spec source, auth mode, and write policy, distinguishing from sibling tools like list/describe/call endpoints.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly suggests using when calls are failing to confirm server wiring, but does not mention when not to use or alternatives (though siblings are evident).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v1.0.1- First observed
ustore_call_endpoint - First observed
ustore_describe_endpoint - First observed
ustore_list_endpoints - First observed
ustore_list_tags - First observed
ustore_server_info
TDQS
Scored across 5 tools
Each tool has a distinct role: listing tags, listing endpoints, describing a single endpoint, calling an endpoint, and reporting server info. No overlap or ambiguity between them.
Most tools follow a ustore_verb_noun pattern (list_tags, list_endpoints, describe_endpoint, call_endpoint), but server_info deviates by using noun_noun without a verb. This is a minor inconsistency in an otherwise predictable scheme.
Five tools is an ideal count for a focused API client server. Each tool serves a necessary and distinct function, with no bloat or obvious missing piece.
The tool set covers the full workflow: orient (list tags), discover (list endpoints), understand (describe endpoint), and act (call endpoint), plus diagnostics (server info). No critical gaps for interacting with the underlying API.
Maintenance
Related MCP Connectors
Ask your Quickbase apps in plain language. Read-only by default; writes need human approval.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Read-only AgentiScript concept search, catalog, authenticity, license, and approved asset discovery.
Query and audit AppSheet apps in natural language via Knotrik's pre-scanned definitions.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables read-only interaction with Zoho CRM data through natural language queries, allowing users to search records, list modules, retrieve field information, and count records using secure OAuth authentication.2ISC
- FlicenseNot gradedqualityDmaintenanceEnables querying PostgreSQL and MySQL databases using natural language, with RESTful endpoints for listing tables, describing schemas, and executing read-only queries.1-
- FlicenseNot gradedqualityDmaintenanceEnables management of BeyondTrust Endpoint Privilege Management (EPM) through natural language, supporting policy, computer, user, group management, file inspection, audit monitoring, and admin access requests.1-
- AlicenseAqualityDmaintenanceExposes Swagger/OpenAPI API documentation to AI models, enabling exploration, search, and interaction with endpoints, schemas, and execution of API calls.144 npm2MIT