Skip to content

Development

RealmsNetwork edited this page Oct 20, 2026 · 1 revision

Architecture and Contributing

MAP combines provider configuration, request validation, provider adapters, and MCP tool registration. The precise module layout can change; inspect the active branch rather than relying on guessed paths.

Design principles

  • One MCP interface routes calls to multiple configured panel instances.
  • Each panel has its own provider and credentials.
  • Shared request validation, timeouts, and redaction should be reused across adapters.
  • Provider-specific operations belong in provider adapters, not in unrelated Pterodactyl code.
  • API version differences must be explicit and tested.
  • Unsupported actions should fail clearly instead of silently calling a different provider's route.
  • Secrets must stay in server-side configuration.

Development checks

Follow Getting Started and run:

python -m pytest -q
python -m compileall -q src

Also run the configured lint, packaging, and security workflows from the current repository release.

Adapter test checklist

Add mock-based tests for:

  • Host, prefix, method, headers, query, and body shape.
  • Version-dependent endpoints and unsupported namespaces.
  • Missing/insufficient credentials.
  • 401, 403, 404, rate limits, server errors, timeouts, TLS errors, and redirects.
  • SSRF and path traversal attempts.
  • Redaction of keys, cookies, query tokens, session data, and signed URLs.
  • Limits on request bodies, output, and inline transfers.
  • Invalid identifiers and destructive methods being rejected before network calls.

Never use production panel credentials in automated CI.

Pull request guidance

  1. Document behavior and tested provider versions.
  2. Link official API docs.
  3. Add tests and update the README, wiki, and changelog when behavior changes.
  4. Run tests, lint, build, and security checks.
  5. Explain migration impact and any known limitations.
  6. Review dependency updates that affect runtime compatibility or API behavior.

Attribution

Implement MAP's adapters and documentation as original project work. When reusing ideas, follow upstream licenses, preserve required attribution, and avoid copying large portions of code or documentation without authorization.

Clone this wiki locally