DependencyProof
# DependencyProof MCP

**Do not install a package or trust a configuration just because an assistant suggested it. Verify the evidence first.**
[](pyproject.toml)
[](tests/)
[](https://github.com/ahmedsaeed1-eng/dependencyproof-mcp/actions/workflows/ci.yml)
[](https://github.com/ahmedsaeed1-eng/dependencyproof-mcp/stargazers)
[](pyproject.toml)
[](https://modelcontextprotocol.io/)
[](#evidence-boundary)
[](LICENSE)
DependencyProof is a local evidence checker for coding agents and human reviewers. It compares explicit dependency declarations, imports, version observations and configuration claims. It is not a registry client. A missing record in a caller-provided version list never proves that a version does not exist.
The focus is motivated by developer feedback on generated code and dependency/configuration errors in the [2026 Stack Overflow Developer Survey — technology disruption data](https://survey.stackoverflow.co/2026/technology/data/disruption). This independent project does not claim to solve every hallucination or verify live package/API availability.
## Evidence ledger
| Verdict | Meaning |
|:--|:--|
| **supported** | The claim matches the explicit supplied declaration or observed metadata. This is not live verification. |
| **contradicted** | The supplied evidence has a definite declaration/value mismatch, or a supported version predicate fails. |
| **unknown** | Evidence or parser coverage is insufficient; do not invent an answer. |
| **warning** | Review a possible conflict; deployment or dependency context may affect it. |
The example npm review uses invented package names and illustrative metadata, not real registry records.
| Claim | Supplied evidence | Result |
|:--|:--|:--|
| example-ui at 1.2.0 | exact declaration and listed version | supported |
| example-ui at 1.3.0 | declared 1.2.0, metadata lists 1.3.0 | contradicted |
| example-router at 3.1.0 | declared ^3.0.0; no npm range parser | unknown |
| scripts.build exists | absent from supplied package.json | contradicted |
See [npm example input](examples/npm-request.json) and [Python example input](examples/python-request.json).
## Install and connect
Python 3.11 or newer is required for the standard-library TOML parser.
```sh
git clone https://github.com/ahmedsaeed1-eng/dependencyproof-mcp.git
cd dependencyproof-mcp
python -m pip install .
```
Installation uses the package manager; the MCP server itself never installs anything, invokes external commands or accesses a network.
### Codex
```sh
codex mcp add dependencyproof -- dependencyproof-mcp
codex mcp list
```
If the entry point is not on PATH, use the absolute path of the Python interpreter in the environment containing this project:
```toml
[mcp_servers.dependencyproof]
command = "/absolute/path/to/python"
args = ["-m", "dependencyproof.server"]
```
### Claude Desktop
```json
{
"mcpServers": {
"dependencyproof": {
"command": "/absolute/path/to/python",
"args": ["-m", "dependencyproof.server"]
}
}
}
```
These are configuration examples; check the host's current MCP settings. The included protocol test uses the official MCP client, not a live Codex or Claude host.
### Standalone CLI
```sh
dependencyproof < examples/npm-request.json
dependencyproof --fail-on-contradiction < examples/python-request.json
```
From the checkout with dependencies installed, use `python -m dependencyproof` as an alternative. The CLI accepts explicit request JSON on stdin and returns a JSON report on stdout. Exit codes: 0 (report produced), 1 (contradicted evidence, when the flag is enabled), 2 (invalid request). Unknowns are not counted as verified.
## MCP tool: verify_dependencies
| Argument | Purpose |
|:--|:--|
| format | package.json, requirements.txt, or pyproject.toml |
| manifest | Complete manifest text in the chosen format |
| imports | Python source/import statements or simple standalone JavaScript static statements; optional |
| metadata | Caller-provided package information; optional |
| claims | Explicit assertions to compare against supplied data; optional |
| local_modules | Explicit local/workspace module names that should not be treated as external dependencies; optional |
### Claim and metadata examples
```json
{
"format":"requirements.txt",
"manifest":"Pillow==10.4.0",
"imports":"import PIL",
"metadata":[
{
"name":"Pillow",
"versions":["10.4.0"],
"import_names":["PIL"],
"provenance":"caller-supplied metadata"
}
],
"claims":[
{"kind":"dependency","name":"Pillow","version":"10.4.0"}
]
}
```
The manifest declares a distribution named Pillow, whereas the import is PIL. Python imports are not assumed to share their distribution names. Only a supplied mapping can connect the two; otherwise the import is unresolved. Names are classified against the Python runtime's standard-library names or explicitly supplied local module labels.
A dependency claim may add:
- `section`: exact manifest section or declaration group name.
- `constraint`: expected declaration string. Python specifiers are represented using PyPA's parsed specifier string; npm constraints remain verbatim. This check is string equality, not mathematical range equivalence.
- `version`: requested version. Status is supported only when that exact version appears in caller metadata and the supported constraint check passes. Contradiction comes from the manifest predicate, never absence from nonexhaustive metadata. Multiple mandatory Python constraints are checked conjunctively. Conditional requirements and direct references remain unresolved.
A config claim uses a path of object/table keys and optionally an expected JSON value:
```json
{"kind":"config","path":["scripts","test"],"expected":"node --test"}
```
This checks key/value presence in the supplied manifest. It cannot determine whether a particular framework actually recognizes or supports that key.
### Coverage by ecosystem
| Check | npm | Python |
|:--|:--|:--|
| Declared dependencies | dependencies, devDependencies, peerDependencies, optionalDependencies | PEP 508 requirements and PEP 621 project dependencies/optional groups |
| Imports | standalone static import, export-from, simple require assignment | built-in AST, including relative imports |
| Versions | plain stable exact numeric versions only | PEP 440 parsed predicates using packaging |
| Conflicts | warning for multiple distinct exact declarations | contradiction for distinct unconditional nonoptional exact pins |
| Config values | package.json | pyproject.toml |
Not supported: JavaScript multiline/dynamic import syntax, project resolution aliases unless supplied, npm version range intersection, workspace resolution, resolved lockfiles, Python installer flags/includes, dynamic dependency declarations, optional group selection, registry existence, dependency graph or API symbol compatibility.
The report gives declaration records, per-import status, claim detail, provenance labels, observations with source locations and recommended next actions. Manifest locations identify logical JSON/TOML keys, while requirements/import locations include line numbers; no source file is opened.
## Agent workflow
Paste this into project-specific instructions to encourage evidence-based changes:
```text
Before adding or changing a dependency or configuration:
1. Provide the relevant manifest text and proposed import/claim to DependencyProof.
2. For Python imports, provide a verified import-to-distribution mapping.
3. For version claims, provide trusted metadata separately and identify its provenance.
4. Investigate contradicted and unknown results. Do not invent a package,
version, or API example to resolve them.
5. If necessary, consult official documentation through the normal authorized
workflow and run the project's existing tests. DependencyProof itself never
installs dependencies, modifies files, or executes tests.
```
## Evidence boundary
- Inputs are explicit text. No implicit repository traversal, filesystem reads, registry access, telemetry, credentials, mutation or external command execution.
- Text limit: 256 KiB and 10,000 LF characters per source; 300 records per list; up to 300 findings. Auxiliary evidence is limited by a 1 MiB serialized size check. The CLI request itself is limited to 256 KiB.
- Caller metadata is not independently verified. Presence is not proof that a package exists in a registry or that a declared dependency is installed.
- A declaration can be conditional, optional or supplied in distinct contexts; a missing declaration in supplied text is not proof that software cannot run.
- PEP 508 markers are not evaluated, and direct references are not followed. Python standard-library classification uses the running Python version's module names, not an arbitrary target runtime. Node builtin classification uses a fixed name list and does not verify target-version availability.
- No security or vulnerability assessment. Do not supply credential-bearing URLs or confidential manifest values.
## Reproduce the tests
```sh
python -m pip install ".[test]"
ruff check dependencyproof tests
black --check dependencyproof tests
python -m unittest discover -s tests -v
```
Local tests cover malformed/duplicate JSON, PEP 440 version evidence, name normalization, ambiguous Python mapping, missing declarations, incomplete installer configurations, nested config value mismatch, exact npm versions, unknown ranges and prereleases, CLI behavior, and a real official MCP stdio client session. 19 local tests (including 75 generated property examples), Ruff and Black passed on Linux/Python 3.12. CI is configured for Python 3.11/3.12 on Linux, macOS and Windows, but passing results on those hosts must be established by the workflow itself.
MIT license. See [LICENSE](LICENSE) and [THIRD_PARTY.md](THIRD_PARTY.md).
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusion between tools. Its purpose—comparing declarations/imports against supplied metadata and claims—is stated clearly.
The single name verify_dependencies follows a clean verb_noun snake_case convention. With only one tool there is no set-level pattern to fully validate consistency against, but nothing deviates.
A single tool is thin for a dependency-verification purpose; there is no way to gather metadata, resolve packages, or act on results. The tool itself is non-trivial and well-scoped, so it is borderline rather than a mismatch.
The surface is a dead end: it can only evaluate dependencies when all evidence is supplied externally, with no tools to fetch metadata, parse manifests, or suggest fixes. Agents must do most of the workflow outside this server.