Metadata-Version: 2.1
Name: poco-mcp
Version: 0.1.0
Summary: Local MCP server for Poco-based game automation
License: CC BY-NC 4.0
Keywords: mcp,poco,airtest,unity,game-automation
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: Microsoft :: Windows
Classifier: License :: Other/Proprietary License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

# poco-mcp

Small local stdio MCP server for live Unity Poco automation.

The server exposes seven tools:

- `observe`: compact visible UI snapshot with stable refs and locators; use `query` to narrow candidates and `include_world=true` for buildings and map HUDs
- `tap`: click one explicit ref, locator, text, or normalized position
- `swipe`: scroll a view by direction and normalized anchor; observe again after each swipe to find an off-screen target
- `wait`: wait for a text or node name to appear or disappear
- `exists`: cheap remote Poco existence check
- `input_text`: type into a focused input
- `run_steps`: execute a previously verified sequence of stable selectors in one MCP call; stop on the first failed check

`observe` and `tap` return `timings_ms` for MCP-side latency. Model tokens and
API cost must be recorded by the model host, not this local MCP.

## Install

```powershell
pip install poco-mcp
poco-mcp
```

For a source checkout, install the development extras before running tests:

```powershell
pip install -e ".[dev]"
pytest -q
```

## License

This project is licensed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/).
Commercial use is not permitted.

Run it with the configured Python environment:

```powershell
$env:PYTHONPATH = "$PWD\src"
python -m poco_mcp.server
```

Set `POCO_MCP_HOST` and `POCO_MCP_PORT` when the target is not the default
`127.0.0.1:5001`. Install `pocoui` and `airtest` in the same environment.
