Resources
18Install
npx skillscat add luislozanogmia/ghost-mcp Install via the SkillsCat registry.
Ghost MCP
Use this skill when browser automation should run through Ghost Browser v3 instead of the older chrome_mcp attachment flow.
What this skill provides
- A deterministic Ghost MCP server with named browser instances
- A stdio proxy entrypoint for MCP clients
- A bridge for vacuum/action workflows over live browser pages
- Chrome session attachment through the Ghost runtime, including external browser support
Architecture
You (Coding Agent)
↓ stdio MCP
ghost_stdio_proxy.py <- the wrapper you connect to
↓ HTTP
mcp_server.py <- daemon, manages named Chrome sessions
↓
chrome_mcp_runtime.py <- wraps the Chrome MCP server process
↓
Chrome (live browser)ghost_stdio_proxy.py is the MCP entrypoint. It auto-starts the daemon. Do not call mcp_server.py directly.
One-Time Wiring
From the skill folder:
pip install -r requirements.txt
playwright install chromiumTo expose the server to an MCP client, point it at ghost_stdio_proxy.py:
{
"mcpServers": {
"ghost": {
"command": "python",
"args": ["/path/to/ghost-mcp/ghost_stdio_proxy.py"]
}
}
}If you are wiring Codex itself, add the ghost entry under your mcp_servers config and point it at the same proxy command:
[mcp_servers.ghost]
command = "/Users/luis.lozano/.codex/skills/ghost_mcp/.venv/bin/python"
args = ["/Users/luis.lozano/.codex/skills/ghost_mcp/ghost_stdio_proxy.py"]
enabled = trueThen reload or restart Codex so the new MCP server is registered.
Runner
python3 ghost_mcp.py --helppython3 ghost_mcp.py --self-testpython3 ghost_mcp.py vacuum <temp_file> --url <url> --title <title>python3 ghost_mcp.py action <choice> --value <text>python3 ghost_stdio_proxy.py
Tools You Have
| Tool | What it does |
|---|---|
ghost_status |
Check if browser is connected; call this first if unsure |
ghost_vacuum |
Read current page and return a numbered list of interactive elements |
ghost_click |
Click element by number from vacuum output |
ghost_more |
Scroll / load more elements (offset=N to skip ahead) |
ghost_screenshot |
Take a screenshot for visual verification |
ghost_save_auth |
Save current browser cookies to disk; call immediately after manual login |
ghost_instance_create |
Create or reuse a named Chrome session, optionally navigating to a URL |
ghost_instance_list |
List all active named sessions |
ghost_instance_close |
Close a named session without deleting its profile |
All tools accept optional instance_id. Omit it to use the default session.
Critical Rules
- Always call
ghost_statusbefore assuming the browser is connected. - Always re-vacuum after navigation; element numbers are only valid for the current page state.
- Always call
ghost_save_authimmediately after login so auth persists. - Use different
instance_idvalues for independent browser sessions.
Standard Flow
- Check connection
ghost_status- Read the page
ghost_vacuumReturns a numbered list of every interactive element. Elements are indexed starting at 1.
- Interact
ghost_click {"choice": 7} # click element 7
ghost_more # load more if list was truncated
ghost_screenshot # verify visually- Re-vacuum after any navigation. Element numbers reset on every new page.
Multi-Session Pattern
Use when you need two independent browser sessions simultaneously:
ghost_instance_create {"instance_id": "session-a", "url": "https://example.com"}
ghost_instance_create {"instance_id": "session-b", "url": "https://other.com"}
ghost_vacuum {"instance_id": "session-a"}
ghost_click {"instance_id": "session-b", "choice": 5}
ghost_instance_close {"instance_id": "session-b"}Always pass the same instance_id on every call for that session.
Auth Persistence
LinkedIn and other sites expire sessions. Correct flow:
- User logs in manually in the browser
- You call
ghost_save_authimmediately on the sameinstance_id - Ghost saves cookies and loads them automatically on next startup
Never attempt to type passwords.