Skip to main content

MCP server for the RE-Library knowledge base — search and retrieve Reverse Engineering entries from any MCP-compatible client.

Project description

re-library-mcp

A Model Context Protocol server that exposes the RE-Library knowledge base as a set of tools for any MCP-compatible client (Claude Desktop, Cursor, Continue, …).

The server reads the same content/**/*.md files that the GitHub Pages site reads, parses them, and serves them over JSON-RPC via stdio. No hosted backend; runs on the analyst's box.

Install

pip install re-library-mcp

For development, install from the repo in editable mode:

git clone https://github.com/Heretek-AI/RE-Library
cd RE-Library/mcp-server
pip install -e ".[dev]"

Use

From Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "re-library": {
      "command": "python",
      "args": ["-m", "re_library_mcp"]
    }
  }
}

Restart Claude Desktop. You'll see re-library listed with five tools available. Try asking:

"What are the main ways to bypass SSL pinning on Android?"

From Cursor / Continue / any MCP client

Same pattern — point the client at python -m re_library_mcp over stdio. See your client's docs for the exact config key.

Tools

Tool Purpose
search_re(query, category?, platform?, max_results?) Free-text search; returns up to 5 hits with title, category, snippet, and score.
get_entry(slug) Full text of one entry. The slug is <category>/<NN>-<slug>, e.g. android/01-apk-structure.
list_categories() All eight categories with their entry counts.
list_entries(category) Lightweight summary of every entry in one category.
get_anti_analysis_techniques(platform?) Convenience aggregator for the anti-analysis category.

Configuration

Env var Default Notes
RE_LIBRARY_CONTENT_DIR (unset) Path to a local copy of content/. If set, the loader reads from disk — useful for development and air-gapped use.
RE_LIBRARY_REPO Heretek-AI/RE-Library GitHub owner/name to fetch from when no local content is set.
RE_LIBRARY_BRANCH main Branch to fetch from.
RE_LIBRARY_OFFLINE (unset) If truthy, never make network requests; fail if local content is missing.

Smoke test

Verify the install and content resolution without starting a JSON-RPC session:

re-library-mcp --check
# or
python -m re_library_mcp --check

This prints a one-line summary of the loaded corpus (entry count by category) and exits.

Run the tests

cd mcp-server
pip install -e ".[dev]"
pytest -q

The tests cover:

  • test_loader.py — the loader can find and parse every entry.
  • test_no_drm_names.py — the DRM-name denylist is clean (the project's content policy guard).
  • test_schema_sync.py — the Python Pydantic schema and the Astro Zod schema agree on field names and the category/platform/ difficulty enums.
  • test_search.py — the in-memory search index.
  • test_tools.py — every MCP tool returns what its description promises.

Publishing a new release

The repo ships a python-publish.yml workflow (.github/workflows/) that builds the sdist + wheel and publishes to PyPI on every GitHub release, using PyPI trusted publishing (OIDC). No API tokens are stored in GitHub secrets.

One-time PyPI setup (do this once before the first release):

  1. Log in to https://pypi.org/ and create the re-library-mcp project if it doesn't already exist. PyPI project URLs are reserved on first upload; you don't need to "create" the project in advance.
  2. Go to https://pypi.org/manage/account/publishing/ and add a new pending publisher with:
    • PyPI Project Name: re-library-mcp
    • Owner: Heretek-AI
    • Repository name: RE-Library
    • Workflow filename: python-publish.yml
    • Environment name: pypi (must match the environment in the workflow file — create it under GitHub Settings → Environments)
  3. (Optional) Repeat the same steps on https://test.pypi.org/ if you want a dry-run target.

To cut a release:

# 1. Bump version in pyproject.toml (and any version references)
# 2. Commit
# 3. Tag and push
git tag v0.1.0
git push --tags

# 4. Open the release on GitHub
gh release create v0.1.0 --generate-notes

# The release event triggers the publish workflow, which builds and
# uploads to PyPI. Watch progress under the Actions tab.

You can also trigger the workflow manually from the Actions tab (workflow_dispatch) — useful for a TestPyPI dry-run.

Development

The server is small and self-contained. Three modules do almost all the work:

  • loader.py — finds and parses entries (local dir or GitHub).
  • search.py — builds an in-memory inverted index.
  • tools.py — the five MCP tool implementations.

server.py is the thin glue that registers them with the mcp Python SDK over stdio.

The full content corpus is at ../content/ — add an entry there, restart the server, and it's available.

License

MIT. See ../LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

re_library_mcp-0.1.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

re_library_mcp-0.1.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file re_library_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: re_library_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for re_library_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 50635b5281c5d4956a02d0994a6650f962ed9791e635c191df8391ecfd50ecf5
MD5 5ce26cffc3c3f3e9701f135fb7974d46
BLAKE2b-256 bfc8ee68b208409f644e480b52508867c5b41c77c15067fbb27dcfa4aace5f69

See more details on using hashes here.

Provenance

The following attestation bundles were made for re_library_mcp-0.1.0.tar.gz:

Publisher: python-publish.yml on Heretek-AI/RE-Library

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file re_library_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: re_library_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for re_library_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6de28378257b0e16e398cc73a64b71d0db7a726f091d11fd3989e1a5849a132
MD5 17b50dd443c32da10085c0e30583433b
BLAKE2b-256 a1c524a8f04625287f910c9e239caa6814a82045f219da47005480d79c20d05a

See more details on using hashes here.

Provenance

The following attestation bundles were made for re_library_mcp-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on Heretek-AI/RE-Library

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page