Develop
Develop
Select your platform

Enable AI tools with MCP for Meta Horizon OS developers

Updated: Feb 27, 2026
Horizon Debug Bridge (hzdb) is a combined CLI and Model Context Protocol (MCP) server that connects AI assistants and developers to Meta Quest development tools. It gives your LLM — and you — access to documentation, device debugging, performance trace analysis, and Meta’s 3D asset library. The same tools available through the MCP server are also accessible directly from the command line, so you can use them with or without an AI agent.
You can run hzdb in two ways:
  • Through Meta Quest Developer Hub (MQDH) — a standalone desktop app with a guided setup UI.
  • Through Node.js (npx) — a lightweight install that works with any MCP-compatible editor or agent, including VS Code, Cursor, and Antigravity.
The npx option runs the latest version of hzdb (@meta-quest/hzdb), which includes additional tools and improvements. The MQDH-bundled MCP server will be updated to match in a future release. Choose whichever fits your workflow.
No authentication is required to install or run the MCP server. Most tools work without credentials. Some tools that require authentication will prompt you with instructions when you invoke them.

Option A: Install through MQDH

Meta Quest Developer Hub (MQDH) bundles the MCP server and provides a settings UI to configure your AI agent connection.

1. Download MQDH

Install MQDH v6.2.1 or later for Mac or Windows.
To check your version, navigate to Settings > About.

2. Connect your agent

MQDH includes guided setup instructions for popular agents:
  • Android Studio
  • Augment Code
  • Claude Code
  • Claude Desktop
  • Cline
  • Cursor
  • Gemini CLI
  • JetBrains AI Assistant
  • OpenAI Codex
  • Roo Code
  • Zed
Open the AI Tools tab in MQDH settings, select your agent from the dropdown, and follow the instructions. For agents not listed, select Other and consult your agent’s MCP configuration docs.

VS Code, Cursor, and Antigravity quick install

For VS Code, Cursor, and Antigravity users, MQDH provides a one-click install link that automatically configures the MCP server.
  1. Go to Settings > AI tools.
  2. Under Option A, click Add to VS Code.
MQDH Settings AI Tools Menu

Install the extension manually

Open VS Code, Cursor, or Antigravity, go to the Extensions view (Cmd+Shift+X on Mac, Ctrl+Shift+X on Windows), and search for Meta Horizon. If the extension is not available in the Marketplace, use Option B: Install through Node.js (npx) instead.

Option B: Install through Node.js (npx)

If you prefer a lightweight setup without installing MQDH, you can run the MCP server directly through Node.js.

Prerequisites

  • Node.js v18 or later
  • npm (included with Node.js)
  • ADB (required only for device tools such as logcat, screenshots, and performance traces. Documentation and asset search tools work without ADB.)
Note: If you have MQDH installed, you do not need to run the MCP server separately through npx. MQDH already bundles and manages the same MCP server. Running both simultaneously may result in duplicate tool registrations in your AI agent. Use one method or the other.

VS Code

  1. In your project root, create the file .vscode/mcp.json (or open it if it already exists).
  2. Paste the following configuration:
{
  "servers": {
    "meta-horizon-mcp": {
      "command": "npx",
      "args": ["-y", "@meta-quest/hzdb", "mcp", "server"]
    }
  }
}
  1. Restart VS Code or reload the window (Cmd+Shift+P > Developer: Reload Window) so VS Code picks up the new MCP server.
To verify the server can start, run this command in your terminal:
npx -y @meta-quest/hzdb mcp server
You should see the server start without errors. Press Ctrl+C to stop it.

Claude Desktop

Add the following to your Claude Desktop config file (claude_desktop_config.json):
{
  "mcpServers": {
    "meta-horizon-mcp": {
      "command": "npx",
      "args": ["-y", "@meta-quest/hzdb", "mcp", "server"]
    }
  }
}

Other agents

For any MCP-compatible agent, configure a stdio transport with the command:
npx -y @meta-quest/hzdb mcp server
Consult your agent’s documentation for the specific configuration format.

Using hzdb as a CLI

You don’t need an AI agent to use hzdb. The same tools available through the MCP server are accessible directly from the command line.
# Search documentation
npx @meta-quest/hzdb search-doc "passthrough rendering"

# Pull device logs
npx @meta-quest/hzdb logcat --lines 100 --level error

# Capture a screenshot from a connected Quest
npx @meta-quest/hzdb screenshot

# Search Meta's 3D asset library
npx @meta-quest/hzdb asset-search "realistic indoor furniture"
Run npx @meta-quest/hzdb --help to see all available commands.

How the MCP server works

When you submit a query, the MCP client requests the list of available tools from the MCP server. It forwards your query, along with tool metadata, to your chosen LLM. The LLM analyzes your request and determines which tools to call. The client invokes those tools through the server and sends the results back to the LLM, which generates a natural language response.

Quick start

You can start using the MCP server immediately — many tools work without a Quest device connected.

Without a device

Once your agent is configured, try the following prompts to verify the connection is working:
  1. Browse documentation — “Search the documentation for passthrough rendering.” You should receive a list of relevant documentation pages.
  2. Fetch a specific page — Pick a page from the results and ask: “Fetch the documentation at [URL].” You should see the full page content returned.
  3. Search 3D assets — “Find 5 realistic indoor furniture models.” The MCP server returns download URLs and preview images from Meta’s asset library.

With a connected Quest

Connect your Meta Quest device via USB, then try:
  1. Pull device logs — “Get 50 lines of logcat filtered to error level.” This confirms ADB and device communication are working.
  2. Capture a screenshot — “Take a screenshot from my connected Quest device.”
If your agent returns tool results for these prompts, the MCP server is connected and ready to use.

Available tools and capabilities

Once the MCP server is connected, you can use the following tools. Your AI agent discovers available tools and their parameters automatically through the MCP protocol, so the exact set of tools may evolve over time.
Tool NameDescriptionKey Parameters / UsageMore Details / Links
fetch_meta_quest_doc
Retrieve the full content of a specific documentation page from Meta’s Horizon platforms.
url (required): Full URL to the documentation page (should start with https://developers.meta.com/horizon/llmstxt/documentation/)
Use with search_doc to find and fetch specific pages.
search_doc
Search across Meta Horizon OS documentation for relevant pages.
query (required): Search query describing the topic or feature you’re looking for
Use with fetch_meta_quest_doc to retrieve full page content.
get_adb_path
Return the preferred ADB binary path for Meta Quest development.
None
 
get_device_logcat
Retrieve Android logcat logs from a connected Meta Quest device via ADB.
lines, tag, level, package, pid, clear
Useful for debugging app crashes, performance, system events, and more.
stream_device_logcat
Stream real-time Android logcat logs from a connected Meta Quest device via ADB.
duration_seconds, tag, level, package, pid
Real-time device monitoring.
take_screenshot
Capture a screenshot from a connected Meta Quest device via ADB.
width, height, method
For debugging or documentation.
hex_to_datetime
Convert a hexadecimal timestamp string to a datetime object (UTC).
hex_str (required): Hexadecimal string representing a Unix timestamp
Useful for interpreting trace timestamps.
load_trace_for_analysis
Load the content of a Perfetto trace or processed JSON for analysis.
session_id (required): The file name of the trace
For in-depth performance session analysis.
trace_thread_state
Retrieve thread state information from a Perfetto trace for performance analysis.
session_id (required), utid (required), start_ts, end_ts
Diagnose expensive operations or CPU activity.
run_sql_query
Run SQL query on the loaded trace to retrieve information in JSON format.
session_id (required), query (required)
Flexible trace data interrogation.
get_counter_for_gpu_frames
Return all GPU metric counters for given arrays of GPU frame start/end times.
session_id (required), start_ts (array, required), end_ts (array, required)
At least 20 start/end times recommended for accurate metrics.
get_perfetto_context
Retrieve the context needed for Perfetto or performance analysis workflows.
None
Must be called before most Perfetto-related analysis.
meta-assets-search
Search for existing 3D models in Meta’s asset library using text descriptions.
prompt (required), number_of_models
Returns download URLs for FBX/GLB and preview images.

Using the performance trace tools

The Perfetto tools (get_perfetto_context, load_trace_for_analysis, trace_thread_state, run_sql_query, get_counter_for_gpu_frames) let you analyze performance traces captured from a Quest device. If you’re new to Perfetto tracing, see How to Take Perfetto Traces with Meta Quest Developer Hub to learn how to capture a trace before using these tools.
The typical workflow is:
  1. Call get_perfetto_context to initialize the performance analysis context.
  2. Call load_trace_for_analysis with the session_id (the trace file name) to load a captured trace.
  3. Use trace_thread_state, run_sql_query, or get_counter_for_gpu_frames to query the loaded trace.

Troubleshooting

MQDH “Add to VS Code” button does nothing

  • Check that VS Code is installed. The button opens a vscode:// URI link. If VS Code is not installed, your system won’t have a handler for this URI and nothing will happen. Install VS Code first, then try again.
  • Check if VS Code opened in the background. VS Code may launch but not appear on top of other windows. Check your taskbar or dock for the VS Code icon after clicking the button.
  • Try installing the extension manually. Open VS Code, go to Extensions (Cmd+Shift+X on Mac, Ctrl+Shift+X on Windows), and search for Meta Horizon. If the extension is not listed, use Option B: Install through Node.js (npx) instead.

MCP server won’t start

  • Check your Node.js version. The MCP server requires Node.js v18 or later. Run node --version to verify.
  • Check for npm errors. If you see npm error 404 Not Found when running npx -y @meta-quest/hzdb mcp server, the package may not be available yet. Check the @meta-quest/hzdb npm page to confirm it is published.
  • Validate your JSON configuration. A missing comma or extra bracket in your agent’s MCP config file will prevent the server from starting. Paste your config into a JSON validator if you’re unsure.
  • Check the command path. Make sure npx is available on your system PATH. Run npx --version to confirm.

Agent connects but device tools fail

  • Enable developer mode on your Quest headset. Device tools require ADB access, which requires developer mode to be turned on.
  • Enable USB debugging. In the headset, navigate to Settings > System > Developer and enable USB debugging.
  • Check your USB cable. Use a USB-C data cable, not a charge-only cable. If the device isn’t recognized, try a different cable or port.
  • Allow the connection. When you first connect via USB, the headset prompts you to allow the computer. Put on the headset and accept the prompt.

Documentation tools return errors

  • Check the URL format. When using fetch_meta_quest_doc, the URL should start with https://developers.meta.com/horizon/llmstxt/documentation/. Use the search_doc tool first to find valid page URLs.

Perfetto tools return errors

  • Call get_perfetto_context first. This tool must be called before using other performance analysis tools like load_trace_for_analysis, trace_thread_state, or run_sql_query.
Did you find this page helpful?