Skip to content
Docs

MCP Shim Smoke Test

MCP Shim – Quick Smoke Test (Design Partners)

Goal: verify the shim is installed, can reach the Gateway, and fails closed.

1) Confirm package install

From your project folder:

npm ls aipg-mcp-shim

Expected:

aipg-mcp-shim@0.1.0
appears in the tree.

2) Set required env vars

You must set:

  • <GATEWAY_URL>
  • <API_KEY>

Examples:

macOS/Linux:

export GATEWAY_URL="<GATEWAY_URL>"
export API_KEY="<API_KEY>"

Windows PowerShell:

$env:GATEWAY_URL = "<GATEWAY_URL>"
$env:API_KEY = "<API_KEY>"

IMPORTANT:

  • Use environment variables for secrets.
  • Never commit secrets.

3) Health check the Gateway directly (sanity check)

Before involving the shim, verify the Gateway is reachable:

curl -sS "$GATEWAY_URL/api/health"

Expected: HTTP 200 JSON response.

4) Verify fail-closed behavior (critical)

If the Gateway is unreachable or the API key is wrong, tool execution must NOT proceed.

Design partner should confirm:

  • Wrong API key => Gateway returns 401/deny-style response
  • Shim blocks the tool handler (no tool side-effect)

5) Verify allow path

With a valid API key + registered agent/tool, confirm:

  • Gateway returns allow
  • Shim executes the tool handler

Notes:

  • The Gateway is the source of truth for tenant identity (x-api-key hash lookup).
  • Do not include tenantId in requests (it is not trusted by the Gateway).