trueppm-mcp 0.4.0b1__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.
- trueppm_mcp-0.4.0b1/.gitignore +147 -0
- trueppm_mcp-0.4.0b1/Dockerfile +63 -0
- trueppm_mcp-0.4.0b1/LICENSE +201 -0
- trueppm_mcp-0.4.0b1/PKG-INFO +159 -0
- trueppm_mcp-0.4.0b1/README.md +123 -0
- trueppm_mcp-0.4.0b1/pyproject.toml +102 -0
- trueppm_mcp-0.4.0b1/server.json +40 -0
- trueppm_mcp-0.4.0b1/src/trueppm_mcp/__init__.py +25 -0
- trueppm_mcp-0.4.0b1/src/trueppm_mcp/__main__.py +8 -0
- trueppm_mcp-0.4.0b1/src/trueppm_mcp/cli.py +75 -0
- trueppm_mcp-0.4.0b1/src/trueppm_mcp/client.py +455 -0
- trueppm_mcp-0.4.0b1/src/trueppm_mcp/config.py +85 -0
- trueppm_mcp-0.4.0b1/src/trueppm_mcp/py.typed +0 -0
- trueppm_mcp-0.4.0b1/src/trueppm_mcp/server.py +90 -0
- trueppm_mcp-0.4.0b1/src/trueppm_mcp/tools.py +994 -0
- trueppm_mcp-0.4.0b1/tests/__init__.py +0 -0
- trueppm_mcp-0.4.0b1/tests/conftest.py +42 -0
- trueppm_mcp-0.4.0b1/tests/test_auth.py +160 -0
- trueppm_mcp-0.4.0b1/tests/test_cli.py +46 -0
- trueppm_mcp-0.4.0b1/tests/test_config.py +50 -0
- trueppm_mcp-0.4.0b1/tests/test_docs_drift.py +40 -0
- trueppm_mcp-0.4.0b1/tests/test_rate_limit.py +158 -0
- trueppm_mcp-0.4.0b1/tests/test_refusal.py +168 -0
- trueppm_mcp-0.4.0b1/tests/test_tools.py +1144 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
*.egg
|
|
6
|
+
.eggs/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
.cache/pip/
|
|
10
|
+
.venv
|
|
11
|
+
venv/
|
|
12
|
+
env/
|
|
13
|
+
|
|
14
|
+
# Mypy / Ruff / Pytest / Hypothesis
|
|
15
|
+
.mypy_cache/
|
|
16
|
+
.ruff_cache/
|
|
17
|
+
.pytest_cache/
|
|
18
|
+
.hypothesis/
|
|
19
|
+
.coverage
|
|
20
|
+
htmlcov/
|
|
21
|
+
|
|
22
|
+
# Node — no trailing slash so a worktree's `node_modules` *symlink*
|
|
23
|
+
# (created by scripts/wt) is ignored too, not just real directories.
|
|
24
|
+
node_modules
|
|
25
|
+
|
|
26
|
+
# Coverage
|
|
27
|
+
coverage/
|
|
28
|
+
coverage.xml
|
|
29
|
+
# Generated by scripts/sonar-scan.sh / the sonar:scan CI job: a copy of the API
|
|
30
|
+
# coverage.xml with a resolvable <source> root injected for import (#2113).
|
|
31
|
+
coverage.sonar.xml
|
|
32
|
+
|
|
33
|
+
# uv lockfile. The api (APPLICATION), the scheduler (published LIBRARY), and the
|
|
34
|
+
# mcp server (self-hostable app + published PyPI package) all commit a resolved
|
|
35
|
+
# lock — for reproducible dev/CI installs and a scannable dependency surface: an
|
|
36
|
+
# SCA tool (security:osv) can audit a committed lockfile but not the version
|
|
37
|
+
# ranges a library declares. The published wheels still ship ranges from
|
|
38
|
+
# pyproject.toml; the lock is a repo-side artifact only (#904 api supply-chain
|
|
39
|
+
# hardening, #1153 scheduler OSV migration, #2122 mcp). Keep the blanket ignore
|
|
40
|
+
# for everything else.
|
|
41
|
+
uv.lock
|
|
42
|
+
!packages/api/uv.lock
|
|
43
|
+
!packages/scheduler/uv.lock
|
|
44
|
+
!packages/mcp/uv.lock
|
|
45
|
+
|
|
46
|
+
# Docker
|
|
47
|
+
*.override.yml
|
|
48
|
+
|
|
49
|
+
# OS
|
|
50
|
+
.DS_Store
|
|
51
|
+
Thumbs.db
|
|
52
|
+
|
|
53
|
+
# Editor
|
|
54
|
+
.idea/
|
|
55
|
+
.vscode/
|
|
56
|
+
*.swp
|
|
57
|
+
*.swo
|
|
58
|
+
|
|
59
|
+
# Docusaurus build cache
|
|
60
|
+
.docusaurus/
|
|
61
|
+
|
|
62
|
+
# Claude Code runtime state
|
|
63
|
+
.claude/scheduled_tasks.lock
|
|
64
|
+
.claude/worktrees/
|
|
65
|
+
|
|
66
|
+
# Playwright test runtime output
|
|
67
|
+
test-results/
|
|
68
|
+
packages/web/test-results/
|
|
69
|
+
packages/web/playwright-report/
|
|
70
|
+
|
|
71
|
+
# Rendered by init-prod.sh from one of the nginx/*.conf.template files at first
|
|
72
|
+
# run (#3189). A generated artifact, never committed.
|
|
73
|
+
nginx/active.conf.template
|
|
74
|
+
|
|
75
|
+
# Local dev attachment + media blobs (Closes #817)
|
|
76
|
+
packages/api/attachments/
|
|
77
|
+
packages/api/media/
|
|
78
|
+
# Workspace logo blobs (#969) — local-disk storage root; prod uses object storage
|
|
79
|
+
packages/api/branding/
|
|
80
|
+
|
|
81
|
+
# Workspace export test/runtime artifacts (written by export tests; never committed)
|
|
82
|
+
packages/api/workspace-exports/
|
|
83
|
+
# Project export bundle test/runtime artifacts (ADR-0219; never committed)
|
|
84
|
+
packages/api/project-exports/
|
|
85
|
+
# Program export bundle test/runtime artifacts (ADR-0219, #1958; never committed)
|
|
86
|
+
packages/api/program-exports/
|
|
87
|
+
# Program seed import payload test/runtime artifacts (ADR-0726, #2574; never committed)
|
|
88
|
+
packages/api/seed-imports/
|
|
89
|
+
|
|
90
|
+
# Per-worktree harness files — auto-generated per worktree/machine by scripts/wt
|
|
91
|
+
# (COMPOSE_PROJECT_NAME, isolated TRUEPPM_TEST_DB, owner marker, number reservation).
|
|
92
|
+
# Regenerated on every `wt new`; never committed. Tracking them leaks machine-specific
|
|
93
|
+
# data, collapses per-worktree test-DB isolation, and makes `wt prune` skip the
|
|
94
|
+
# worktree as "has local work". See #1690.
|
|
95
|
+
.envrc
|
|
96
|
+
.wt-owner
|
|
97
|
+
.wt-reservation
|
|
98
|
+
|
|
99
|
+
# The operator's real secrets. init-prod.sh WRITES this file at the repo root —
|
|
100
|
+
# SECRET_KEY (which is also the JWT signing key), DB_PASSWORD, REDIS_PASSWORD —
|
|
101
|
+
# and nothing else stopped `git add -A` from committing it. .env.example is the
|
|
102
|
+
# tracked template; .env never is (#3183).
|
|
103
|
+
.env
|
|
104
|
+
.env.*
|
|
105
|
+
!.env.example
|
|
106
|
+
|
|
107
|
+
# SonarCloud / sonar-scanner scratch output
|
|
108
|
+
.scannerwork/
|
|
109
|
+
.sonar/
|
|
110
|
+
|
|
111
|
+
# Schemathesis API-fuzz crash cache — one JSON record per crash fingerprint,
|
|
112
|
+
# written by the `fuzz` extra (packages/api/pyproject.toml) on every local run.
|
|
113
|
+
# Generated, machine-local, and large (289 files in one observed run); each
|
|
114
|
+
# record embeds the request headers and curl repro for its target. Never
|
|
115
|
+
# committed. See #2794.
|
|
116
|
+
.schemathesis/
|
|
117
|
+
|
|
118
|
+
# Captured docs-build output (#2797). website:build / pages redirect `npm run
|
|
119
|
+
# build` here so the exit code stays honest (a `| tee` would report tee's
|
|
120
|
+
# status), then check-mermaid-rendered.sh scans it for the [ERROR] lines Astro
|
|
121
|
+
# logs while still exiting 0. CI-local scratch; never committed.
|
|
122
|
+
website-build.log
|
|
123
|
+
|
|
124
|
+
# k6 perf/load metrics blob (#2816). `packages/api/perf/load.js` writes it to the
|
|
125
|
+
# working directory on every run — a CI artifact there, repo-root scratch when the
|
|
126
|
+
# harness is run locally per packages/api/perf/README.md. Machine-local and
|
|
127
|
+
# meaningless off the run that produced it; never committed.
|
|
128
|
+
perf-summary.json
|
|
129
|
+
|
|
130
|
+
# TLS material generated by init-prod.sh (#2829). `TLS_MODE=selfsigned` mints a
|
|
131
|
+
# lineage into certbot/conf/live/$DOMAIN/, and letsencrypt writes the real one to
|
|
132
|
+
# the same place — so this directory holds a PRIVATE KEY on any host that has run
|
|
133
|
+
# the documented production entrypoint, including a developer trying the prod
|
|
134
|
+
# compose drill locally. The drill removes it on teardown; this is the guard for
|
|
135
|
+
# the run that fails before teardown.
|
|
136
|
+
certbot/
|
|
137
|
+
|
|
138
|
+
# Local audit reports (docs/audit/). Generated by /pre-release, red-team, and
|
|
139
|
+
# state-of-repo runs; kept on the machine that produced them and never committed.
|
|
140
|
+
#
|
|
141
|
+
# This repo is PUBLIC. These reports enumerate unfixed defects with file:line
|
|
142
|
+
# detail — red-team-2026-08-06.md alone carries two CRITICAL and three HIGH
|
|
143
|
+
# findings, and C1 (no working way to revoke a stolen refresh token) is still
|
|
144
|
+
# live on main as of 2026-08-21. Committing them here publishes a working
|
|
145
|
+
# exploit description ahead of the fix. File the findings as issues instead —
|
|
146
|
+
# a tracker entry is the disclosure channel, a checked-in audit report is not.
|
|
147
|
+
docs/audit/
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Read-only TruePPM MCP server (ADR-0186).
|
|
2
|
+
#
|
|
3
|
+
# A pure HTTP client of the TruePPM REST API — no Django, no database driver, no
|
|
4
|
+
# system libraries beyond the Python runtime. stdio is the primary transport (an
|
|
5
|
+
# AI client spawns the container and speaks MCP over the pipe); pass
|
|
6
|
+
# `--transport http` to serve the network transport for web assistants.
|
|
7
|
+
#
|
|
8
|
+
# Build context is this package directory:
|
|
9
|
+
# docker build -t trueppm-mcp packages/mcp/
|
|
10
|
+
# Run (stdio):
|
|
11
|
+
# docker run --rm -i -e TRUEPPM_API_URL=... -e TRUEPPM_API_TOKEN=... trueppm-mcp
|
|
12
|
+
# Run (HTTP, port 8000):
|
|
13
|
+
# docker run --rm -p 8000:8000 -e TRUEPPM_API_URL=... -e TRUEPPM_API_TOKEN=... \
|
|
14
|
+
# trueppm-mcp --transport http --host 0.0.0.0 --port 8000
|
|
15
|
+
# WARNING: the HTTP/SSE transport has no client-side auth — anyone who can reach
|
|
16
|
+
# the published port acts as the token owner. Only publish it behind an
|
|
17
|
+
# authenticated, TLS-terminating ingress; otherwise keep it loopback-only. See
|
|
18
|
+
# administration/mcp-server.md ("Security posture").
|
|
19
|
+
|
|
20
|
+
# ---------------------------------------------------------------------------
|
|
21
|
+
# Stage 1: builder — install the package into an isolated virtualenv
|
|
22
|
+
# ---------------------------------------------------------------------------
|
|
23
|
+
FROM python:3.11-slim AS builder
|
|
24
|
+
|
|
25
|
+
ENV VIRTUAL_ENV=/venv
|
|
26
|
+
RUN python -m venv "$VIRTUAL_ENV"
|
|
27
|
+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
28
|
+
|
|
29
|
+
# Patch the venv-seeded build tooling forward before installing so the published
|
|
30
|
+
# image scans clean (mirrors the api image hardening, #1388): 3.11's ensurepip
|
|
31
|
+
# seeds an old `wheel` that trips Trivy on CVE-2026-24049.
|
|
32
|
+
# --only-binary :all: keeps this a wheel-only install so no sdist setup script
|
|
33
|
+
# runs during the build (wheel ships a manylinux wheel, so the flag is safe here
|
|
34
|
+
# — unlike the local source install of /build/mcp below).
|
|
35
|
+
RUN pip install --only-binary :all: --no-cache-dir --upgrade "wheel>=0.46.2"
|
|
36
|
+
|
|
37
|
+
COPY . /build/mcp
|
|
38
|
+
RUN pip install --no-cache-dir /build/mcp
|
|
39
|
+
|
|
40
|
+
# ---------------------------------------------------------------------------
|
|
41
|
+
# Stage 2: runtime — lean image with only the venv
|
|
42
|
+
# ---------------------------------------------------------------------------
|
|
43
|
+
FROM python:3.11-slim AS runtime
|
|
44
|
+
|
|
45
|
+
COPY --from=builder /venv /venv
|
|
46
|
+
|
|
47
|
+
# Drop the Python build tools (pip/setuptools/wheel) from both the base image's
|
|
48
|
+
# system Python and the app venv: the server runs entirely from the venv console
|
|
49
|
+
# script and never invokes them at runtime, but Trivy scans them and fails the
|
|
50
|
+
# release on their fixable CVEs (mirrors the api image, #1388).
|
|
51
|
+
RUN python -m pip uninstall -y wheel setuptools pip \
|
|
52
|
+
&& /venv/bin/python -m pip uninstall -y wheel setuptools pip
|
|
53
|
+
|
|
54
|
+
# Non-root runtime user.
|
|
55
|
+
RUN useradd --uid 1000 --no-create-home --shell /sbin/nologin trueppm
|
|
56
|
+
|
|
57
|
+
ENV PATH="/venv/bin:$PATH"
|
|
58
|
+
WORKDIR /app
|
|
59
|
+
USER trueppm
|
|
60
|
+
|
|
61
|
+
# stdio by default; override CMD args for http/sse, e.g.
|
|
62
|
+
# docker run ... trueppm-mcp --transport http --host 0.0.0.0
|
|
63
|
+
ENTRYPOINT ["trueppm-mcp"]
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: trueppm-mcp
|
|
3
|
+
Version: 0.4.0b1
|
|
4
|
+
Summary: Read-only Model Context Protocol (MCP) server for self-hosted TruePPM — query the live schedule, board, risks, and My Work from any MCP client
|
|
5
|
+
Project-URL: Homepage, https://trueppm.com
|
|
6
|
+
Project-URL: Documentation, https://docs.trueppm.com/administration/mcp-server
|
|
7
|
+
Project-URL: Repository, https://gitlab.com/trueppm/trueppm
|
|
8
|
+
Project-URL: Issues, https://gitlab.com/trueppm/trueppm/-/issues
|
|
9
|
+
Author: Kelly Hair
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai,fastmcp,llm-tools,mcp,model-context-protocol,project-management,trueppm
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Office/Business :: Scheduling
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.11
|
|
26
|
+
Requires-Dist: cryptography<51,>=50.0.0
|
|
27
|
+
Requires-Dist: httpx<1,>=0.27
|
|
28
|
+
Requires-Dist: mcp[cli]<2,>=1.2
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: mypy<2.0,>=1.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest-asyncio<2.0,>=0.23; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest-cov<8.0,>=4.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest<10.0,>=8.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: ruff<1.0,>=0.8; extra == 'dev'
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# trueppm-mcp
|
|
38
|
+
|
|
39
|
+
[](https://pypi.org/project/trueppm-mcp/)
|
|
40
|
+
[](https://pypi.org/project/trueppm-mcp/)
|
|
41
|
+
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
42
|
+
|
|
43
|
+
**A read-only [Model Context Protocol](https://modelcontextprotocol.io) server for self-hosted [TruePPM](https://trueppm.com).**
|
|
44
|
+
|
|
45
|
+
Point any MCP client — Claude Desktop and the like — at your self-hosted TruePPM
|
|
46
|
+
instance and ask real questions of the live schedule: critical path, sprint
|
|
47
|
+
status, the risk register, My Work. Every answer is computed server-side by the
|
|
48
|
+
same engine the web UI uses — never an LLM guess, never leaving your box.
|
|
49
|
+
|
|
50
|
+
**Why reach for this instead of just asking a model?** A model has no access to
|
|
51
|
+
your schedule and no CPM/Monte Carlo engine to run — asked "what happens if we
|
|
52
|
+
slip this task three days," it can only guess in prose. This server lets the
|
|
53
|
+
same question hit your actual engine: `whatif` reruns the real Monte Carlo
|
|
54
|
+
simulation in memory and returns the percentile shift, `get_schedule_derivation`
|
|
55
|
+
names the *actual* dependency that set a date instead of a plausible-sounding
|
|
56
|
+
one. The answer is computed, cited, and reproducible — never invented.
|
|
57
|
+
|
|
58
|
+
**Read-only by design.** This server exposes no write tools; the write surface is
|
|
59
|
+
deliberately held to a later release.
|
|
60
|
+
|
|
61
|
+
## Requirements
|
|
62
|
+
|
|
63
|
+
- Python 3.11+
|
|
64
|
+
- A running, network-reachable **self-hosted TruePPM instance on `0.4.0-beta.1`
|
|
65
|
+
or later** — earlier releases don't expose the endpoints these tools call
|
|
66
|
+
(e.g. the non-mutating what-if endpoint, #993, is a 0.4 addition). There is
|
|
67
|
+
nothing to connect to without one; this package is a protocol adapter, not a
|
|
68
|
+
standalone tool.
|
|
69
|
+
- A **personal access token** minted on that instance with the `mcp:read`
|
|
70
|
+
scope and an expiry (see Quick start below) — the server has no other way
|
|
71
|
+
to authenticate.
|
|
72
|
+
|
|
73
|
+
## How it works
|
|
74
|
+
|
|
75
|
+
`trueppm-mcp` is a thin protocol adapter. It talks to TruePPM **only over HTTP**
|
|
76
|
+
via the public REST API, carrying your API token as a bearer credential. It never
|
|
77
|
+
touches the database or the ORM — your role-based permissions are enforced exactly
|
|
78
|
+
once, at the API layer. The server can see nothing you could not already read in
|
|
79
|
+
the web client with the same token.
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
┌────────────────┐ stdio ┌──────────────┐ HTTPS + Bearer ┌──────────────┐
|
|
83
|
+
│ AI client │◀──────────▶│ trueppm-mcp │◀──────────────────▶│ TruePPM API │
|
|
84
|
+
│ (Claude etc.) │ (MCP) │ (this pkg) │ GET /api/v1/... │ (self-hosted)│
|
|
85
|
+
└────────────────┘ └──────────────┘ └──────────────┘
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Quick start
|
|
89
|
+
|
|
90
|
+
The server is configured entirely from the environment:
|
|
91
|
+
|
|
92
|
+
| Variable | Required | Description |
|
|
93
|
+
|----------|----------|-------------|
|
|
94
|
+
| `TRUEPPM_API_URL` | yes | Base URL of your TruePPM instance, e.g. `https://ppm.example.com` |
|
|
95
|
+
| `TRUEPPM_API_TOKEN` | yes | A **personal access token** (`tppm_<64-hex>`) minted with the **`mcp:read` scope** and an **expiry**, from **Personal Settings → API tokens** |
|
|
96
|
+
|
|
97
|
+
**Mint the right token.** The MCP read surface accepts only a personal (owner-scoped)
|
|
98
|
+
token carrying the `mcp:read` scope — a project- or program-scoped token is rejected
|
|
99
|
+
there so it can never read beyond the single scope it was minted for. Choose the
|
|
100
|
+
`mcp:read` scope and set an expiry (required for `mcp:read`): the token acts as *you*,
|
|
101
|
+
reads only what your role permits, and cannot write or outlive its expiry — so a leaked
|
|
102
|
+
token is read-only and self-limiting.
|
|
103
|
+
|
|
104
|
+
Run it as a local subprocess (the primary, stdio transport):
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pip install trueppm-mcp
|
|
108
|
+
TRUEPPM_API_URL=https://ppm.example.com \
|
|
109
|
+
TRUEPPM_API_TOKEN=tppm_your_token_here \
|
|
110
|
+
trueppm-mcp # stdio (default)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Or expose the HTTP/SSE transport for a web-based assistant:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
trueppm-mcp --transport http --host 127.0.0.1 --port 8000
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
See [`packages/website/src/content/docs/administration/mcp-server.md`](https://docs.trueppm.com/administration/mcp-server/)
|
|
120
|
+
for wiring it into Claude Desktop's `claude_desktop_config.json`.
|
|
121
|
+
|
|
122
|
+
## Example
|
|
123
|
+
|
|
124
|
+
Once connected, ask the client a real question about your schedule in plain
|
|
125
|
+
language:
|
|
126
|
+
|
|
127
|
+
> "If the API redesign task slips three days, do we still hit the March 3
|
|
128
|
+
> launch?"
|
|
129
|
+
|
|
130
|
+
The client calls the `whatif` tool — `GET
|
|
131
|
+
/projects/<id>/monte-carlo/whatif/` — which reruns Monte Carlo in memory with
|
|
132
|
+
the perturbed duration and returns the shifted P50/P80/P95, the delta against
|
|
133
|
+
the current forecast, and whether the task is still on the critical path.
|
|
134
|
+
Nothing is written; the same call can be made as many times as you like.
|
|
135
|
+
|
|
136
|
+
## Dependencies
|
|
137
|
+
|
|
138
|
+
Pulled in automatically by `pip install trueppm-mcp` — nothing to install
|
|
139
|
+
separately:
|
|
140
|
+
|
|
141
|
+
| Package | Why |
|
|
142
|
+
|---|---|
|
|
143
|
+
| [`mcp[cli]`](https://pypi.org/project/mcp/) | The official Model Context Protocol SDK (FastMCP) — server runtime, tool registration, and the stdio/SSE/streamable-HTTP transports. |
|
|
144
|
+
| [`httpx`](https://pypi.org/project/httpx/) | Async HTTP client used for every call to the TruePPM REST API. |
|
|
145
|
+
| [`cryptography`](https://pypi.org/project/cryptography/) | A transitive dependency of `mcp[cli]` (via `pyjwt[crypto]`), pinned directly here only to force a resolver floor past a fixed CVE — not used by this package's own code. |
|
|
146
|
+
|
|
147
|
+
## Status
|
|
148
|
+
|
|
149
|
+
The read-tool surface ships in 0.4: **19 read-only tools** across projects and
|
|
150
|
+
programs, tasks and My Work, schedule and risk (including non-mutating what-if
|
|
151
|
+
and schedule derivation), and sprints — each mapping to one existing REST
|
|
152
|
+
endpoint and returning only what your role permits. The
|
|
153
|
+
`mcp:read` token scope that marks a token read-only at the API layer lands
|
|
154
|
+
alongside; the read surface admits only owner-scoped `mcp:read` tokens, which
|
|
155
|
+
must carry an expiry. Write tools are deliberately held to a later release.
|
|
156
|
+
|
|
157
|
+
## License
|
|
158
|
+
|
|
159
|
+
Apache-2.0. Part of the TruePPM Community edition.
|