mcpyghidra 0.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. mcpyghidra-0.6.0/.github/workflows/ci.yml +73 -0
  2. mcpyghidra-0.6.0/.github/workflows/release.yml +98 -0
  3. mcpyghidra-0.6.0/.gitignore +63 -0
  4. mcpyghidra-0.6.0/CODE_OF_CONDUCT.md +84 -0
  5. mcpyghidra-0.6.0/CONTRIBUTING.md +177 -0
  6. mcpyghidra-0.6.0/LICENSE +202 -0
  7. mcpyghidra-0.6.0/NOTICE +43 -0
  8. mcpyghidra-0.6.0/PKG-INFO +182 -0
  9. mcpyghidra-0.6.0/README.md +147 -0
  10. mcpyghidra-0.6.0/SECURITY.md +50 -0
  11. mcpyghidra-0.6.0/docs/index.md +37 -0
  12. mcpyghidra-0.6.0/docs/installation.md +196 -0
  13. mcpyghidra-0.6.0/docs/mcp-client-config.md +222 -0
  14. mcpyghidra-0.6.0/docs/quickstart.md +201 -0
  15. mcpyghidra-0.6.0/docs/specs/rpc-callbacks.md +336 -0
  16. mcpyghidra-0.6.0/docs/tools-reference.md +707 -0
  17. mcpyghidra-0.6.0/pyproject.toml +170 -0
  18. mcpyghidra-0.6.0/src/__init__.py +0 -0
  19. mcpyghidra-0.6.0/src/mcpyghidra/__init__.py +0 -0
  20. mcpyghidra-0.6.0/src/mcpyghidra/_version.py +24 -0
  21. mcpyghidra-0.6.0/src/mcpyghidra/backend.py +397 -0
  22. mcpyghidra-0.6.0/src/mcpyghidra/custom_types_312.py +11 -0
  23. mcpyghidra-0.6.0/src/mcpyghidra/custom_types_p312.py +5 -0
  24. mcpyghidra-0.6.0/src/mcpyghidra/decaf_init.py +34 -0
  25. mcpyghidra-0.6.0/src/mcpyghidra/headless.py +196 -0
  26. mcpyghidra-0.6.0/src/mcpyghidra/mcp2openapi.py +197 -0
  27. mcpyghidra-0.6.0/src/mcpyghidra/mcpserver.py +346 -0
  28. mcpyghidra-0.6.0/src/mcpyghidra/mcpyghidra.py +307 -0
  29. mcpyghidra-0.6.0/src/mcpyghidra/models.py +374 -0
  30. mcpyghidra-0.6.0/src/mcpyghidra/py.typed +0 -0
  31. mcpyghidra-0.6.0/src/mcpyghidra/rpc_callbacks.py +336 -0
  32. mcpyghidra-0.6.0/src/mcpyghidra/rpc_types.py +66 -0
  33. mcpyghidra-0.6.0/src/mcpyghidra/server.py +1937 -0
  34. mcpyghidra-0.6.0/src/mcpyghidra/tools/__init__.py +5 -0
  35. mcpyghidra-0.6.0/src/mcpyghidra/tools/analysis.py +488 -0
  36. mcpyghidra-0.6.0/src/mcpyghidra/tools/cfg.py +555 -0
  37. mcpyghidra-0.6.0/src/mcpyghidra/tools/core.py +801 -0
  38. mcpyghidra-0.6.0/src/mcpyghidra/tools/modify.py +758 -0
  39. mcpyghidra-0.6.0/src/mcpyghidra/tools/open_program.py +184 -0
  40. mcpyghidra-0.6.0/src/mcpyghidra/tools/scripting.py +267 -0
  41. mcpyghidra-0.6.0/src/mcpyghidra/tools/search.py +267 -0
  42. mcpyghidra-0.6.0/src/mcpyghidra/tools/search_utils.py +102 -0
  43. mcpyghidra-0.6.0/src/mcpyghidra/tools/types.py +587 -0
  44. mcpyghidra-0.6.0/tasks.py +49 -0
  45. mcpyghidra-0.6.0/tests/__init__.py +0 -0
  46. mcpyghidra-0.6.0/tests/conftest.py +28 -0
  47. mcpyghidra-0.6.0/tests/e2e/__init__.py +0 -0
  48. mcpyghidra-0.6.0/tests/e2e/conftest.py +213 -0
  49. mcpyghidra-0.6.0/tests/e2e/ghidra_gui_helper.py +139 -0
  50. mcpyghidra-0.6.0/tests/e2e/start_gui_server.sh +179 -0
  51. mcpyghidra-0.6.0/tests/e2e/test_all_tools.py +1465 -0
  52. mcpyghidra-0.6.0/tests/e2e/test_cfg_callgraph.py +284 -0
  53. mcpyghidra-0.6.0/tests/e2e/test_concurrency.py +83 -0
  54. mcpyghidra-0.6.0/tests/e2e/test_gui_features.py +287 -0
  55. mcpyghidra-0.6.0/tests/e2e/test_headless_launch.py +91 -0
  56. mcpyghidra-0.6.0/tests/e2e/test_rpc_callbacks.py +590 -0
  57. mcpyghidra-0.6.0/tests/fixtures/Makefile +25 -0
  58. mcpyghidra-0.6.0/tests/fixtures/crackme.c +30 -0
  59. mcpyghidra-0.6.0/tests/fixtures/crackme.elf +0 -0
  60. mcpyghidra-0.6.0/tests/fixtures/struct_test.c +79 -0
  61. mcpyghidra-0.6.0/tests/fixtures/struct_test.elf +0 -0
  62. mcpyghidra-0.6.0/tests/fixtures/struct_test_stripped.elf +0 -0
  63. mcpyghidra-0.6.0/tests/fixtures/typed_fixture.c +42 -0
  64. mcpyghidra-0.6.0/tests/fixtures/typed_fixture.elf +0 -0
  65. mcpyghidra-0.6.0/tests/integration/__init__.py +0 -0
  66. mcpyghidra-0.6.0/tests/integration/conftest.py +37 -0
  67. mcpyghidra-0.6.0/tests/integration/helpers.py +29 -0
  68. mcpyghidra-0.6.0/tests/integration/test_analysis.py +386 -0
  69. mcpyghidra-0.6.0/tests/integration/test_cfg.py +140 -0
  70. mcpyghidra-0.6.0/tests/integration/test_core.py +173 -0
  71. mcpyghidra-0.6.0/tests/integration/test_modify.py +376 -0
  72. mcpyghidra-0.6.0/tests/integration/test_scripting.py +139 -0
  73. mcpyghidra-0.6.0/tests/integration/test_search.py +152 -0
  74. mcpyghidra-0.6.0/tests/integration/test_typed_fixture.py +218 -0
  75. mcpyghidra-0.6.0/tests/integration/test_types.py +337 -0
  76. mcpyghidra-0.6.0/tests/unit/__init__.py +0 -0
  77. mcpyghidra-0.6.0/tests/unit/conftest.py +264 -0
  78. mcpyghidra-0.6.0/tests/unit/test_analysis_branches.py +1101 -0
  79. mcpyghidra-0.6.0/tests/unit/test_backend_branches.py +1035 -0
  80. mcpyghidra-0.6.0/tests/unit/test_batch.py +225 -0
  81. mcpyghidra-0.6.0/tests/unit/test_cfg_branches.py +1680 -0
  82. mcpyghidra-0.6.0/tests/unit/test_cfg_normalization.py +397 -0
  83. mcpyghidra-0.6.0/tests/unit/test_core_branches.py +1281 -0
  84. mcpyghidra-0.6.0/tests/unit/test_elicitation.py +201 -0
  85. mcpyghidra-0.6.0/tests/unit/test_models.py +685 -0
  86. mcpyghidra-0.6.0/tests/unit/test_modify_branches.py +839 -0
  87. mcpyghidra-0.6.0/tests/unit/test_open_program.py +105 -0
  88. mcpyghidra-0.6.0/tests/unit/test_open_program_branches.py +528 -0
  89. mcpyghidra-0.6.0/tests/unit/test_rpc_callbacks.py +710 -0
  90. mcpyghidra-0.6.0/tests/unit/test_rpc_server_integration.py +1399 -0
  91. mcpyghidra-0.6.0/tests/unit/test_rpc_types.py +228 -0
  92. mcpyghidra-0.6.0/tests/unit/test_scripting_branches.py +644 -0
  93. mcpyghidra-0.6.0/tests/unit/test_search_branches.py +581 -0
  94. mcpyghidra-0.6.0/tests/unit/test_search_utils.py +222 -0
  95. mcpyghidra-0.6.0/tests/unit/test_server_branches.py +1991 -0
  96. mcpyghidra-0.6.0/tests/unit/test_server_info.py +383 -0
  97. mcpyghidra-0.6.0/tests/unit/test_types_branches.py +1216 -0
  98. mcpyghidra-0.6.0/uv.lock +1356 -0
@@ -0,0 +1,73 @@
1
+ name: CI
2
+
3
+ # NOTE: Scope of this workflow
4
+ # ────────────────────────────
5
+ # Integration and e2e tests require a Ghidra installation
6
+ # (GHIDRA_INSTALL_DIR=/opt/ghidra with Ghidra ≥12.0) and the
7
+ # pyghidra_decaf bootstrap shim, which are not available on
8
+ # GitHub-hosted runners. Those test tiers run in a separate
9
+ # environment with a Ghidra installation available.
10
+ #
11
+ # This workflow therefore runs only the Ghidra-free tiers:
12
+ # • Lint — ruff check + ruff format --check (src/)
13
+ # • Typecheck — mypy (config in root pyproject.toml; targets src/mcpyghidra)
14
+ # • Unit tests — pytest tests/unit/ (no Ghidra runtime needed)
15
+ #
16
+ # Python matrix: 3.10-3.13 — the full supported range advertised in
17
+ # pyproject.toml.
18
+
19
+ on:
20
+ push:
21
+ branches: [main]
22
+ pull_request:
23
+ branches: [main]
24
+
25
+ permissions:
26
+ contents: read
27
+
28
+ concurrency:
29
+ group: ${{ github.workflow }}-${{ github.ref }}
30
+ cancel-in-progress: true
31
+
32
+ jobs:
33
+ test:
34
+ name: Python ${{ matrix.python-version }}
35
+ runs-on: ubuntu-latest
36
+
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
41
+
42
+ steps:
43
+ - name: Checkout
44
+ uses: actions/checkout@v4
45
+ with:
46
+ # Full history needed by hatch-vcs to derive version from tags
47
+ fetch-depth: 0
48
+
49
+ - name: Set up Python ${{ matrix.python-version }}
50
+ uses: actions/setup-python@v5
51
+ with:
52
+ python-version: ${{ matrix.python-version }}
53
+ cache: pip
54
+
55
+ - name: Install uv
56
+ run: pip install --upgrade uv
57
+
58
+ - name: Install dependencies
59
+ run: uv pip install --system -e ".[dev]"
60
+
61
+ - name: Lint — ruff check
62
+ run: ruff check src tests
63
+
64
+ - name: Lint — ruff format check
65
+ run: ruff format --check src
66
+
67
+ - name: Type-check (mypy)
68
+ # mypy config in root pyproject.toml: packages = ["mcpyghidra"], mypy_path = "src"
69
+ run: mypy
70
+
71
+ - name: Unit tests (pytest)
72
+ # Integration and e2e tests require Ghidra; run unit tier only here.
73
+ run: pytest tests/unit/ -v --tb=short
@@ -0,0 +1,98 @@
1
+ # release.yml — Publish to PyPI on version tag push.
2
+ #
3
+ # PREREQUISITE (one-time setup):
4
+ # PyPI-side OIDC trusted publisher must be configured before this workflow
5
+ # can publish. In your PyPI project settings, add a "pending publisher" with:
6
+ # Owner: nightwing-us
7
+ # Repository: mcpyghidra
8
+ # Workflow: release.yml
9
+ # Environment: pypi
10
+ #
11
+ # See: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
12
+ #
13
+ # This workflow uses no stored PyPI API token. Authentication is handled
14
+ # entirely via GitHub's OIDC identity and PyPI's trusted publisher mechanism.
15
+
16
+ name: Release
17
+
18
+ on:
19
+ push:
20
+ tags:
21
+ - "v*"
22
+
23
+ permissions:
24
+ contents: read
25
+ id-token: write # Required for PyPI OIDC trusted publisher authentication
26
+
27
+ jobs:
28
+ build:
29
+ name: Build distribution
30
+ runs-on: ubuntu-latest
31
+
32
+ steps:
33
+ - name: Checkout
34
+ uses: actions/checkout@v4
35
+ with:
36
+ # Full history needed by hatch-vcs to determine version from tags
37
+ fetch-depth: 0
38
+
39
+ - name: Set up Python
40
+ uses: actions/setup-python@v5
41
+ with:
42
+ python-version: "3.12"
43
+ cache: pip
44
+
45
+ - name: Install uv
46
+ run: pip install --upgrade uv
47
+
48
+ - name: Build wheel and sdist
49
+ run: uv build
50
+
51
+ - name: Upload distribution artifacts
52
+ uses: actions/upload-artifact@v4
53
+ with:
54
+ name: dist
55
+ path: dist/
56
+
57
+ publish-pypi:
58
+ name: Publish to PyPI
59
+ needs: build
60
+ runs-on: ubuntu-latest
61
+ environment: pypi # Must match the environment name in PyPI OIDC config
62
+
63
+ steps:
64
+ - name: Download distribution artifacts
65
+ uses: actions/download-artifact@v4
66
+ with:
67
+ name: dist
68
+ path: dist/
69
+
70
+ - name: Publish to PyPI
71
+ uses: pypa/gh-action-pypi-publish@release/v1
72
+ # No token= needed; authentication is via OIDC (id-token: write above)
73
+
74
+ github-release:
75
+ name: Create GitHub Release
76
+ needs: publish-pypi
77
+ runs-on: ubuntu-latest
78
+ permissions:
79
+ contents: write # Required to create the release
80
+
81
+ steps:
82
+ - name: Download distribution artifacts
83
+ uses: actions/download-artifact@v4
84
+ with:
85
+ name: dist
86
+ path: dist/
87
+
88
+ - name: Create GitHub Release
89
+ env:
90
+ GH_TOKEN: ${{ github.token }}
91
+ # Use the preinstalled `gh` CLI (GitHub-owned, always allowed by
92
+ # restrictive org action policies) instead of a third-party action.
93
+ run: |
94
+ gh release create "${GITHUB_REF_NAME}" \
95
+ --repo "${GITHUB_REPOSITORY}" \
96
+ --title "${GITHUB_REF_NAME}" \
97
+ --generate-notes \
98
+ dist/*
@@ -0,0 +1,63 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.pyc
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ dist/
12
+ build/
13
+ *.egg-info/
14
+
15
+ # Virtual environments
16
+ venv/
17
+ env/
18
+ .env/
19
+ .venv/
20
+ .venv-cov/
21
+
22
+ # Unit test / coverage reports
23
+ htmlcov/
24
+ .tox/
25
+ .coverage
26
+ .coverage.*
27
+ .cache
28
+ nosetests.xml
29
+ coverage.xml
30
+ *.cover
31
+ .hypothesis/
32
+ .pytest_cache/
33
+
34
+ # mypy
35
+ .mypy_cache/
36
+ .dmypy.json
37
+ dmypy.json
38
+
39
+ # IDE specific files
40
+ .idea/
41
+ .vscode/
42
+ *.swp
43
+ *.swo
44
+
45
+ # Local development configuration
46
+ .python-version
47
+
48
+ # joe editor backup files
49
+ *~
50
+
51
+ # JVM crash reports
52
+ hs_err_pid*.log
53
+
54
+ src/mcpyghidra/_version.py
55
+ tests/fixtures/*_ghidra/
56
+
57
+ # coverage JSON exports (not matched by coverage.xml / *.cover above)
58
+ coverage.json
59
+ coverage-combined.json
60
+ coverage_summary.json
61
+
62
+ # Local MCP server config (developer-local; never published)
63
+ mcpo_config.json
@@ -0,0 +1,84 @@
1
+
2
+ # Contributor Covenant Code of Conduct
3
+
4
+ ## Our Pledge
5
+
6
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
7
+
8
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
9
+
10
+ ## Our Standards
11
+
12
+ Examples of behavior that contributes to a positive environment for our community include:
13
+
14
+ * Demonstrating empathy and kindness toward other people
15
+ * Being respectful of differing opinions, viewpoints, and experiences
16
+ * Giving and gracefully accepting constructive feedback
17
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
18
+ * Focusing on what is best not just for us as individuals, but for the overall community
19
+
20
+ Examples of unacceptable behavior include:
21
+
22
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email address, without their explicit permission
26
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
27
+
28
+ ## Enforcement Responsibilities
29
+
30
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
31
+
32
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
33
+
34
+ ## Scope
35
+
36
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
37
+
38
+ ## Enforcement
39
+
40
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement via GitHub's private vulnerability reporting on this repository (see [SECURITY.md](SECURITY.md) for the link), or by opening a confidential message to a maintainer listed in [CONTRIBUTING.md](CONTRIBUTING.md). All complaints will be reviewed and investigated promptly and fairly.
41
+
42
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
43
+
44
+ ## Enforcement Guidelines
45
+
46
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
47
+
48
+ ### 1. Correction
49
+
50
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
51
+
52
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
53
+
54
+ ### 2. Warning
55
+
56
+ **Community Impact**: A violation through a single incident or series of actions.
57
+
58
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
59
+
60
+ ### 3. Temporary Ban
61
+
62
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
63
+
64
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
65
+
66
+ ### 4. Permanent Ban
67
+
68
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
69
+
70
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
71
+
72
+ ## Attribution
73
+
74
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
75
+
76
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
77
+
78
+ For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
79
+
80
+ [homepage]: https://www.contributor-covenant.org
81
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
82
+ [Mozilla CoC]: https://github.com/mozilla/diversity
83
+ [FAQ]: https://www.contributor-covenant.org/faq
84
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,177 @@
1
+ # Contributing to mcpyghidra
2
+
3
+ Thank you for your interest in contributing to `mcpyghidra`. Contributions
4
+ of all kinds are welcome: bug reports, documentation improvements, and code
5
+ patches.
6
+
7
+ ---
8
+
9
+ ## Code of Conduct
10
+
11
+ All interactions in this project are governed by our
12
+ [Code of Conduct](CODE_OF_CONDUCT.md). Please read it before participating.
13
+
14
+ ---
15
+
16
+ ## Development Setup
17
+
18
+ ### Prerequisites
19
+
20
+ - Python 3.10 or later
21
+ - A working [Ghidra](https://ghidra-sre.org/) installation (required at runtime;
22
+ not needed for lint/typecheck-only work)
23
+
24
+ ### Clone and install
25
+
26
+ ```bash
27
+ git clone https://github.com/nightwing-us/mcpyghidra.git
28
+ cd mcpyghidra
29
+ pip install -e ".[dev]"
30
+ ```
31
+
32
+ ### Running the test suite
33
+
34
+ ```bash
35
+ uv run pytest --tb=short
36
+ ```
37
+
38
+ ### Linting
39
+
40
+ ```bash
41
+ uv run ruff check src tests
42
+ ```
43
+
44
+ ### Type-checking
45
+
46
+ ```bash
47
+ uv run mypy
48
+ ```
49
+
50
+ All three commands must pass before submitting a pull request. The CI workflow
51
+ runs them automatically on every PR.
52
+
53
+ ---
54
+
55
+ ## DCO Sign-Off Requirement
56
+
57
+ This project uses the **Developer Certificate of Origin (DCO)** to confirm that
58
+ contributors have the right to submit their contributions under the project
59
+ license.
60
+
61
+ Every commit in your pull request must carry a `Signed-off-by:` trailer:
62
+
63
+ ```
64
+ Signed-off-by: Jane Doe <jane@example.com>
65
+ ```
66
+
67
+ The name and email must match your real identity. Add it automatically with
68
+ the `-s` flag:
69
+
70
+ ```bash
71
+ git commit -s -m "fix: correct handling of null MCP response"
72
+ ```
73
+
74
+ By signing off you certify that you agree to the terms at
75
+ <https://developercertificate.org/>. The full DCO text is reproduced there;
76
+ the core statement is: you wrote the code (or have the right to submit it),
77
+ and you grant the project the right to use it under the Apache-2.0 license.
78
+
79
+ **DCO enforcement:** A status check on every pull request verifies that all
80
+ commits are signed off. Pull requests without signed-off commits cannot be
81
+ merged.
82
+
83
+ ---
84
+
85
+ ## Pull Request Process
86
+
87
+ ### Branch naming
88
+
89
+ Use a short, descriptive branch name prefixed with the change type:
90
+
91
+ ```
92
+ fix/headless-port-assignment
93
+ feat/add-callgraph-tool
94
+ docs/update-installation-guide
95
+ chore/bump-ruff-version
96
+ ```
97
+
98
+ ### Commit messages
99
+
100
+ This repository uses [Conventional Commits](https://www.conventionalcommits.org/).
101
+ Please format commit messages as:
102
+
103
+ ```
104
+ <type>(<optional scope>): <short description>
105
+
106
+ <optional body>
107
+
108
+ Signed-off-by: Jane Doe <jane@example.com>
109
+ ```
110
+
111
+ Common types: `fix`, `feat`, `docs`, `chore`, `ci`, `refactor`, `test`.
112
+
113
+ ### Before pushing
114
+
115
+ Run the full local check suite:
116
+
117
+ ```bash
118
+ uv run ruff check src tests
119
+ uv run mypy
120
+ uv run pytest --tb=short
121
+ ```
122
+
123
+ ### Opening the PR
124
+
125
+ - Target the `main` branch.
126
+ - Fill in the PR description with what changed and why.
127
+ - Link any related issues.
128
+ - Ensure all CI checks pass.
129
+
130
+ ### How your contribution lands
131
+
132
+ Maintainers review and approve pull requests on GitHub, then integrate
133
+ approved commits via cherry-pick rather than the GitHub "Merge" button.
134
+ As a result your PR will be **closed** (not merged via the button) once
135
+ the change has landed on `main`, and the maintainer will post a comment
136
+ such as:
137
+
138
+ > Landed in v1.2.3 — commit abc1234. Thanks!
139
+
140
+ Your change will appear in the next release. This is intentional and
141
+ does not mean your contribution was rejected.
142
+
143
+ ---
144
+
145
+ ## Code Style
146
+
147
+ - **Formatter:** [ruff](https://docs.astral.sh/ruff/) with the configuration in
148
+ `pyproject.toml` (`[tool.ruff]`).
149
+ - **Type-checking:** [mypy](https://mypy.readthedocs.io/) in gradual mode
150
+ (not `--strict`). Annotations are encouraged but not required everywhere:
151
+ Ghidra-API modules are `Any`-typed via `[[tool.mypy.overrides]]` stubs
152
+ (the JVM bridge has no static type information), and `warn_return_any` is
153
+ intentionally disabled to avoid ~80 false-positive ignores on Ghidra wrapper
154
+ return sites. Add annotations to new code and tighten existing code
155
+ incrementally. If you use `Any` outside of Ghidra-API call sites, add an
156
+ inline comment explaining why and expect discussion in review.
157
+ - **Import ordering:** ruff handles import ordering as part of formatting
158
+ (config in `pyproject.toml` `[tool.ruff]`).
159
+ - **Line length:** 120 characters (prose in docstrings: 80 characters).
160
+ - **String quotes:** single quotes preferred (ruff enforces this).
161
+
162
+ When in doubt, run `ruff check --fix` and `ruff format` to auto-correct most
163
+ style issues before committing.
164
+
165
+ ---
166
+
167
+ ## Reporting Bugs
168
+
169
+ Open an issue on [GitHub Issues](https://github.com/nightwing-us/mcpyghidra/issues).
170
+
171
+ For security vulnerabilities, see [SECURITY.md](SECURITY.md).
172
+
173
+ ---
174
+
175
+ ## Questions
176
+
177
+ Feel free to open a GitHub Discussion or comment on a relevant issue.