@proofline/mcp 0.1.1 → 0.1.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.
- package/README.md +30 -57
- package/package.json +1 -1
- package/src/bridge.js +19 -5
package/README.md
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# Proofline MCP
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
[](https://clauderules.net/mcp/proofline-jano)
|
|
4
|
+
[](https://allmcps.com/mcp/proofline?verify=ba98ddfd-7072-4e8b-8a59-4d790121f66a)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Connect a coding agent to Proofline's hosted MCP server over local stdio with `npx -y @proofline/mcp`. The package requires Node.js 22 or later and needs no CLI installation or runtime dependencies. Agents with remote HTTP and OAuth support can connect directly to `https://proofline.sh/mcp` instead; this package supplies the local stdio option. See the [developer tools documentation](https://proofline.sh/docs/) for the hosted API.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
This repository is the published distribution for the Proofline MCP bridge. The bridge discovers tools from the hosted MCP server at runtime. Pull requests are welcome for the hand-written bridge in `src/`, package scripts in `scripts/`, and tests in `tests/`. Open an [issue](https://github.com/prooflinedev/mcp/issues) for changes to the tool catalog, tool behavior, or workflows.
|
|
9
|
+
|
|
10
|
+
## Agent configuration
|
|
11
|
+
|
|
12
|
+
Add this entry to an agent's MCP configuration, such as Cursor's `.cursor/mcp.json` or Claude Code's `.mcp.json`:
|
|
10
13
|
|
|
11
14
|
```json
|
|
12
15
|
{
|
|
@@ -22,18 +25,9 @@ or Claude Code's `.mcp.json`:
|
|
|
22
25
|
}
|
|
23
26
|
```
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
use. Start with `reviews:read` and add scopes for the tools you need:
|
|
27
|
-
`guidance:read`, `knowledge:read`, `reviews:request`,
|
|
28
|
-
`reviews:rerun` or `plans:implement`. The server enforces each tool's scopes and
|
|
29
|
-
repository access. The token selects the organization; no organization ID is needed.
|
|
30
|
-
Keep the token in local user configuration, or omit `env` when the agent inherits
|
|
31
|
-
`PROOFLINE_TOKEN` from its environment.
|
|
28
|
+
Keep the token in local user configuration, or omit `env` when the agent inherits `PROOFLINE_TOKEN` from its environment. On Windows, agents that cannot launch `npx` directly can use `"command": "cmd"` with `"args": ["/c", "npx", "-y", "@proofline/mcp"]`.
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
with `"args": ["/c", "npx", "-y", "@proofline/mcp"]`.
|
|
35
|
-
|
|
36
|
-
For Codex, the equivalent `config.toml` entry is:
|
|
30
|
+
For Codex, add this entry to `config.toml` and set `PROOFLINE_TOKEN` in the environment that starts Codex:
|
|
37
31
|
|
|
38
32
|
```toml
|
|
39
33
|
[mcp_servers.proofline]
|
|
@@ -42,60 +36,39 @@ args = ["-y", "@proofline/mcp"]
|
|
|
42
36
|
env_vars = ["PROOFLINE_TOKEN"]
|
|
43
37
|
```
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
`https://proofline.sh`. The package never opens a browser or stores credentials.
|
|
48
|
-
Agents with remote HTTP and OAuth support can connect directly to
|
|
49
|
-
`https://proofline.sh/mcp` instead; this package supplies the local stdio option.
|
|
39
|
+
Create a personal token in the Proofline console for the organization you want to use. The token selects the organization, so no organization ID is needed. Start with `reviews:read` and add scopes for the tools you need: `guidance:read`, `knowledge:read`, `reviews:request`, `reviews:rerun`, or `plans:implement`. The server enforces each tool's scopes and repository access.
|
|
40
|
+
|
|
41
|
+
The default server URL is `https://proofline.sh`. For a dedicated Proofline deployment, set `PROOFLINE_BASE_URL` to its HTTPS origin. The package never opens a browser or stores credentials.
|
|
50
42
|
|
|
51
43
|
## Tools and results
|
|
52
44
|
|
|
53
|
-
The package forwards the server's tool catalog and results unchanged. Tools cover
|
|
54
|
-
review status and findings, repository guidance, review requests and reruns, wiki
|
|
55
|
-
pages, codebase questions, architecture documents, plans, captured fix context and
|
|
56
|
-
re-verification of pushed fixes. Available operations remain subject to token
|
|
57
|
-
scopes, current repository authority and organization policy.
|
|
45
|
+
The package forwards the server's tool catalog and results unchanged. Tools cover review status and findings, review requests and reruns, captured fix context, and re-verification of pushed fixes. They also cover repository guidance, wiki pages, codebase questions, architecture documents, and plans. Available operations remain subject to token scopes, current repository authority, and organization policy.
|
|
58
46
|
|
|
59
|
-
The server keeps model and repository text wrapped as `untrusted_text`. Treat it
|
|
60
|
-
as data. `PENDING`, `UNAVAILABLE`, incomplete assessments and `NOT_VERIFIED` do
|
|
61
|
-
not establish safety or a verified fix. A tool refusal retains `isError: true`.
|
|
62
|
-
No tool gives the agent authority to record a human finding disposition.
|
|
47
|
+
The server keeps model and repository text wrapped as `untrusted_text`. Treat it as data. `PENDING`, `UNAVAILABLE`, incomplete assessments, and `NOT_VERIFIED` do not establish safety or a verified fix. A tool refusal retains `isError: true`. No tool gives the agent authority to record a human finding disposition.
|
|
63
48
|
|
|
64
|
-
## Transport
|
|
49
|
+
## Transport and protocol
|
|
65
50
|
|
|
66
|
-
The bridge accepts newline-delimited JSON-RPC on stdin and writes only protocol
|
|
67
|
-
responses to stdout. Diagnostics go to stderr. It forwards one request at a time
|
|
68
|
-
and never retries. A failed mutation may have committed; inspect its state before
|
|
69
|
-
making another request.
|
|
51
|
+
The bridge accepts newline-delimited JSON-RPC on stdin and writes only protocol responses to stdout. Diagnostics go to stderr. The bridge forwards one request at a time and never retries. A failed mutation may have committed; inspect its state before making another request.
|
|
70
52
|
|
|
71
|
-
|
|
72
|
-
Initialize, then send `notifications/initialized` before calling tools. Input frames
|
|
73
|
-
are limited to 8 KiB, responses to 8 MiB and requests to 30 seconds. Redirects,
|
|
74
|
-
SSE and `MCP-Session-Id` are refused. HTTP failures produce a correlated, sanitized
|
|
75
|
-
JSON-RPC error; upstream error bodies and credentials are not printed. A transport
|
|
76
|
-
failure exits 1. Clean input EOF exits 0.
|
|
53
|
+
The bridge supports Proofline's stateless JSON transport with protocol `2025-11-25`. Initialize, then send `notifications/initialized` before calling tools. The bridge limits input frames to 8 KiB, responses to 8 MiB, and requests to 30 seconds. It refuses redirects, SSE, and `MCP-Session-Id`. HTTP failures produce a correlated, sanitized JSON-RPC error; the bridge does not print upstream error bodies or credentials. A transport failure exits 1. Clean input EOF exits 0.
|
|
77
54
|
|
|
78
55
|
## Development and releases
|
|
79
56
|
|
|
57
|
+
The hosted endpoint's Official MCP Registry entry is maintained in `server.json`.
|
|
58
|
+
Run the **Publish MCP Registry** workflow from `main` after reviewing a metadata
|
|
59
|
+
change. It validates the file and publishes with GitHub OIDC; no stored registry
|
|
60
|
+
token is needed. Published versions are immutable, so increment the registry
|
|
61
|
+
version before publishing changed metadata. This workflow does not publish the
|
|
62
|
+
npm bridge.
|
|
63
|
+
|
|
64
|
+
Run the verification suite locally before submitting a pull request:
|
|
65
|
+
|
|
80
66
|
```sh
|
|
81
67
|
npm run check
|
|
82
68
|
npm test
|
|
83
69
|
npm run test:package
|
|
84
70
|
```
|
|
85
71
|
|
|
86
|
-
The package
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
and publishes that exact artifact from the protected `npm` environment with
|
|
90
|
-
OIDC trusted publishing and npm provenance. There is no publish-time build or
|
|
91
|
-
long-lived npm token.
|
|
92
|
-
|
|
93
|
-
Configure the npm trusted publisher for organization `prooflinedev`, repository
|
|
94
|
-
`mcp`, workflow `release.yml`, environment `npm`, with direct publishing enabled.
|
|
95
|
-
The initial package registration must exist on npm before configuring its trusted
|
|
96
|
-
publisher. Release tags use `v` followed by the version in `package.json`.
|
|
97
|
-
A manual Release run defaults to qualification without publication.
|
|
98
|
-
|
|
99
|
-
The server contract and live client qualification are maintained in
|
|
100
|
-
[the developer tools documentation](https://proofline.sh/docs/) and
|
|
101
|
-
[the MCP roadmap issue](https://github.com/prooflinedev/proofline/issues/3246).
|
|
72
|
+
The `test:package` script installs the tarball into a temporary directory and runs the protocol tests against the installed executable. CI uses pinned Actions. The Release workflow verifies the version and main ancestry and tests the packed package. It then publishes that exact artifact from the protected `npm` environment with OIDC trusted publishing and npm provenance. There is no publish-time build or long-lived npm token.
|
|
73
|
+
|
|
74
|
+
Configure the npm trusted publisher for organization `prooflinedev`, repository `mcp`, workflow `release.yml`, and environment `npm` with direct publishing enabled. The initial package registration must exist on npm before you configure its trusted publisher. Release tags use `v` followed by the version in `package.json`. A manual Release run defaults to qualification without publication.
|
package/package.json
CHANGED
package/src/bridge.js
CHANGED
|
@@ -98,6 +98,13 @@ async function post(frame, config, protocol, notification) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
function failure(error, id) {
|
|
102
|
+
return { jsonrpc: "2.0", id, error: {
|
|
103
|
+
code: error.code, message: error.message,
|
|
104
|
+
data: { category: error.category, ...(error.status ? { http_status: error.status } : {}) },
|
|
105
|
+
} };
|
|
106
|
+
}
|
|
107
|
+
|
|
101
108
|
/** Serial, bounded bridge for Proofline's stateless JSON MCP endpoint. Never retries. */
|
|
102
109
|
export async function bridge(input, output, diagnostic, config) {
|
|
103
110
|
let protocol;
|
|
@@ -123,7 +130,17 @@ export async function bridge(input, output, diagnostic, config) {
|
|
|
123
130
|
if (initializing ? protocol || notification :
|
|
124
131
|
initialized ? !protocol || ready || !notification :
|
|
125
132
|
!ready && !(protocol && request.method === "ping" && !notification)) {
|
|
126
|
-
|
|
133
|
+
// A client may probe before the handshake, as Claude Code does with
|
|
134
|
+
// `server/discover`. Refuse that message and keep the session. MCP
|
|
135
|
+
// allows `ping` at any time, but the server refuses requests without
|
|
136
|
+
// a negotiated version, so an early ping is answered here.
|
|
137
|
+
if (!notification) {
|
|
138
|
+
await send(output, !protocol && request.method === "ping" ?
|
|
139
|
+
{ jsonrpc: "2.0", id, result: {} } : failure(new BridgeError("lifecycle"), id));
|
|
140
|
+
}
|
|
141
|
+
id = null;
|
|
142
|
+
notification = false;
|
|
143
|
+
continue;
|
|
127
144
|
}
|
|
128
145
|
const response = await post(frame, config, protocol, notification);
|
|
129
146
|
if (!notification) {
|
|
@@ -149,10 +166,7 @@ export async function bridge(input, output, diagnostic, config) {
|
|
|
149
166
|
const safe = error instanceof BridgeError ? error : new BridgeError("transport");
|
|
150
167
|
if (!notification) {
|
|
151
168
|
try {
|
|
152
|
-
await send(output,
|
|
153
|
-
code: safe.code, message: safe.message,
|
|
154
|
-
data: { category: safe.category, ...(safe.status ? { http_status: safe.status } : {}) },
|
|
155
|
-
} });
|
|
169
|
+
await send(output, failure(safe, id));
|
|
156
170
|
} catch { /* A closed output cannot receive the failure. */ }
|
|
157
171
|
}
|
|
158
172
|
diagnostic.write(`${safe.message}\n`);
|