Skip to content

DPandyan/model-context-tool-inspector

 
 

Repository files navigation

WebMCP - Model Context Tool Inspector

A Chrome extension for inspecting, monitoring, and executing tools exposed via the experimental navigator.modelContextTesting Web API, with optional AI-assisted interaction powered by a local LLM via LM Studio.

Prerequisites

  • Chrome 146.0.7672.0 or higher — enable the WebMCP for testing flag at chrome://flags/#enable-web-mcp.
  • LM Studio (optional) — required for the AI prompt/chat features. A model that supports OpenAI-style tool calling is recommended.

Installation

This extension is not on the Chrome Web Store. Install it locally from source.

  1. Clone the repo:

    git clone <repo-url>
    cd model-context-tool-inspector
  2. Build the bundle:

    npm install

    This bundles the OpenAI SDK into js-openai.js and removes node_modules.

  3. Load into Chrome:

    • Navigate to chrome://extensions/
    • Toggle Developer mode (top right)
    • Click Load unpacked and select this directory

Usage

Inspecting tools

  1. Open a page that exposes WebMCP tools.
  2. Click the extension icon in the toolbar to open the Side Panel.
  3. The panel lists all tools the page exposes — double-click a row to pretty-print it.
  4. Select a tool, edit the input arguments, and click Execute Tool to call it directly.

AI-assisted interaction

The panel can send natural-language prompts to a local LLM that automatically calls WebMCP tools on your behalf.

  1. Start LM Studio and load a model.

  2. Start the local server — in the LM Studio UI go to the Developer tab and click Start Server, or run:

    lms server start

    The server defaults to http://localhost:1234.

  3. Open the advanced menu (⋮ button next to the prompt) in the sidebar:

    • Confirm the endpoint is http://localhost:1234/v1 (change it if your LM Studio runs on a different port).
    • The model dropdown will populate automatically. Select the model you want.
  4. Type a prompt and press Send (or Enter). The LLM will call tools as needed and return a result.

  5. Reset clears the conversation history so the next prompt starts fresh.

  6. Copy trace copies the full request/response trace to the clipboard for debugging.

Rebuilding

If you update the openai SDK version in package.json, re-run npm install to regenerate js-openai.js.

Disclaimer

This is not an officially supported Google product.

About

A Chrome Extension that allows developers to inspect, monitor, and execute tools exposed via the experimental `navigator.modelContextTesting` Web API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 68.5%
  • CSS 23.2%
  • HTML 8.3%