Skip to main content

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.

Metadata

Release files for re-library-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for re-library-mcp 0.1.0
File Size Uploaded Provenance
re_library_mcp-0.1.0.tar.gz 18.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for re-library-mcp 0.1.0
File Interpreter ABI Platform
re_library_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.3 kB

Release files / re_library_mcp-0.1.0.tar.gz

Download URL re_library_mcp-0.1.0.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
50635b5281c5d4956a02d0994a6650f962ed9791e635c191df8391ecfd50ecf5
BLAKE2b-256 checksum
How to use checksums
bfc8ee68b208409f644e480b52508867c5b41c77c15067fbb27dcfa4aace5f69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / re_library_mcp-0.1.0-py3-none-any.whl

Download URL re_library_mcp-0.1.0-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6de28378257b0e16e398cc73a64b71d0db7a726f091d11fd3989e1a5849a132
BLAKE2b-256 checksum
How to use checksums
a1c524a8f04625287f910c9e239caa6814a82045f219da47005480d79c20d05a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Security for re-library-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for re_library_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page