Skip to main content
Glama
AGENTS.md850 B
# OpticMCP - Agent Guidelines ## Commands - Run server: `uv run optic-mcp` - Run tests: `uv run pytest` - Lint: `uv run ruff check src/` ## Code Style - Python 3.10+, use type hints for all function signatures - Docstrings: multi-line describing what the function does and returns - Naming: `snake_case` for functions/variables, descriptive names - Imports: stdlib → third-party → local, one per line - Error handling: raise `RuntimeError` with context, use `try/finally` for cleanup ## Critical: OpenCV + MCP OpenCV prints to stderr which corrupts MCP stdio. Always suppress stderr at fd level BEFORE importing cv2 (see `_suppress_opencv_stderr()` in src/optic_mcp/server.py). ## MCP Tools When adding camera/vision tools, use the `@mcp.tool()` decorator. Tools should return JSON-serializable data or base64-encoded images for binary data.

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/Timorleiderman/OpticMCP'

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