IWSDK Reference

Local semantic search and API lookup over the Immersive Web SDK source and its dependencies

Official · Meta TypeScript Local · stdio Developer tools

67 popularity score ★ 350 ↓ 2.3k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

FirstTerminal
npx -y @iwsdk/reference --warmup
Claude CodeTerminal
claude mcp add iwsdk-reference -- npx -y @iwsdk/reference
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "iwsdk-reference": {
      "command": "npx",
      "args": [
        "-y",
        "@iwsdk/reference"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "iwsdk-reference": {
      "command": "npx",
      "args": [
        "-y",
        "@iwsdk/reference"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "iwsdk-reference": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@iwsdk/reference"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.iwsdk-reference]
command = "npx"
args = ["-y", "@iwsdk/reference"]
Gemini CLITerminal
gemini mcp add --scope user iwsdk-reference npx -- -y @iwsdk/reference

Settings 4

IWSDK_REFERENCE_WORKSPACE_ROOT Optional: Project folder whose .iwsdk/reference state is used; defaults to the nearest pnpm workspace or package.json above the working directory.
IWSDK_REFERENCE_CACHE_DIR Optional: Overrides the shared corpus and model cache folder.
IWSDK_REFERENCE_ASSETS_BASE_URL Optional: Base URL of a self-hosted corpus, for internal or offline setups; unpkg is used by default.
IWSDK_REFERENCE_ASSETS_VERSION Optional: Corpus version to fetch; defaults to the package's own version.

What it does

IWSDK Reference is the MCP server that ships with Meta's Immersive Web SDK (IWSDK), a toolkit for building WebXR apps. It gives a coding assistant a searchable copy of the IWSDK code and the code of the libraries it depends on, so the assistant can find how something is done in the SDK instead of guessing at its API.

The package does not bundle that corpus. A one-time warmup step downloads a pinned, prebuilt corpus (published as @iwsdk/reference-assets and fetched from unpkg by default) and a pinned text-embedding model into a shared cache, and records state in the project's .iwsdk/reference folder. Queries then run on your machine: semantic search ranks code chunks with the local embedding model, and the other tools look up an API by name, list ECS components and systems, follow structural relationships (extends, implements, imports, calls, WebXR API use), find dependents and usage examples, or print a file from the cached sources.

The server has eight tools, registered in src/contract.ts. Run with no arguments, the iwsdk-reference program speaks MCP over stdio; the same program also takes --warmup and --status-json flags (src/cli.ts). The cache lives in ~/.cache/iwsdk/reference on Linux (XDG_CACHE_HOME is honoured), ~/Library/Caches/iwsdk/reference on macOS and %LOCALAPPDATA% on Windows, unless IWSDK_REFERENCE_CACHE_DIR is set (src/assets.ts). Projects made with the IWSDK create tooling install it as a dev dependency, and @iwsdk/cli registers it with the assistant automatically.

What it needs

RuntimeNode.js 20+

Node.js 20.19+, 22.12+ or 24+ (package engines). A one-time warmup with network access to the corpus host and the pinned model URLs: `npx @iwsdk/cli reference warmup` (or `iwsdk-reference --warmup`). Installing it by hand in a project needs the Sharp 0.35.4 override the README gives for npm or pnpm.

Limits

Every tool, get_file_content included, returns an error until warmup has completed (src/assets.ts, src/files.ts), and the cache must be warmed again after the package or corpus version changes. It searches only the pinned IWSDK corpus and its dependencies, not your own project's code. search_code returns 10 results by default, find_by_relationship and find_dependents 20, and the ECS listings 100, each changeable with limit (src/contract.ts). Its README says it is normally run through @iwsdk/cli rather than called directly.

Who it suits

Developers building WebXR apps with IWSDK who want their assistant to look up the SDK's real APIs and examples, especially in projects made by the IWSDK create tooling, where it is already installed and registered. It runs locally, needs no account and only reads its cached corpus. It is of no use outside IWSDK work, and it cannot search your own code; for that, pair it with a general code-search or file server.

Tools 8

search_code
Semantic search over IWSDK and dependency code, returning ranked code chunks
find_by_relationship
Find code that extends, implements, imports, calls or uses a given WebXR API
get_api_reference
Look up a class, function, interface or type by name with its source and docs
get_file_content
Print a whole file, or a line range, from the cached IWSDK or dependency sources
list_ecs_components
List the ECS components found in the corpus
list_ecs_systems
List the ECS systems found in the corpus
find_dependents
Reverse lookup: which code depends on a given API
find_usage_examples
Find code that imports and actually uses a given API

Similar servers