Skip to main content

Subnet MCP endpoint discovery and vulnerability analysis toolkit with CLI and API interfaces.

Project description

Conmap

Conmap discovers Model Context Protocol (MCP) endpoints on the local network and evaluates them against the safe-mcp guidance. It ships with a feature-rich command line interface and an HTTP API suitable for enterprise automation pipelines.

Features

  • Subnet discovery – Detects local subnets automatically and probes HTTP/HTTPS endpoints for MCP support.
  • MCP fingerprinting – Validates headers, capability manifests, and well-known paths to confirm MCP compatibility.
  • Vulnerability analysis – Applies Schema Inspector, Chain Attack Detector, and LLM Analyzer heuristics inspired by the safe-mcp framework.
  • OpenAI integration – Uses GPT-4o for semantic reviews of tool descriptions with transparent caching.
  • Layered depth – Choose basic, standard, or deep analysis (deep enables AI semantics and richer chain detection with privilege paths).
  • Automation-ready output – Produces structured JSON reports grouped by endpoint, tool, resource, and prompt.
  • Interfaces – Provides both a Typer-based CLI and FastAPI server for flexible deployments.

Quick Start

pip install conmap
conmap scan --output report.json
# Run a deeper AI-assisted assessment
conmap scan --depth deep --output deep-report.json

To run the web service:

conmap api --host 0.0.0.0 --port 8080

Development

Using uv (recommended)

uv sync --extra dev
uv run pre-commit install
uv run pre-commit run --all-files --show-diff-on-failure
uv run pytest --cov=conmap
uv run conmap scan --output report.json

This will create an isolated .venv managed by uv and install both runtime and development dependencies.

Using pip

python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
pre-commit install
pre-commit run --all-files --show-diff-on-failure
pytest --cov=conmap

Versioning

Conmap derives its version from annotated Git tags via setuptools_scm. When you are ready to cut a release, create a tag such as v0.2.0; the version embedded in the build will match the tag.

Configuration

  • Set OPENAI_API_KEY for GPT-4o analysis.
  • Use CONMAP_MAX_CONCURRENCY and CONMAP_TIMEOUT (legacy MCP_SCANNER_*) to tune scanning behavior.
  • Control automation flags with CONMAP_ENABLE_LLM_ANALYSIS and analysis depth with CONMAP_ANALYSIS_DEPTH (basic, standard, deep).
  • The HTTP API accepts analysis_depth (basic|standard|deep) and enable_ai fields in the body of POST /scan.

Publishing

Releases are driven by annotated tags. Create and push a tag in the form vX.Y.Z to trigger the Release workflow:

git tag -a v0.1.0 -m "release v0.1.0"
git push origin v0.1.0

The workflow will:

  1. Install dependencies, lint, and run tests.
  2. Build the project with setuptools_scm pinned to the tag version.
  3. Upload artifacts to PyPI via pypa/gh-action-pypi-publish and create a GitHub release.

Ensure the repository secret PYPI_API_TOKEN contains a valid PyPI API token before pushing tags.

For a manual (local) release:

export VERSION=0.1.0
git tag -a "v$VERSION" -m "release v$VERSION"
git push origin "v$VERSION"
export SETUPTOOLS_SCM_PRETEND_VERSION="$VERSION"
uv run python -m build
python -m pip install --upgrade twine
python -m twine upload dist/*

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

conmap-0.2.0.tar.gz (99.1 kB view details)

Uploaded Source

Built Distribution

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

conmap-0.2.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file conmap-0.2.0.tar.gz.

File metadata

  • Download URL: conmap-0.2.0.tar.gz
  • Upload date:
  • Size: 99.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for conmap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7a1d603649548b5f24d53b1fba15d5a6ac569d212ec27eec6608e723b9b9fd6a
MD5 f7b0eb610235914a33e524030a2ca673
BLAKE2b-256 52d069d6508888d147967aba6852a0eda7f52e4b9bd623cab9fe60b12a249144

See more details on using hashes here.

File details

Details for the file conmap-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: conmap-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for conmap-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94477b3193a965e13a34860085a344577c250c3b9d19e84f39add7701690fced
MD5 ab5c541a6c79c70cc01eb94a27a4c146
BLAKE2b-256 75d105f16a45230ce604d3174cc8770e08a0751e96e4f7c79d25991f71482080

See more details on using hashes here.

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