@proofofwork-agency/toolpin 0.2.3

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.
Files changed (61) hide show
  1. package/CONTRIBUTING.md +117 -0
  2. package/LICENSE +183 -0
  3. package/README.md +323 -0
  4. package/SECURITY.md +61 -0
  5. package/action.yml +134 -0
  6. package/dist/canonicalJson.js +38 -0
  7. package/dist/capabilities.js +139 -0
  8. package/dist/ci.js +26 -0
  9. package/dist/cli.js +1843 -0
  10. package/dist/clientSupport.js +76 -0
  11. package/dist/codexToml.js +213 -0
  12. package/dist/config.js +337 -0
  13. package/dist/constants.js +3 -0
  14. package/dist/continueYaml.js +76 -0
  15. package/dist/doctor.js +163 -0
  16. package/dist/install.js +191 -0
  17. package/dist/installed.js +405 -0
  18. package/dist/integrity.js +14 -0
  19. package/dist/inventory.js +169 -0
  20. package/dist/packageIntegrity.js +153 -0
  21. package/dist/plan.js +595 -0
  22. package/dist/policy.js +310 -0
  23. package/dist/registry.js +1610 -0
  24. package/dist/runtimeAdvisory.js +80 -0
  25. package/dist/safeFetch.js +157 -0
  26. package/dist/sarif.js +162 -0
  27. package/dist/scan.js +113 -0
  28. package/dist/search.js +44 -0
  29. package/dist/secrets.js +165 -0
  30. package/dist/signing.js +146 -0
  31. package/dist/tester.js +240 -0
  32. package/dist/trust.js +528 -0
  33. package/dist/tui/app.js +1731 -0
  34. package/dist/tui/command.js +50 -0
  35. package/dist/tui/configSnippet.js +11 -0
  36. package/dist/tui/constants.js +37 -0
  37. package/dist/tui/format.js +31 -0
  38. package/dist/tui/installedState.js +23 -0
  39. package/dist/tui/layout.js +65 -0
  40. package/dist/tui/selectors.js +282 -0
  41. package/dist/tui/types.js +1 -0
  42. package/dist/tui/ui/trust.js +77 -0
  43. package/dist/tui/views/installed.js +82 -0
  44. package/dist/tui/views/panels.js +637 -0
  45. package/dist/tui.js +12 -0
  46. package/dist/types.js +1 -0
  47. package/dist/verificationTrust.js +103 -0
  48. package/dist/verify.js +537 -0
  49. package/dist/version.js +1 -0
  50. package/dist/versions.js +127 -0
  51. package/docs/assets/readme/terminal-demo.svg +174 -0
  52. package/docs/assets/readme/tui-browse-overview.jpg +0 -0
  53. package/docs/assets/readme/tui-config-preview.jpg +0 -0
  54. package/docs/assets/readme/tui-help.jpg +0 -0
  55. package/docs/assets/readme/tui-installed-inventory.jpg +0 -0
  56. package/docs/how-to/catch-drift-in-ci.md +189 -0
  57. package/docs/how-to/custom-registries.md +156 -0
  58. package/docs/how-to/toolpin-curated-registry.md +153 -0
  59. package/package.json +76 -0
  60. package/registry/README.md +92 -0
  61. package/registry/v0/servers +115 -0
@@ -0,0 +1,117 @@
1
+ # Contributing
2
+
3
+ Thanks for improving ToolPin. This project is intentionally conservative:
4
+ security-sensitive commands should fail closed, write the minimum config needed,
5
+ and avoid overstating what ToolPin verifies.
6
+
7
+ ## Contributor License Agreement
8
+
9
+ Before your first pull request can be merged, please sign the
10
+ [Individual Contributor License Agreement](CLA.md). You only sign once, and it
11
+ covers all your past and future contributions.
12
+
13
+ The CLA is based on the widely-used Apache Individual CLA. It lets you keep your
14
+ copyright while granting the maintainers the administrative rights needed to
15
+ maintain the project and — if a hosted/commercial offering is ever shipped —
16
+ relicense the project as a whole without fragmenting copyright. If you do not
17
+ agree to it, you are still free to fork ToolPin under the Apache License 2.0.
18
+
19
+ To sign, open a pull request adding one line to
20
+ [`.cla-signatures/CLA_SIGNATORIES.md`](.cla-signatures/CLA_SIGNATORIES.md):
21
+
22
+ ```
23
+ - Jane Doe <jane@example.com>
24
+ ```
25
+
26
+ Use your real name and the primary email address used in your Git commits.
27
+
28
+ ## Development Setup
29
+
30
+ Requirements:
31
+
32
+ - Node.js 22 or newer.
33
+ - npm 10.9.2 or compatible npm 10.
34
+
35
+ ```bash
36
+ npm ci
37
+ npm test
38
+ ```
39
+
40
+ Useful commands:
41
+
42
+ ```bash
43
+ npm run build
44
+ node dist/cli.js help
45
+ node dist/cli.js search github --limit 3 --live
46
+ node dist/cli.js ci --file mcp-lock.json --live
47
+ ```
48
+
49
+ Do not commit `node_modules/`, `dist/`, local cache files under `.toolpin/`, or
50
+ private signing keys. Commit `mcp-lock.json` when the lockfile is the intended
51
+ review artifact.
52
+
53
+ ## Project Conventions
54
+
55
+ - TypeScript ESM, built with `tsc`.
56
+ - Tests use Node's built-in `node:test`.
57
+ - Keep CLI output stable enough for humans and tests; put machine-readable
58
+ behavior behind `--json`.
59
+ - Prefer exact, explicit error messages for security failures.
60
+ - Treat registry metadata and MCP tool descriptions as untrusted input.
61
+ - Keep install, CI, and policy checks fail-closed. A missing integrity field,
62
+ failed signature, rejected policy, or lock drift should stop the operation.
63
+
64
+ ## Pull Requests
65
+
66
+ Before opening a PR:
67
+
68
+ 1. Run `npm test`.
69
+ 2. Update README or docs when command behavior, install paths, lockfile
70
+ semantics, policy behavior, or security claims change.
71
+ 3. Add or update tests for security-sensitive behavior.
72
+ 4. Call out any intentional compatibility break in the PR description.
73
+
74
+ Security-sensitive PRs should state:
75
+
76
+ - Which boundary changed.
77
+ - How the failure mode is handled.
78
+ - Whether `toolpin ci`, `toolpin install`, TUI installs, or generated client
79
+ config are affected.
80
+
81
+ ## Curated Registry Contributions
82
+
83
+ Curated registry PRs should edit JSON directly in both `registry/v0/servers`
84
+ and `website/static/registry/v0/servers`; the files must stay identical. Each
85
+ entry needs install metadata, `_meta["dev.toolpin/curation"]`, and
86
+ `_meta["dev.toolpin/clientSupport"]`.
87
+
88
+ Use client support statuses precisely:
89
+
90
+ - `toolpin-installable`: ToolPin can generate the client MCP config directly.
91
+ - `external-setup`: the client is supported through documented setup outside
92
+ ToolPin, such as plugins, daemons, project initialization, or instruction-file
93
+ writes.
94
+ - `unsupported`: ToolPin must not offer that client as an install target.
95
+
96
+ Run `npm run registry:check` before opening the PR. It validates malformed JSON,
97
+ mirror sync, curation metadata, client support metadata, and enough package or
98
+ remote config for direct ToolPin installs.
99
+
100
+ ## Documentation Standard
101
+
102
+ Be precise about guarantees:
103
+
104
+ - "Verifies" means ToolPin checked exactly what the code checks.
105
+ - Presence checks are not byte-level verification.
106
+ - Advisory scans are not prompt-injection detection.
107
+ - `toolpin ci --expect-digest` is only meaningful when the expected digest
108
+ comes from a trusted source outside the PR being checked.
109
+ - Detached signatures are only as trustworthy as the private key and public
110
+ trust root handling.
111
+
112
+ ## Coordinating With Agents
113
+
114
+ This repository may have multiple agents working in parallel. Read
115
+ `AGENTS.md`, stay inside your assigned scope, and never revert unrelated dirty
116
+ work. If another agent has modified the same file, adapt to the current file
117
+ contents and keep your diff narrow.
package/LICENSE ADDED
@@ -0,0 +1,183 @@
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, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form,
34
+ made available under the License, as indicated by a copyright notice that is
35
+ included in or attached to the work (an example is provided in the Appendix
36
+ below).
37
+
38
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
39
+ is based on (or derived from) the Work and for which the editorial revisions,
40
+ annotations, elaborations, or other modifications represent, as a whole, an
41
+ original work of authorship. For the purposes of this License, Derivative Works
42
+ shall not include works that remain separable from, or merely link (or bind by
43
+ name) to the interfaces of, the Work and Derivative Works thereof.
44
+
45
+ "Contribution" shall mean any work of authorship, including the original version
46
+ of the Work and any modifications or additions to that Work or Derivative Works
47
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work
48
+ by the copyright owner or by an individual or Legal Entity authorized to submit
49
+ on behalf of the copyright owner. For the purposes of this definition,
50
+ "submitted" means any form of electronic, verbal, or written communication sent
51
+ to the Licensor or its representatives, including but not limited to
52
+ communication on electronic mailing lists, source code control systems, and
53
+ issue tracking systems that are managed by, or on behalf of, the Licensor for
54
+ the purpose of discussing and improving the Work, but excluding communication
55
+ that is conspicuously marked or otherwise designated in writing by the copyright
56
+ owner as "Not a Contribution."
57
+
58
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
59
+ of whom a Contribution has been received by Licensor and subsequently
60
+ incorporated within the Work.
61
+
62
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
63
+ License, each Contributor hereby grants to You a perpetual, worldwide,
64
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
65
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
66
+ sublicense, and distribute the Work and such Derivative Works in Source or
67
+ Object form.
68
+
69
+ 3. Grant of Patent License. Subject to the terms and conditions of this License,
70
+ each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
71
+ no-charge, royalty-free, irrevocable (except as stated in this section) patent
72
+ license to make, have made, use, offer to sell, sell, import, and otherwise
73
+ transfer the Work, where such license applies only to those patent claims
74
+ licensable by such Contributor that are necessarily infringed by their
75
+ Contribution(s) alone or by combination of their Contribution(s) with the Work
76
+ to which such Contribution(s) was submitted. If You institute patent litigation
77
+ against any entity (including a cross-claim or counterclaim in a lawsuit)
78
+ alleging that the Work or a Contribution incorporated within the Work
79
+ constitutes direct or contributory patent infringement, then any patent licenses
80
+ granted to You under this License for that Work shall terminate as of the date
81
+ such litigation is filed.
82
+
83
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
84
+ Derivative Works thereof in any medium, with or without modifications, and in
85
+ Source or Object form, provided that You meet the following conditions:
86
+
87
+ (a) You must give any other recipients of the Work or Derivative Works a copy of
88
+ this License; and
89
+
90
+ (b) You must cause any modified files to carry prominent notices stating that
91
+ You changed the files; and
92
+
93
+ (c) You must retain, in the Source form of any Derivative Works that You
94
+ distribute, all copyright, patent, trademark, and attribution notices from the
95
+ Source form of the Work, excluding those notices that do not pertain to any part
96
+ of the Derivative Works; and
97
+
98
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
99
+ any Derivative Works that You distribute must include a readable copy of the
100
+ attribution notices contained within such NOTICE file, excluding those notices
101
+ that do not pertain to any part of the Derivative Works, in at least one of the
102
+ following places: within a NOTICE text file distributed as part of the
103
+ Derivative Works; within the Source form or documentation, if provided along
104
+ with the Derivative Works; or within a display generated by the Derivative
105
+ Works, if and wherever such third-party notices normally appear. The contents of
106
+ the NOTICE file are for informational purposes only and do not modify the
107
+ License. You may add Your own attribution notices within Derivative Works that
108
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
109
+ provided that such additional attribution notices cannot be construed as
110
+ modifying the License.
111
+
112
+ You may add Your own copyright statement to Your modifications and may provide
113
+ additional or different license terms and conditions for use, reproduction, or
114
+ distribution of Your modifications, or for any such Derivative Works as a whole,
115
+ provided Your use, reproduction, and distribution of the Work otherwise complies
116
+ with the conditions stated in this License.
117
+
118
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
119
+ Contribution intentionally submitted for inclusion in the Work by You to the
120
+ Licensor shall be under the terms and conditions of this License, without any
121
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
122
+ supersede or modify the terms of any separate license agreement you may have
123
+ executed with Licensor regarding such Contributions.
124
+
125
+ 6. Trademarks. This License does not grant permission to use the trade names,
126
+ trademarks, service marks, or product names of the Licensor, except as required
127
+ for reasonable and customary use in describing the origin of the Work and
128
+ reproducing the content of the NOTICE file.
129
+
130
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
131
+ writing, Licensor provides the Work (and each Contributor provides its
132
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
133
+ KIND, either express or implied, including, without limitation, any warranties or
134
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
135
+ PARTICULAR PURPOSE. You are solely responsible for determining the
136
+ appropriateness of using or redistributing the Work and assume any risks
137
+ associated with Your exercise of permissions under this License.
138
+
139
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
140
+ tort (including negligence), contract, or otherwise, unless required by
141
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
142
+ writing, shall any Contributor be liable to You for damages, including any
143
+ direct, indirect, special, incidental, or consequential damages of any character
144
+ arising as a result of this License or out of the use or inability to use the
145
+ Work (including but not limited to damages for loss of goodwill, work stoppage,
146
+ computer failure or malfunction, or any and all other commercial damages or
147
+ losses), even if such Contributor has been advised of the possibility of such
148
+ damages.
149
+
150
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
151
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
152
+ acceptance of support, warranty, indemnity, or other liability obligations
153
+ and/or rights consistent with this License. However, in accepting such
154
+ obligations, You may act only on Your own behalf and on Your sole
155
+ responsibility, not on behalf of any other Contributor, and only if You agree to
156
+ indemnify, defend, and hold each Contributor harmless for any liability incurred
157
+ by, or claims asserted against, such Contributor by reason of your accepting any
158
+ such warranty or additional liability.
159
+
160
+ END OF TERMS AND CONDITIONS
161
+
162
+ APPENDIX: How to apply the Apache License to your work.
163
+
164
+ To apply the Apache License to your work, attach the following boilerplate
165
+ notice, with the fields enclosed by brackets "[]" replaced with your own
166
+ identifying information. (Don't include the brackets!) The text should be
167
+ enclosed in the appropriate comment syntax for the file format. We also
168
+ recommend that a file or class name and description of purpose be included on
169
+ the same "printed page" as the copyright notice for easier identification
170
+ within third-party archives.
171
+
172
+ Copyright [yyyy] [name of copyright owner]
173
+
174
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
175
+ this file except in compliance with the License. You may obtain a copy of the
176
+ License at
177
+
178
+ http://www.apache.org/licenses/LICENSE-2.0
179
+
180
+ Unless required by applicable law or agreed to in writing, software distributed
181
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
182
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
183
+ specific language governing permissions and limitations under the License.
package/README.md ADDED
@@ -0,0 +1,323 @@
1
+ # ToolPin
2
+
3
+ [![CI](https://github.com/proofofwork-agency/toolpin/actions/workflows/ci.yml/badge.svg)](https://github.com/proofofwork-agency/toolpin/actions/workflows/ci.yml)
4
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
5
+ [![npm publish pending](https://img.shields.io/badge/npm-publish%20pending-orange)](https://www.npmjs.com/package/@proofofwork-agency/toolpin)
6
+ [![Status: pre-1.0 beta](https://img.shields.io/badge/status-pre--1.0%20beta-yellow)](https://github.com/proofofwork-agency/toolpin/releases)
7
+
8
+ ToolPin is a review gate for MCP server installs. It helps teams inspect what
9
+ an MCP server will run, generate client config, commit an enforcing
10
+ `mcp-lock.json`, and fail CI when the reviewed install drifts.
11
+
12
+ Use `toolpin` for explicit commands or the shorter `tpn` alias for daily work.
13
+
14
+ Public documentation: <https://proofofwork-agency.github.io/toolpin/>
15
+
16
+ ToolPin is pre-1.0 beta software, Apache-2.0 licensed, and requires Node.js 22
17
+ or newer.
18
+
19
+ ![Animated terminal demo showing ToolPin search, plan, install, audit, and CI drift-check commands.](docs/assets/readme/terminal-demo.svg)
20
+
21
+ ## Contents
22
+
23
+ - [Highlights](#highlights)
24
+ - [Screenshots](#screenshots)
25
+ - [Why ToolPin](#why-toolpin)
26
+ - [Getting Started](#getting-started)
27
+ - [Usage](#usage)
28
+ - [GitHub Actions](#github-actions)
29
+ - [Safety Model](#safety-model)
30
+ - [What Exists Now](#what-exists-now)
31
+ - [Roadmap](#roadmap)
32
+ - [Contributing](#contributing)
33
+ - [License](#license)
34
+ - [Resources](#resources)
35
+
36
+ ## Highlights
37
+
38
+ - **Review before install:** inspect registry metadata, selected target, trust
39
+ score, evidence tier, required secrets, and generated config before writing.
40
+ - **One lockfile across clients:** write `mcp-lock.json` entries for Claude,
41
+ Cursor, VS Code, Codex, OpenCode, Continue, Gemini CLI, and more.
42
+ - **CI drift checks:** reject changes in registry metadata, selected target,
43
+ config output, capability manifest, policy, signature, or evidence state.
44
+ - **Registry-aware discovery:** ingest Official MCP Registry, Docker MCP
45
+ Catalog, the ToolPin curated registry, and configured custom registries.
46
+ - **Local policy gate:** enforce minimum trust tier/score, source and client
47
+ allow/deny rules, remote endpoint rules, required-secret rules, and pinning
48
+ requirements.
49
+ - **Terminal UI:** browse, inspect, install, update, adopt, remove, and test MCP
50
+ servers from an Ink-based TUI.
51
+
52
+ ## Screenshots
53
+
54
+ ToolPin gives MCP installs the same review loop teams already expect for code:
55
+ inspect the server, verify the evidence, preview the exact client config, then
56
+ write a lockfile that CI can enforce.
57
+
58
+ ![ToolPin TUI browse overview with ContextRelay selected, verified evidence, trust scores, and install actions.](docs/assets/readme/tui-browse-overview.jpg)
59
+
60
+ The TUI is built for repeated operations: source-aware browsing, registry/cache
61
+ state, trust scoring, version selection, installed inventory, config preview,
62
+ and one-key install/adopt/update/delete flows.
63
+
64
+ | Config preview | Installed inventory |
65
+ |---|---|
66
+ | ![ToolPin TUI config preview showing the Claude project MCP JSON that will be written for a streamable HTTP server.](docs/assets/readme/tui-config-preview.jpg) | ![ToolPin TUI installed inventory showing locked and unlocked Codex MCP servers.](docs/assets/readme/tui-installed-inventory.jpg) |
67
+
68
+ ![ToolPin TUI help screen showing keyboard shortcuts, scoring explanations, locking behavior, sources, and installed actions.](docs/assets/readme/tui-help.jpg)
69
+
70
+ ## Why ToolPin
71
+
72
+ Adding an MCP server is not like installing an editor theme. It can give an
73
+ agent new tools, local process access, network access, and credentials. Today
74
+ that decision is often a copied JSON snippet with no reviewed artifact and no
75
+ CI check that says "this is still the server and config we approved."
76
+
77
+ ToolPin turns that into a normal engineering control:
78
+
79
+ 1. Inspect the server and install plan.
80
+ 2. Generate the right config for the MCP client.
81
+ 3. Commit `mcp-lock.json` as the reviewed record.
82
+ 4. Run `toolpin ci` so drift is caught before it reaches users.
83
+
84
+ ToolPin is not a hosted gateway, runtime sandbox, secret vault, or broad MCP
85
+ marketplace. It sits between registries and clients as a local, repo-owned
86
+ reproducibility layer.
87
+
88
+ ## Getting Started
89
+
90
+ ### Prerequisites
91
+
92
+ - Node.js 22 or newer.
93
+ - npm.
94
+ - Git.
95
+ - One supported MCP client, such as Claude, Cursor, VS Code, Codex, OpenCode,
96
+ Continue, Gemini CLI, Windsurf, Cline, Roo Code, Zed, or a generic sidecar.
97
+
98
+ ### Install From npm
99
+
100
+ ```bash
101
+ npm install -g @proofofwork-agency/toolpin
102
+ toolpin --version
103
+ tpn -v
104
+ tpn upgrade --dry-run
105
+ ```
106
+
107
+ `toolpin` and `tpn` are aliases for the same CLI. `toolpin upgrade` and
108
+ `tpn upgrade` update the globally installed package; pass `--dry-run` to preview
109
+ the package-manager command.
110
+
111
+ ### Develop From Source
112
+
113
+ Use the source checkout when changing ToolPin itself:
114
+
115
+ ```bash
116
+ git clone https://github.com/proofofwork-agency/toolpin.git
117
+ cd toolpin
118
+ npm ci
119
+ npm test
120
+ ```
121
+
122
+ Build the CLI:
123
+
124
+ ```bash
125
+ npm run dev -- --help
126
+ ```
127
+
128
+ ## Usage
129
+
130
+ ### Search Registries
131
+
132
+ ```bash
133
+ toolpin ingest --source all --limit 500 --pages 25
134
+ toolpin search github --source all --limit 5
135
+ ```
136
+
137
+ ### Review an Install Plan
138
+
139
+ ```bash
140
+ toolpin plan io.github.github/github-mcp-server \
141
+ --client claude \
142
+ --scope project \
143
+ --live
144
+ ```
145
+
146
+ ### Install and Lock
147
+
148
+ ```bash
149
+ toolpin install io.github.github/github-mcp-server \
150
+ --client claude \
151
+ --scope project \
152
+ --live \
153
+ --verify \
154
+ --update-lock
155
+ ```
156
+
157
+ The install writes client config and `mcp-lock.json`. Commit the lockfile so
158
+ teammates and CI can reject drift.
159
+
160
+ ### Check Drift
161
+
162
+ ```bash
163
+ toolpin doctor --scope project
164
+ toolpin ci --file mcp-lock.json --live --verify
165
+ ```
166
+
167
+ ### Use the TUI
168
+
169
+ ```bash
170
+ toolpin tui
171
+ tpn tui
172
+ npm run tui
173
+ ```
174
+
175
+ Useful keys:
176
+
177
+ | Key | Action |
178
+ |---|---|
179
+ | `/` | Search |
180
+ | `tab` or `1-6` | Switch panels |
181
+ | `enter` | Open selected install plan |
182
+ | `i` | Install wizard |
183
+ | `r` or `: ingest` | Persistently refresh registry cache |
184
+ | `l` | Toggle live/cache view for the session |
185
+ | `m` or `+` | Show more Browse results |
186
+ | `a` | Cycle Browse sort: source-first, alpha A-Z, alpha Z-A, source-last, relevance |
187
+ | `g` | Cycle the exact source filter (`all`, then enabled sources such as `toolpin`, `official`, `docker`) |
188
+ | `S` | Show sources |
189
+ | `I` | Show installed inventory |
190
+ | `q` | Quit |
191
+
192
+ See the hosted [CLI reference](https://proofofwork-agency.github.io/toolpin/docs/reference/cli)
193
+ for the full command list.
194
+
195
+ ## GitHub Actions
196
+
197
+ Run ToolPin against a committed MCP lockfile:
198
+
199
+ ```yaml
200
+ name: ToolPin
201
+
202
+ on:
203
+ pull_request:
204
+ push:
205
+ branches: [main]
206
+
207
+ jobs:
208
+ toolpin:
209
+ runs-on: ubuntu-latest
210
+ steps:
211
+ - uses: actions/checkout@v4
212
+ - uses: proofofwork-agency/toolpin@v0.2.3
213
+ with:
214
+ live: "true"
215
+ verify: "true"
216
+ file: mcp-lock.json
217
+ ```
218
+
219
+ The checked-in composite Action builds ToolPin from the action source by
220
+ default, then runs `toolpin ci`. After npm publish, set `toolpin-version` to an
221
+ npm version specifier if you want the Action to install
222
+ `@proofofwork-agency/toolpin` from npm instead.
223
+
224
+ Recommended CI posture for reviewed lockfiles is `toolpin ci --live --verify`
225
+ for capability drift. Use `--skip-live-verification` only as an explicit downgrade
226
+ when live `tools/list` hashing is unavailable.
227
+
228
+ ## Safety Model
229
+
230
+ ToolPin is intentionally conservative:
231
+
232
+ - It fails closed when a client config path is not verified.
233
+ - It keeps structured output on stdout and progress/errors on stderr.
234
+ - It does not print raw secret values during secret audits.
235
+ - It treats score as triage, not proof.
236
+ - It separates evidence tier from metadata completeness.
237
+ - It caps trusted-source conditional entries at 69% until ToolPin verifies
238
+ artifact proof, such as npm integrity, OCI digest, or MCPB hash evidence.
239
+ - It rejects lockfile drift unless you deliberately review and update the lock.
240
+
241
+ Verification currently covers install metadata and selected evidence paths:
242
+ npm tarball SRI verification from `registry.npmjs.org`, OCI manifest digest
243
+ resolution, declared attestation metadata, generated capability manifests, and
244
+ optional live `tools/list` hashes. For MCPB artifacts, ToolPin can
245
+ recompute MCPB SHA-256 only for allowlisted HTTPS artifact hosts. See the
246
+ [threat model](https://proofofwork-agency.github.io/toolpin/docs/concepts/threat-model)
247
+ for the exact scope and limits.
248
+
249
+ ## What Exists Now
250
+
251
+ - Official MCP Registry and Docker MCP Catalog ingestion.
252
+ - ToolPin curated registry source of truth in GitHub:
253
+ <https://github.com/proofofwork-agency/toolpin/blob/main/registry/v0/servers>
254
+ with a GitHub Pages static mirror for docs/browsing:
255
+ <https://proofofwork-agency.github.io/toolpin/registry/v0>
256
+ - Custom registry configuration via `.toolpin/registries.json`.
257
+ - Search ranking over name, title, description, package type, transport, and
258
+ repository.
259
+ - Install plans and lockfile v2 writes keyed by server/client.
260
+ - Config export for Claude, Cursor, VS Code, Codex, OpenCode, Windsurf, Cline,
261
+ Continue, Gemini CLI, Zed, Roo Code, and generic sidecar clients.
262
+ - Local policy checks through `.toolpin/policy.json`.
263
+ - Lockfile digest and detached Ed25519 signature verification.
264
+ - Advisory tool-description scans and SARIF output for CI pipelines.
265
+ - Read-only secret hygiene audits for installed client config.
266
+ - Installed inventory, adopt, update, remove, test-installed, and doctor flows.
267
+ - Full-screen terminal UI for browse/install/config workflows.
268
+
269
+ ## Roadmap
270
+
271
+ The immediate release path is public distribution:
272
+
273
+ - Publish the npm package with provenance.
274
+ - Keep the GitHub Action pinned and documented for CI adoption.
275
+ - Continue tightening evidence definitions, policy fields, and trust docs.
276
+
277
+ Longer-term direction:
278
+
279
+ - Broader verified evidence coverage.
280
+ - Better enterprise policy integration.
281
+ - More client-path verification.
282
+ - Safer secret brokering without plaintext client config.
283
+ - Task-first MCP discovery and stronger tool-description review signals.
284
+
285
+ See [docs/ROADMAP.md](docs/ROADMAP.md) for project direction.
286
+
287
+ ## Contributing
288
+
289
+ Contributions are welcome, especially focused fixes with tests. Start with:
290
+
291
+ ```bash
292
+ npm ci
293
+ npm test
294
+ npm run docs:check
295
+ npm run registry:check
296
+ ```
297
+
298
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), and
299
+ [CLA.md](CLA.md) before opening larger changes.
300
+
301
+ ## License
302
+
303
+ ToolPin is distributed under the Apache License 2.0. See [LICENSE](LICENSE).
304
+
305
+ ## Resources
306
+
307
+ - [Hosted documentation](https://proofofwork-agency.github.io/toolpin/)
308
+ - [CLI reference](https://proofofwork-agency.github.io/toolpin/docs/reference/cli)
309
+ - [Threat model](https://proofofwork-agency.github.io/toolpin/docs/concepts/threat-model)
310
+ - [Client config matrix](docs/client-configs.md)
311
+ - [Catch drift in CI](docs/how-to/catch-drift-in-ci.md)
312
+ - [ToolPin vs. the MCP ecosystem](docs/site/concepts/comparison.md)
313
+ - [Security policy](SECURITY.md)
314
+ - [Disclaimer](DISCLAIMER.md)
315
+
316
+ ## Notice
317
+
318
+ > **No warranty. You assume all risk.** ToolPin installs and launches
319
+ > third-party MCP servers, including npm packages, Docker images, and remote
320
+ > services. That code can access files, networks, and credentials through the
321
+ > client that runs it. ToolPin's score, evidence tier, and lockfile checks are
322
+ > review aids, not a guarantee that any server is safe. See
323
+ > [DISCLAIMER.md](DISCLAIMER.md) and [docs/threat-model.md](docs/threat-model.md).
package/SECURITY.md ADDED
@@ -0,0 +1,61 @@
1
+ # Security Policy
2
+
3
+ ToolPin is a trust and install-time governance tool for MCP servers. Please do
4
+ not disclose suspected vulnerabilities in public issues until they have been
5
+ triaged.
6
+
7
+ ## Supported Versions
8
+
9
+ | Version | Supported |
10
+ |---|---|
11
+ | `0.2.x` | Yes (current) |
12
+ | `0.1.x` | Limited |
13
+ | `< 0.1.0` | No |
14
+
15
+ Pre-1.0 releases may change lockfile, policy, and CLI behavior. Security fixes
16
+ will be released on the latest minor line unless a backport is explicitly
17
+ announced.
18
+
19
+ ## Reporting a Vulnerability
20
+
21
+ Use GitHub private vulnerability reporting when it is available for this
22
+ repository. If private reporting is not available, email the maintainer listed
23
+ for the project and include `ToolPin security report` in the subject.
24
+
25
+ Please include:
26
+
27
+ - A concise description of the issue and affected command or file.
28
+ - Reproduction steps, preferably against a minimal `mcp-lock.json` or registry
29
+ fixture.
30
+ - The expected security boundary and the observed bypass.
31
+ - Whether any secrets, signatures, lockfiles, or client configs were exposed.
32
+
33
+ Do not include live secrets, private signing keys, or production client config
34
+ files. Redact values before attaching logs.
35
+
36
+ ## Response Targets
37
+
38
+ - Initial acknowledgement: 5 business days.
39
+ - Triage decision: 10 business days after enough reproduction detail is
40
+ available.
41
+ - Coordinated disclosure target: 30 days for accepted high-impact issues, or a
42
+ mutually agreed timeline when a fix needs upstream coordination.
43
+
44
+ ## Security Scope
45
+
46
+ In scope:
47
+
48
+ - Lockfile integrity or signature verification bypasses.
49
+ - `toolpin ci` false positives that allow drift or tampering to pass.
50
+ - Policy enforcement bypasses in `install`, `ci`, or TUI install flows.
51
+ - Plaintext secret disclosure in logs, reports, or generated config.
52
+ - Registry metadata parsing bugs that lead to unsafe config generation.
53
+
54
+ Out of scope unless they lead to one of the above:
55
+
56
+ - Prompt-injection bypasses of advisory text scans.
57
+ - Vulnerabilities in third-party MCP servers installed through ToolPin.
58
+ - Runtime sandbox escapes after an MCP server is already running.
59
+ - Social engineering, spam, or denial-of-service against public infrastructure.
60
+
61
+ See `docs/threat-model.md` for the current security model and non-goals.