Skip to main content
Glama
bun913

playwright-min-network-mcp

by bun913

playwright-min-network-mcp

A minimal network monitoring MCP tool for Playwright browser automation. Just 5 simple tools to capture, filter, and analyze network traffic during web automation with MCP context efficiency.

graph LR
    A[Claude AI] --> B[🔍 Network MCP<br/>monitoring only]
    A --> C[🎮 Playwright MCP<br/>operation only]
    
    B --> D[Chrome Browser<br/>CDP: 9222]
    C --> D
    
    style B fill:#fff3e0
    style C fill:#f3e5f5
    style D fill:#e1f5fe
flowchart TD
    Start([Start]) --> A[🔍 Network MCP startup]
    A --> B[🌐 Launch browser<br/>CDP: 9222 waiting]
    B --> C[🎮 Playwright MCP startup]
    C --> D[🎮 Connect to existing browser via CDP]
    D --> E[Both MCPs sharing browser state]
    
    E -->|🔍 Network MCP| F[🔍 Start network monitoring]
    E -->|🎮 Playwright MCP| G[🎮 Execute browser operations]
    
    subgraph Browser["🌐"]
        F --> H[🔍 Record requests/responses]
        G --> I[🎮 Page navigation & clicks]
    end
    
    H --> J[🔍 Get monitoring results]
    I --> K[🎮 Operation complete]
    J --> End([Complete])
    K --> End
    
    style A fill:#fff3e0
    style B fill:#f0f8ff,stroke:#4682b4,stroke-width:2px
    style C fill:#f3e5f5
    style D fill:#f3e5f5
    style E fill:#e8f5e8
    style Browser fill:#f0f8ff,stroke:#4682b4,stroke-width:3px
    style F fill:#fff3e0
    style G fill:#f3e5f5
    style H fill:#fff3e0
    style I fill:#f3e5f5
    style J fill:#fff3e0
    style K fill:#f3e5f5

Features

  • 📡 Network Capture: Real-time request/response monitoring via Chrome DevTools Protocol

  • 🔍 Smart Filtering: Content-type, URL patterns, and HTTP method filtering

  • ⚡ MCP Context Safe: 512B previews + 50KB detail limits prevent token overflow

  • 🔄 Dynamic Updates: Change filters without browser restart

  • 🤝 Playwright Integration: Works seamlessly with Playwright MCP

Related MCP server: browser-mcp-server

Prerequisites

1. Install Playwright

This tool requires Playwright to be installed for browser automation:

npm install playwright
# Install browser binaries
npx playwright install chromium

2. Install Network Monitor MCP

npm install playwright-min-network-mcp

Quick Start

Basic MCP Configuration

Add to your .mcp.json:

{
  "mcpServers": {
    "network-monitor": {
      "command": "npx",
      "args": ["playwright-min-network-mcp"]
    }
  }
}

Combined with Playwright MCP

{
  "mcpServers": {
    "network-monitor": {
      "command": "npx",
      "args": ["playwright-min-network-mcp"]
    },
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp", "--cdp-endpoint", "http://localhost:9222"]
    }
  }
}

Usage Examples

Basic Workflow

// 1. Start monitoring (launches visible Chrome browser)
{
  "tool": "start_monitor"
}

// 2. Use Playwright MCP to interact with web pages
// The browser will automatically connect to the same CDP endpoint

// 3. Retrieve captured network requests (compact overview with 512B previews)
{
  "tool": "get_recent_requests",
  "arguments": {
    "count": 50
  }
}

// 4. Get detailed request info by UUID (limited to 50KB, headers optional)
{
  "tool": "get_request_detail",
  "arguments": {
    "uuid": "123e4567-e89b-12d3-a456-426614174000",
    "include_headers": false
  }
}

// 5. Stop monitoring when done
{
  "tool": "stop_monitor"
}

Filtering Examples

// Include everything (CSS, JS, images, etc.)
{"tool": "start_monitor", "arguments": {"filter": {"content_types": "all"}}}

// Custom content types  
{"tool": "start_monitor", "arguments": {"filter": {"content_types": ["application/json", "text/css"]}}}

// Update filters without restarting browser
{"tool": "update_filter", "arguments": {"filter": {"content_types": ["application/json"], "url_include_patterns": ["api/"], "methods": ["POST"]}}}

API Reference

Tools

  • start_monitor: Launch browser and start monitoring

  • update_filter: Change filters without browser restart

  • stop_monitor: Stop monitoring

  • get_recent_requests: Get compact overview with 512B previews

  • get_request_detail: Get full details by UUID (50KB limit)

Default Filtering

Captures API and form data by default:

  • application/json, application/x-www-form-urlencoded, multipart/form-data, text/plain

  • Excludes CSS, JS, images (use content_types: "all" to include)

Output Format

Compact overview (get_recent_requests) with 512B request/response body previews:

{
  "total_captured": 156,
  "showing": 30,
  "requests": [
    {
      "uuid": "123e4567-e89b-12d3-a456-426614174000",
      "method": "POST",
      "status": 200,
      "url": "https://api.github.com/graphql",
      "mimeType": "application/json",
      "requestBodyPreview": "{\"query\": \"query GetRepository...",
      "requestBodySize": 2048,
      "responseBodyPreview": "{\"data\": {\"repository\": {...",
      "responseBodySize": 4096,
      "timestamp": 1641472496000,
      "responseTimestamp": 1641472496123
    }
  ]
}

Full request details (via get_request_detail with UUID, limited to 50KB):

{
  "id": "request-123",
  "uuid": "123e4567-e89b-12d3-a456-426614174000",
  "url": "https://api.github.com/graphql",
  "method": "POST",
  "headers": undefined,
  "timestamp": 1641472496000,
  "type": "request",
  "body": "{\"query\": \"query GetRepository($owner: String!, $name: String!) { ... }\"}",
  "response": {
    "status": 200,
    "headers": undefined,
    "mimeType": "application/json",
    "body": "{\"data\": {\"repository\": {...}}} \n... [truncated from 67647 bytes]"
  },
  "responseTimestamp": 1641472496123
}

Requirements

  • Node.js ≥18.0.0

  • Playwright (npm install playwright && npx playwright install chromium)

Development

# Clone and install
git clone https://github.com/bun913/playwright-min-network-mcp.git
cd playwright-min-network-mcp
npm install

# Build
npm run build

# Test
npm run test:ci

# Development mode
npm run dev

# Debug with MCP Inspector
npm run debug

License

MIT License - see LICENSE file for details.

Available Tools

5 tools
get_recent_requestsA

Get recent network requests compact overview with 512B request/response body previews. Shows both request and response body previews separately.

ParametersJSON Schema
NameRequiredDescriptionDefault
countNoNumber of requests to return
include_headersNoInclude request/response headers

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses the 512B body preview limit and that request/response bodies are shown separately, but does not mention ordering, filtering, read-only behavior, or what happens when bodies exceed the limit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences with the purpose front-loaded. Every word contributes value, and there is no unnecessary repetition or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two optional parameters and no output schema, the description explains the core purpose and a key limitation (512B previews), but does not detail the exact response structure beyond 'compact overview' and separate previews. This is adequate but not exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers both parameters (count and include_headers) with descriptions, so the description adds no extra parameter semantics beyond what the schema already provides. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets recent network requests as a compact overview with 512B request/response body previews. The phrase 'compact overview' distinguishes it from sibling get_request_detail, which likely provides full details.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for a compact overview of recent requests, but it does not explicitly state when to use it versus alternatives like get_request_detail, nor does it provide exclusions or when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_request_detailA

Get full details for a specific request by UUID. Returns complete request/response data with 50KB body limit and optional headers to prevent MCP context overflow.

ParametersJSON Schema
NameRequiredDescriptionDefault
uuidYesUUID of the request to retrieve details for
include_headersNoInclude request/response headers (default: false for context efficiency)

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses the 50KB body limit and the fact that headers are optional to avoid context overflow. This adds meaningful behavioral detail beyond simply saying 'get details'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no redundancy. The first sentence states the core action and resource, while the second adds a key constraint and an optional behavior. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 2 parameters and no output schema, the description adequately covers the purpose, the input (uuid), the key behavioral limit (50KB body), and the optional parameter's rationale. The return type is implied by 'Returns complete request/response data', so no further context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value by explaining include_headers as a way to prevent MCP context overflow, giving the boolean parameter purpose beyond its default value. This enhances the semantic understanding of the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Get full details for a specific request by UUID') and clearly distinguishes from sibling tool get_recent_requests by targeting an individual request with complete data. This makes the tool's purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear context is provided: use when you have a UUID and need full request/response details. The description also mentions the 50KB body limit and optional headers to prevent MCP context overflow, guiding when to set include_headers. However, no explicit alternatives or exclusions are named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

start_monitorA

Start network monitoring with a new browser instance. Default: captures API and form data only (JSON, form submissions). Use "all" to include static files.

ParametersJSON Schema
NameRequiredDescriptionDefault
filterNoContent-type filtering configuration. Controls which types of network requests to capture.
cdp_portNoChrome DevTools Protocol port number
max_buffer_sizeNoMaximum buffer size for storing requests

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description discloses that starting monitoring launches a new browser instance and captures API/form data by default. It doesn't elaborate on side effects like resource usage, return values, or interaction with the CDP port, but the schema covers some parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the action and default behavior, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for a start action; it explains the core purpose and default filter behavior. It could mention that monitoring requires stopping later, but the sibling stop_monitor implies this, and the schema handles parameter details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides exhaustive descriptions for all 3 parameters, so the description's mention of default capture and 'all' adds high-level guidance. This supplements the schema's content type filter explanation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'Start network monitoring' with a new browser instance, and specifies the default capture scope. It differentiates from sibling tools like stop_monitor and get_recent_requests by its verb and resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explains the default behavior and instructs to use 'all' to include static files, providing clear context on how to invoke the filter. However, it doesn't explicitly state when to use this tool over alternatives, though the sibling names imply roles.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

stop_monitorB

Stop network monitoring

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.3/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure, but it only restates the action without explaining scope (e.g., stops all monitoring or a specific monitor), reversibility, or side effects. This is insufficient for a control operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no wasted words. It is compact and immediately readable, earning high marks for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple zero-parameter tool, the description covers the core action but omits important context such as what exactly is stopped and whether the action is reversible. Given no annotations or output schema, a bit more detail would make it complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema provides complete coverage and the description adds no necessary parameter detail. Per baseline rules, a score of 4 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Stop network monitoring' uses a specific verb ('Stop') and resource ('network monitoring'), clearly distinguishing it from siblings like start_monitor. It unambiguously states the tool's primary action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, scenarios, or exclusions, leaving the agent to infer usage from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_filterA

Update network monitoring filter settings without restarting the browser. Preserves the current browsing session.

ParametersJSON Schema
NameRequiredDescriptionDefault
filterYesContent-type filtering configuration. Controls which types of network requests to capture.

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the update happens without a browser restart and preserves the browsing session, which is useful behavioral context. However, it does not clarify whether existing captured network data is retained or cleared, or whether the filter applies immediately to ongoing monitoring. This is a significant side-effect that remains ambiguous.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is immediately clear and front-loaded. It states the primary action first, followed by two caveats that add value. Every phrase earns its place with no repetitive or unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has a nested parameter and no output schema. The description explains what the tool does and why it is useful, but it omits crucial operational context such as whether a monitor must be running, what the response looks like, and the effect on existing captured data. Given the lack of annotations and output schema, these gaps leave the description only partially complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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 tool-level description does not add any additional parameter meaning beyond what the schema already provides. The schema's rich field descriptions, defaults, and examples do the heavy lifting, so the description adds minimal extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (update) and the specific resource (network monitoring filter settings). It also distinguishes itself from sibling tools like start_monitor, stop_monitor, and get_recent_requests by focusing on modifying configuration rather than lifecycle or retrieval. The added context about preserving the browsing session reinforces its distinct purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is used when you want to change filter settings without restarting the browser and without losing the current session. This gives clear usage context. However, it does not explicitly state when not to use it (e.g., if monitoring is not active) or name alternative approaches, so it stops short of a full 'when/when-not' guideline.

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. Dates show when Glama detected each change.

  1. 5 tool updatesv0.3.3
    • First observedget_recent_requests
    • First observedget_request_detail
    • First observedstart_monitor
    • First observedstop_monitor
    • First observedupdate_filter

TDQS

A4/5.0
Disambiguation5/5

Each tool has a distinct role: start_monitor initiates, update_filter configures, get_recent_requests and get_request_detail serve different retrieval needs (compact vs. detailed by UUID), and stop_monitor terminates. Even the two retrieval tools are clearly separated by preview length and lookup method.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: start_monitor, update_filter, stop_monitor, get_request_detail, get_recent_requests. The verbs are clear and the naming is uniform.

Tool Count5/5

Five tools is exactly the right scope for a network monitoring MCP. Each tool covers a necessary part of the workflow without redundancy or bloat.

Completeness4/5

The tool set covers the full monitor lifecycle: start, configure, query, and stop. Missing features like clearing logs or exporting data are minor and don't create dead ends for the primary use case.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    🚀 Active Fork of executeautomation/mcp-playwright This repository is an actively maintained continuation of the original MCP Playwright server: >👉 https://github.com/executeautomation/mcp-playwright A Model Context Protocol server that provides browser automation capabilities using Playwright.
    6
    32
    18,122
    1
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A universal browser automation MCP server using Playwright, enabling programmatic control of Chrome with 63 tools for navigation, interaction, media control, and CDP-based diagnostics.
    63
    24
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A comprehensive browser automation MCP server using Playwright, offering 50+ tools for page control, element interaction, content extraction, and more across multiple browser engines.
    21
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bun913/playwright-min-network-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server