AGENTS.mdโข2.69 kB
# Repository Guidelines
This repository hosts the React Native Godot MCP server for surfacing documentation, examples, and configuration guidance from `borndotcom/react-native-godot`. Follow these guidelines to keep contributions reliable for MCP agents and maintainers.
## Project Structure & Module Organization
Core server logic lives in `react_native_godot_mcp.py`, exposing FastMCP tools for documentation lookup and troubleshooting. Supporting scripts include `test_mcp_server.py` for smoke tests, `demo.py` for scripted interactions, and `install.sh` for guided setup. Client configuration examples live in `CONFIGURATION.md`; dependencies stay in `requirements.txt` and `package.json`.
## Build, Test, and Development Commands
- `python -m venv .venv && source .venv/bin/activate`: create an isolated Python environment.
- `pip install -r requirements.txt` or run `./install.sh`: install runtime dependencies.
- `python react_native_godot_mcp.py` (or `npm run start`): launch the MCP server via stdio transport.
- `python test_mcp_server.py` (or `npm test`): exercise each tool end-to-end.
- `npx @modelcontextprotocol/inspector python react_native_godot_mcp.py`: inspect tool metadata during development.
## Coding Style & Naming Conventions
Follow PEP 8 with 4-space indentation and descriptive snake_case for functions, coroutines, and data models. Keep docstrings focused on tool intent and arguments, and include type hints for new parameters and return values. Align HTTP routes, section identifiers, and tool names with the enums and dictionaries in `react_native_godot_mcp.py`.
## Testing Guidelines
Extend the async harness in `test_mcp_server.py` or add `pytest` modules under `tests/` with `pytest-asyncio`. Name coroutines `test_<feature>` and assert content plus truncation limits. Gate network coverage behind mockable helpers and document required environment variables in test docstrings.
## Commit & Pull Request Guidelines
Adopt Conventional Commits (e.g., `feat: add ios setup helper`, `fix: guard empty search queries`) and write bodies that state user impact and validation steps. Each pull request should link issues, summarise tool or schema changes, and include before/after snippets when output shifts. Confirm `python test_mcp_server.py` passes, note skipped checks, and record manual validation.
## MCP & Configuration Tips
Mirror configuration updates in `CONFIGURATION.md` and keep client instructions platform-specific. Keep secrets out of the repository; prefer environment variables passed through MCP client configs. When adding tools, update the `mcp` block in `package.json` and document formats so downstream agents can auto-discover them.