pywebview-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PYWEBVIEW_MCP_PORT | No | HTTP bridge port (default 7891) | 7891 |
| PYWEBVIEW_MCP_CDP_PORT | No | Chrome DevTools port for screenshots (default 9222) | 9222 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| screenshotA | Capture a screenshot of the webview page (or a specific element by ID). Uses CDP (edgechromium/qt renderer). Call this first to orient yourself. |
| get_dom_treeA | Get the DOM tree of the page as JSON. Each element has: id, tag, html_id, class, role, text, visible, bounds, children. Use element IDs from this tree in other tools. |
| get_element_infoA | Get detailed properties of a specific DOM element by MCP id. |
| get_app_stateA | Get app-level state: page title, URL, focus element, pywebview platform. |
| find_elementB | Search DOM elements by CSS selector, tag, html id, ARIA role, text, or visibility. Examples: find_element(selector="#launch-btn") find_element(text="Launch") find_element(role="button") |
| clickA | Click an element or page coordinate.
|
| double_clickC | Double-click an element. |
| type_textB | Type text into an input element (focuses it first). |
| press_keyA | Press a key on the focused element. Named keys: enter, escape, tab, backspace, delete, arrows, space, home, end, f1–f6. |
| scrollB | Scroll the page or an element. dy > 0 scrolls down. |
| get_logsB | Get the last n Python logging records from the app. |
| get_app_outputA | Get the last n lines of the launched app's stdout/stderr. Only works for apps started via launch_app on this server. |
| eval_pythonA | Evaluate Python in the app process. Context: window, webview, api (js_api object). WARNING: debugging only. |
| eval_jsC | Execute JavaScript in the webview page and return the result. |
| call_apiB | Call a js_api method directly on the Python object exposed to the page. Example: call_api("get_state") when the app exposes state via js_api. |
| get_launch_helpA | Return how to call launch_app — especially the script parameter. Call this before launch_app when you are unsure which entry .py to use or whether script should include a subfolder path. |
| launch_appA | Launch a pywebview app with the MCP bridge injected, then wait until the UI is ready. |
| wait_until_readyC | Wait until DOM is ready and pywebview API is available. |
| wait_for_idleA | Wait until the page has been quiet (no DOM mutations) for quiet_ms. |
| get_app_statusB | Report process + bridge health; detect likely native dialog blocks. |
| list_actionsA | List clickable buttons, links, and role=button elements. |
| trigger_actionA | Click a button/link by html id (name) or visible text without DOM traversal. |
| stop_appB | Stop a previously launched app (started via launch_app). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/com55/pywebview-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server