offerguard-mcp-server 0.3.1 → 0.4.2
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 +9 -98
- package/THIRD_PARTY_NOTICES.txt +2079 -0
- package/build-manifest.json +395 -0
- package/dist/http.mjs +47562 -0
- package/dist/stdio.mjs +21647 -0
- package/package.json +14 -17
- package/src/decision-engine.js +336 -0
- package/src/mcp-server.js +115 -0
- package/src/offerguard-tools.js +6 -476
- package/src/server.js +4 -83
- package/src/stdio.js +1 -1
package/README.md
CHANGED
|
@@ -1,102 +1,13 @@
|
|
|
1
|
-
# OfferGuard MCP
|
|
1
|
+
# OfferGuard MCP 0.4.2
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package bundles the real official MCP SDK and OfferGuard rules for reproducible startup. It does not simulate tools or delegate scoring to a language model. Node.js >=20 is required. No dependency download is required after installing this package.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Run
|
|
6
6
|
|
|
7
|
-
- `
|
|
8
|
-
- `
|
|
9
|
-
-
|
|
10
|
-
-
|
|
7
|
+
- stdio: `npx -y offerguard-mcp-server@0.4.2` after this version is published.
|
|
8
|
+
- HTTP/SSE: `npm start` in the installed package directory. Default bind address: 127.0.0.1:3000.
|
|
9
|
+
- Tools: offerguard_audit, risk_term_matcher, internship_compliance_checker, offer_score_calculator.
|
|
10
|
+
- Input: raw_input; the original AGENT_USER_INPUT name remains supported. Both names accept labeled source text or the structured JSON envelope. Conflicting values are rejected.
|
|
11
|
+
- Original source is in src; runtime files are in dist. Build with the matching repository's package-lock.json and scripts/build-hosted-package.js. Third-party licenses are in THIRD_PARTY_NOTICES.txt.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
For XFYun workflow MCP nodes, prefer the single entry tool:
|
|
15
|
-
|
|
16
|
-
```json
|
|
17
|
-
{
|
|
18
|
-
"tool": "offerguard_audit",
|
|
19
|
-
"arguments": {
|
|
20
|
-
"raw_input": "{{开始 / AGENT_USER_INPUT}}"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
The tool returns structured JSON with these key fields:
|
|
26
|
-
|
|
27
|
-
- `mcp_ok`
|
|
28
|
-
- `route`
|
|
29
|
-
- `risk_level`
|
|
30
|
-
- `overall_score`
|
|
31
|
-
- `route_marker`
|
|
32
|
-
- `route_real_marker`
|
|
33
|
-
- `risk_terms`
|
|
34
|
-
- `compliance_red_lines`
|
|
35
|
-
- `compliance_missing_items`
|
|
36
|
-
- `dimensions`
|
|
37
|
-
- `required_followup_questions`
|
|
38
|
-
- `negotiation_cards`
|
|
39
|
-
- `accept_conditions`
|
|
40
|
-
- `mcp_audit_summary`
|
|
41
|
-
|
|
42
|
-
If the workflow brancher needs a text marker, read either:
|
|
43
|
-
|
|
44
|
-
- `ROUTE: reject`
|
|
45
|
-
- `ROUTE_REAL: compare`
|
|
46
|
-
- `ROUTE_REAL: negotiate`
|
|
47
|
-
|
|
48
|
-
## Local Run
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
npm install
|
|
52
|
-
npm test
|
|
53
|
-
npm start
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Streamable HTTP endpoint:
|
|
57
|
-
|
|
58
|
-
```text
|
|
59
|
-
http://127.0.0.1:3000/mcp
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Legacy SSE endpoints:
|
|
63
|
-
|
|
64
|
-
```text
|
|
65
|
-
http://127.0.0.1:3000/sse
|
|
66
|
-
http://127.0.0.1:3000/messages
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Health check:
|
|
70
|
-
|
|
71
|
-
```text
|
|
72
|
-
http://127.0.0.1:3000/health
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## NPM Usage
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
npx -y offerguard-mcp-server@0.3.1
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
For MCP stdio clients:
|
|
82
|
-
|
|
83
|
-
```json
|
|
84
|
-
{
|
|
85
|
-
"mcpServers": {
|
|
86
|
-
"OfferGuard": {
|
|
87
|
-
"command": "npx",
|
|
88
|
-
"args": ["-y", "offerguard-mcp-server@0.3.1"]
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Test Coverage
|
|
95
|
-
|
|
96
|
-
`npm test` verifies:
|
|
97
|
-
|
|
98
|
-
- Streamable HTTP initialization and `tools/list`.
|
|
99
|
-
- stdio initialization and `tools/list`.
|
|
100
|
-
- Calls to all four tools.
|
|
101
|
-
- Low/medium/high-risk demo cases.
|
|
102
|
-
- `offerguard_audit` uses workflow-safe `raw_input`, bound to `Start / AGENT_USER_INPUT` in XFYun.
|
|
13
|
+
A local package build does not prove successful cloud hosting. No current deployment claim is made.
|