@agentscore-xyz/mcp-server 2.2.0 → 2.2.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/LICENSE +21 -0
- package/README.md +58 -39
- package/dist/api.js +5 -1
- package/dist/index.js +5 -5
- package/dist/sunset.d.ts +6 -0
- package/dist/sunset.js +13 -0
- package/dist/tools.js +25 -36
- package/package.json +61 -60
- package/smithery.yaml +11 -11
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Janus Compliance Limited
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# @agentscore-xyz/mcp-server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Service end date: 31 December 2026.** AgentScore's scanning service and API close after that date. Version 2.2.2 is the final release. Until the end date every tool result carries a closing note; from 1 January 2027 every tool returns a closing message and checks nothing. The two Policy Gate set-up tools are withdrawn and no longer generate or write a workflow. Do not build a new dependency on this server.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Ask your agent if an npm MCP package is safe to install.** A drop-in MCP server that exposes AgentScore's live security data to Claude, Cursor, ChatGPT, and any MCP-compatible client. No API key, zero config, eight tools.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://agentscores.xyz/report/@agentscore-xyz/mcp-server)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
> Browse the live data: [agentscores.xyz](https://agentscores.xyz) — 1,600+ monitored MCP packages, continuously updated, public correction loop at [/scanner/precision](https://agentscores.xyz/scanner/precision).
|
|
10
|
+
|
|
11
|
+
## Why it exists
|
|
12
|
+
|
|
13
|
+
MCP clients install packages from npm without a security gate. Most users have no way to ask, mid-conversation, "is this package safe?" before they wire it into their agent. This server makes that question askable directly inside the same chat where you discover the package.
|
|
14
|
+
|
|
15
|
+
It is the **machine-readable trust layer** behind agentscores.xyz, packaged as an MCP server so any agent can consume it.
|
|
16
|
+
|
|
17
|
+
## Quick start
|
|
10
18
|
|
|
11
19
|
### Claude Desktop
|
|
12
20
|
|
|
@@ -23,59 +31,64 @@ Add to your `claude_desktop_config.json`:
|
|
|
23
31
|
}
|
|
24
32
|
```
|
|
25
33
|
|
|
26
|
-
### Cursor /
|
|
34
|
+
### Cursor / VS Code / any MCP client
|
|
27
35
|
|
|
28
36
|
```bash
|
|
29
37
|
npx @agentscore-xyz/mcp-server
|
|
30
38
|
```
|
|
31
39
|
|
|
32
|
-
## What
|
|
40
|
+
## What you can ask
|
|
33
41
|
|
|
34
|
-
|
|
42
|
+
The primary use case: trust questions about packages, answered in conversation.
|
|
35
43
|
|
|
36
44
|
> **You:** "Is exa-mcp-server safe to install?"
|
|
37
45
|
>
|
|
38
46
|
> **Claude:** *calls get_verdict* "Verdict: ALLOW. Score 90/100, LOW risk. No provenance attestations (published by personal account). 9 tools exposed including web_search_exa and crawling_exa."
|
|
39
47
|
|
|
40
|
-
> **You:** "
|
|
41
|
-
>
|
|
42
|
-
> **Claude:** *calls check_exposure* "Multiple monitored MCP servers depend on axios, including exa-mcp-server, tavily-mcp, and figma-mcp."
|
|
43
|
-
|
|
44
|
-
> **You:** "Scan @azure-devops/mcp for security issues"
|
|
48
|
+
> **You:** "Scan @azure-devops/mcp for security issues."
|
|
45
49
|
>
|
|
46
50
|
> **Claude:** *calls scan_package* "Score 75/100, MODERATE risk. Found: preinstall script modifying npm registry config. No provenance attestations."
|
|
47
51
|
|
|
48
|
-
> **You:** "
|
|
52
|
+
> **You:** "The axios package was compromised. Which MCP servers depend on it?"
|
|
49
53
|
>
|
|
50
|
-
> **Claude:** *calls
|
|
54
|
+
> **Claude:** *calls check_exposure* "Multiple monitored MCP servers depend on axios, including exa-mcp-server, tavily-mcp, and figma-mcp."
|
|
51
55
|
|
|
52
|
-
> **You:** "
|
|
56
|
+
> **You:** "Is fa-mcp-sdk monitored? What is its history?"
|
|
53
57
|
>
|
|
54
|
-
> **Claude:** *calls
|
|
58
|
+
> **Claude:** *calls monitor_status* "Yes, under continuous monitoring. Latest scan: HIGH risk. Republished 15+ times since the April 25 disclosure with no maintainer engagement on the open issues."
|
|
59
|
+
|
|
60
|
+
The agent picks the right tool. You ask the question the way you would ask a colleague.
|
|
61
|
+
|
|
62
|
+
## CI enforcement (optional, section 2)
|
|
55
63
|
|
|
56
|
-
|
|
64
|
+
If you want the same trust data as a merge-time policy gate rather than an in-conversation question, the same MCP server can scaffold a GitHub Actions workflow for you.
|
|
57
65
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
| `generate_policy_gate_setup` | Generate the exact GitHub Actions workflow and pilot handoff link needed to enforce Policy Gate in CI. |
|
|
64
|
-
| `check_exposure` | Incident response: which monitored MCP servers depend on a given package? |
|
|
65
|
-
| `check_abuse` | Query the KYA abuse database for reported packages or agents |
|
|
66
|
-
| `monitor_status` | Check if a package is under continuous monitoring and get scan history |
|
|
66
|
+
> **You:** "Check this repo for MCP dependencies and set up a policy gate."
|
|
67
|
+
>
|
|
68
|
+
> **Claude:** *calls check_my_repo, then install_policy_gate* "Found 5 MCP packages in your repo. Workflow written to `.github/workflows/agentscore-policy-gate.yml`. Commit, push, and the first PR will provision the gate via GitHub OIDC."
|
|
69
|
+
|
|
70
|
+
Three tools support that flow:
|
|
67
71
|
|
|
68
|
-
|
|
72
|
+
- `check_my_repo` — inspect the current repo's MCP dependencies.
|
|
73
|
+
- `generate_policy_gate_setup` — preview the OIDC-based GitHub Actions workflow.
|
|
74
|
+
- `install_policy_gate` — write `.github/workflows/agentscore-policy-gate.yml` directly into the repo.
|
|
69
75
|
|
|
70
|
-
The
|
|
76
|
+
The gate is the same data, just at a different point in the lifecycle. The primary surface is still the question.
|
|
71
77
|
|
|
72
|
-
|
|
73
|
-
2. Run `generate_policy_gate_setup` to get the exact GitHub Actions workflow.
|
|
74
|
-
3. Start the free pilot to receive a repo-scoped `AGENTSCORE_KEY`.
|
|
78
|
+
## Available tools
|
|
75
79
|
|
|
76
|
-
|
|
80
|
+
| Tool | Question it answers |
|
|
81
|
+
|------|---------------------|
|
|
82
|
+
| `scan_package` | What does the live scan of this package look like, including install scripts, source patterns, capability surface, and findings? |
|
|
83
|
+
| `get_verdict` | Should I allow, warn, or block this package? |
|
|
84
|
+
| `check_exposure` | Which monitored MCP servers depend on a given package? (Incident response.) |
|
|
85
|
+
| `monitor_status` | Is this package under continuous monitoring? What is its scan history? |
|
|
86
|
+
| `check_abuse` | Has this package been reported in the KYA abuse database? |
|
|
87
|
+
| `check_my_repo` | Inspect the current repo for MCP dependencies and summarise verdicts. |
|
|
88
|
+
| `generate_policy_gate_setup` | Preview the OIDC-based GitHub Actions workflow for CI enforcement. |
|
|
89
|
+
| `install_policy_gate` | Write the workflow file directly into `.github/workflows/`. |
|
|
77
90
|
|
|
78
|
-
## Risk
|
|
91
|
+
## Risk levels
|
|
79
92
|
|
|
80
93
|
| Score | Risk | Meaning |
|
|
81
94
|
|-------|------|---------|
|
|
@@ -85,25 +98,31 @@ That turns "is this package safe?" into "this repo now enforces MCP dependency p
|
|
|
85
98
|
| 30-49 | HIGH | Serious issues, not recommended |
|
|
86
99
|
| 0-29 | CRITICAL | Do not use |
|
|
87
100
|
|
|
88
|
-
## What the
|
|
101
|
+
## What the scanner checks
|
|
89
102
|
|
|
90
103
|
- Install scripts (postinstall/preinstall hooks with network calls or code execution)
|
|
91
104
|
- Prompt injection patterns in package metadata
|
|
92
105
|
- Suspicious URLs (sketchy TLDs, ngrok, raw IPs)
|
|
93
|
-
- Source code patterns (command injection, unsafe eval, hardcoded secrets)
|
|
106
|
+
- Source code patterns (command injection, unsafe eval, hardcoded secrets) with context-aware mitigators
|
|
94
107
|
- Publisher provenance (trusted publishing, attestations)
|
|
95
108
|
- Dependency count and metadata completeness
|
|
96
109
|
- MCP tool definitions extracted from published source
|
|
97
110
|
|
|
98
|
-
|
|
111
|
+
The scanner changelog and false-positive mitigator lineage are public at [agentscores.xyz/scanner/precision](https://agentscores.xyz/scanner/precision). Findings get corrected when maintainers raise valid false-positive challenges. The correction history is part of the record, not buried.
|
|
112
|
+
|
|
113
|
+
## Continuous monitoring
|
|
99
114
|
|
|
100
|
-
AgentScore
|
|
115
|
+
AgentScore monitors 1,600+ MCP packages on npm. `check_exposure` and `monitor_status` query this live dataset. When a package like axios gets compromised, you can ask mid-conversation which of your MCP servers are affected.
|
|
101
116
|
|
|
102
117
|
## Links
|
|
103
118
|
|
|
104
|
-
- **
|
|
105
|
-
- **
|
|
119
|
+
- **Live data:** [agentscores.xyz](https://agentscores.xyz)
|
|
120
|
+
- **Per-package reports:** [agentscores.xyz/report/<package>](https://agentscores.xyz/report)
|
|
121
|
+
- **Advisory feed:** [agentscores.xyz/security/advisories](https://agentscores.xyz/security/advisories) (also RSS)
|
|
122
|
+
- **API docs:** [agentscores.xyz/docs](https://agentscores.xyz/docs)
|
|
106
123
|
- **Methodology:** [agentscores.xyz/methodology](https://agentscores.xyz/methodology)
|
|
124
|
+
- **Scanner precision changelog:** [agentscores.xyz/scanner/precision](https://agentscores.xyz/scanner/precision)
|
|
125
|
+
- **Embed a badge:** [agentscores.xyz/badge](https://agentscores.xyz/badge)
|
|
107
126
|
|
|
108
127
|
## Licence
|
|
109
128
|
|
package/dist/api.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const BASE_URL = "https://www.agentscores.xyz";
|
|
2
2
|
const TIMEOUT_MS = 8000;
|
|
3
|
+
const CLIENT_ID = "@agentscore-xyz/mcp-server/2.2.2";
|
|
3
4
|
export class ApiError extends Error {
|
|
4
5
|
status;
|
|
5
6
|
code;
|
|
@@ -22,7 +23,10 @@ export async function fetchApi(path, params = {}) {
|
|
|
22
23
|
try {
|
|
23
24
|
const res = await fetch(url.toString(), {
|
|
24
25
|
signal: controller.signal,
|
|
25
|
-
headers: {
|
|
26
|
+
headers: {
|
|
27
|
+
Accept: "application/json",
|
|
28
|
+
"X-AgentScore-Client": CLIENT_ID,
|
|
29
|
+
},
|
|
26
30
|
redirect: "follow",
|
|
27
31
|
});
|
|
28
32
|
clearTimeout(timer);
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
import { handleTool } from "./tools.js";
|
|
6
6
|
const server = new McpServer({
|
|
7
7
|
name: "agentscore",
|
|
8
|
-
version: "2.2.
|
|
8
|
+
version: "2.2.2",
|
|
9
9
|
});
|
|
10
10
|
// --- Tools ---
|
|
11
11
|
server.tool("scan_package", "Scan an npm package for MCP security issues. Checks install scripts, prompt injection patterns, suspicious URLs, source code patterns, dependency count, metadata completeness, and publisher provenance. Returns score (0-100), risk level, and detailed findings.", {
|
|
@@ -23,14 +23,14 @@ server.tool("check_abuse", "Check if a package or agent has been reported to the
|
|
|
23
23
|
server.tool("monitor_status", "Check if an MCP package is under continuous monitoring and get its scan history. Shows current score, risk level, and recent changes.", {
|
|
24
24
|
npm: z.string().describe("npm package name"),
|
|
25
25
|
}, async (args) => handleTool("monitor_status", args));
|
|
26
|
-
server.tool("check_my_repo", "Inspect the current repo for MCP dependencies
|
|
26
|
+
server.tool("check_my_repo", "Inspect the current repo for MCP dependencies and look up AgentScore verdicts for each package. Use this when a developer wants to understand all MCP packages in a repo instead of scanning one package at a time.", {
|
|
27
27
|
path: z.string().optional().describe("Optional path to the repo root. Defaults to the current working directory."),
|
|
28
28
|
}, async (args) => handleTool("check_my_repo", args));
|
|
29
|
-
server.tool("generate_policy_gate_setup", "
|
|
29
|
+
server.tool("generate_policy_gate_setup", "Withdrawn. AgentScore's scanning service and API close after 31 December 2026, so the Policy Gate is no longer offered for new set-ups. This tool returns that notice and generates nothing.", {
|
|
30
30
|
path: z.string().optional().describe("Optional path to the repo root. Defaults to the current working directory."),
|
|
31
31
|
repo_url: z.string().optional().describe("Optional repository URL override for the pilot handoff link."),
|
|
32
32
|
}, async (args) => handleTool("generate_policy_gate_setup", args));
|
|
33
|
-
server.tool("install_policy_gate", "
|
|
33
|
+
server.tool("install_policy_gate", "Withdrawn. AgentScore's scanning service and API close after 31 December 2026, so the Policy Gate is no longer offered for new set-ups. This tool returns that notice and writes no file.", {
|
|
34
34
|
path: z.string().optional().describe("Optional path to the repo root. Defaults to the current working directory."),
|
|
35
35
|
repo_url: z.string().optional().describe("Optional repository URL override."),
|
|
36
36
|
}, async (args) => handleTool("install_policy_gate", args));
|
|
@@ -38,7 +38,7 @@ server.tool("install_policy_gate", "Write the AgentScore Policy Gate workflow fi
|
|
|
38
38
|
async function main() {
|
|
39
39
|
const transport = new StdioServerTransport();
|
|
40
40
|
await server.connect(transport);
|
|
41
|
-
console.error("AgentScore MCP server v2.2 running on stdio");
|
|
41
|
+
console.error("AgentScore MCP server v2.2.2 running on stdio (the service closes after 31 December 2026)");
|
|
42
42
|
}
|
|
43
43
|
main().catch((err) => {
|
|
44
44
|
console.error("Fatal error:", err);
|
package/dist/sunset.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const SERVICE_END_ISO = "2027-01-01T00:00:00Z";
|
|
2
|
+
export declare const SERVICE_END_LABEL = "31 December 2026";
|
|
3
|
+
export declare const CLOSING_NOTE = "Note: AgentScore's scanning service and API close after 31 December 2026 (UTC). After that date this server returns a closing message in place of results.";
|
|
4
|
+
export declare const ENDED_MESSAGE = "AgentScore's scanning service and API closed on 31 December 2026. This tool no longer returns security verdicts or scan results, and nothing was checked.";
|
|
5
|
+
export declare const GATE_WITHDRAWN = "The AgentScore Policy Gate is no longer offered for new set-ups. AgentScore's scanning service and API close after 31 December 2026, and a gate installed now would stop working on that date. No workflow has been generated or written.";
|
|
6
|
+
export declare function serviceEnded(now?: number): boolean;
|
package/dist/sunset.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// AgentScore's scanning service and API close after 31 December 2026 (the main
|
|
2
|
+
// application's src/lib/sunset.js holds the same date). This is the final
|
|
3
|
+
// release of the server: it tells the user about the closure, stops offering the
|
|
4
|
+
// Policy Gate set-up, and returns a plain closing message once the date has
|
|
5
|
+
// passed, without calling an API that would only answer 410.
|
|
6
|
+
export const SERVICE_END_ISO = "2027-01-01T00:00:00Z";
|
|
7
|
+
export const SERVICE_END_LABEL = "31 December 2026";
|
|
8
|
+
export const CLOSING_NOTE = `Note: AgentScore's scanning service and API close after ${SERVICE_END_LABEL} (UTC). After that date this server returns a closing message in place of results.`;
|
|
9
|
+
export const ENDED_MESSAGE = `AgentScore's scanning service and API closed on ${SERVICE_END_LABEL}. This tool no longer returns security verdicts or scan results, and nothing was checked.`;
|
|
10
|
+
export const GATE_WITHDRAWN = `The AgentScore Policy Gate is no longer offered for new set-ups. AgentScore's scanning service and API close after ${SERVICE_END_LABEL}, and a gate installed now would stop working on that date. No workflow has been generated or written.`;
|
|
11
|
+
export function serviceEnded(now = Date.now()) {
|
|
12
|
+
return now >= Date.parse(SERVICE_END_ISO);
|
|
13
|
+
}
|
package/dist/tools.js
CHANGED
|
@@ -2,6 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fetchApi, ApiError } from "./api.js";
|
|
4
4
|
import { inspectRepoForMcpDependencies, } from "./repo.js";
|
|
5
|
+
import { serviceEnded, CLOSING_NOTE, ENDED_MESSAGE, GATE_WITHDRAWN, } from "./sunset.js";
|
|
5
6
|
const WEBSITE_BASE = "https://www.agentscores.xyz";
|
|
6
7
|
function text(s, isError = false) {
|
|
7
8
|
return { content: [{ type: "text", text: s }], isError };
|
|
@@ -36,7 +37,8 @@ function policyGateHint(options) {
|
|
|
36
37
|
"",
|
|
37
38
|
"Policy Gate:",
|
|
38
39
|
" Run check_my_repo to inspect every MCP dependency used by this repo.",
|
|
39
|
-
" Run generate_policy_gate_setup to
|
|
40
|
+
" Run generate_policy_gate_setup to preview the CI workflow.",
|
|
41
|
+
" Run install_policy_gate to write the workflow file directly into the repo.",
|
|
40
42
|
];
|
|
41
43
|
if (options.repoUrl) {
|
|
42
44
|
lines.push(` Start a free pilot: ${buildIntentUrl("pilot", options.repoUrl)}`);
|
|
@@ -91,7 +93,6 @@ function formatScan(data) {
|
|
|
91
93
|
lines.push(` ${t.name}: ${t.description?.slice(0, 100) || "no description"}`);
|
|
92
94
|
}
|
|
93
95
|
}
|
|
94
|
-
lines.push(policyGateHint({ packageName: data.package }));
|
|
95
96
|
return lines.join("\n");
|
|
96
97
|
}
|
|
97
98
|
function formatVerdict(data) {
|
|
@@ -113,7 +114,6 @@ function formatVerdict(data) {
|
|
|
113
114
|
if (data.tool_count > 0) {
|
|
114
115
|
lines.push("", `Tools exposed: ${data.tool_count}`);
|
|
115
116
|
}
|
|
116
|
-
lines.push(policyGateHint({ packageName: data.package }));
|
|
117
117
|
return lines.join("\n");
|
|
118
118
|
}
|
|
119
119
|
function formatExposure(data) {
|
|
@@ -223,7 +223,6 @@ function formatRepoSummary(repoPath, repoUrl, checkedFiles, results) {
|
|
|
223
223
|
const reasons = item.reasons.length > 0 ? ` | reasons: ${item.reasons.join(", ")}` : "";
|
|
224
224
|
lines.push(` ${item.name}@${version} - ${item.verdict.toUpperCase()} (${score}/100, ${risk}) [source: ${item.source}]${reasons}`);
|
|
225
225
|
}
|
|
226
|
-
lines.push("", "Next step:", " Run generate_policy_gate_setup to get the exact GitHub Actions workflow for this repo.", ` Start a free pilot: ${buildIntentUrl("pilot", repoUrl)}`);
|
|
227
226
|
return lines.join("\n");
|
|
228
227
|
}
|
|
229
228
|
function buildOidcWorkflowYaml(packages) {
|
|
@@ -254,33 +253,8 @@ function buildOidcWorkflowYaml(packages) {
|
|
|
254
253
|
lines.push("");
|
|
255
254
|
return lines.join("\n");
|
|
256
255
|
}
|
|
257
|
-
function buildWorkflowYaml(packages) {
|
|
258
|
-
const lines = [
|
|
259
|
-
"name: AgentScore Policy Gate",
|
|
260
|
-
"",
|
|
261
|
-
"on:",
|
|
262
|
-
" pull_request:",
|
|
263
|
-
" push:",
|
|
264
|
-
" branches: [main]",
|
|
265
|
-
"",
|
|
266
|
-
"jobs:",
|
|
267
|
-
" mcp-policy:",
|
|
268
|
-
" runs-on: ubuntu-latest",
|
|
269
|
-
" steps:",
|
|
270
|
-
" - uses: actions/checkout@v4",
|
|
271
|
-
" - uses: Thezenmonster/mcp-verdict-action@v1",
|
|
272
|
-
" with:",
|
|
273
|
-
" api-key: ${{ secrets.AGENTSCORE_KEY }}",
|
|
274
|
-
' fail-open: "false"',
|
|
275
|
-
];
|
|
276
|
-
if (packages.length > 0) {
|
|
277
|
-
lines.push(` packages: "${packages.join(",")}"`);
|
|
278
|
-
}
|
|
279
|
-
return lines.join("\n");
|
|
280
|
-
}
|
|
281
256
|
function formatPolicyGateSetup(repoPath, repoUrl, dependencies, checkedFiles) {
|
|
282
257
|
const explicitPackages = dependencies.map((dep) => dep.name);
|
|
283
|
-
const pilotUrl = buildIntentUrl("pilot", repoUrl);
|
|
284
258
|
const lines = [
|
|
285
259
|
`Repo path: ${repoPath}`,
|
|
286
260
|
`Repository: ${repoUrl || "not detected"}`,
|
|
@@ -288,21 +262,35 @@ function formatPolicyGateSetup(repoPath, repoUrl, dependencies, checkedFiles) {
|
|
|
288
262
|
`Detected MCP dependencies: ${explicitPackages.length > 0 ? explicitPackages.join(", ") : "none"}`,
|
|
289
263
|
"",
|
|
290
264
|
"Next steps:",
|
|
291
|
-
|
|
292
|
-
"2.
|
|
293
|
-
"3.
|
|
265
|
+
"1. Save this workflow as .github/workflows/agentscore-policy-gate.yml.",
|
|
266
|
+
"2. Commit and push. The first run will authenticate with GitHub OIDC and auto-provision the repo.",
|
|
267
|
+
"3. If you want the MCP server to write the file for you, run install_policy_gate.",
|
|
294
268
|
"",
|
|
295
|
-
|
|
269
|
+
buildOidcWorkflowYaml(explicitPackages),
|
|
296
270
|
];
|
|
297
271
|
if (explicitPackages.length === 0) {
|
|
298
272
|
lines.push("", "Note:", " No MCP packages were detected locally. The Action can still auto-detect root package.json dependencies,", " but if this repo uses MCP packages via config files only, add them explicitly to the packages input.");
|
|
299
273
|
}
|
|
300
274
|
else {
|
|
301
|
-
lines.push("", "Why this workflow uses an explicit package list:", " It keeps CI aligned with the MCP dependencies detected in this repo, even when they come from config files", " and not just the root package.json.");
|
|
275
|
+
lines.push("", "Why this workflow uses OIDC:", " GitHub Actions proves repo identity directly to AgentScore on each run.", " No API key, no secret distribution, and no manual provisioning step are required.", "", "Why this workflow uses an explicit package list:", " It keeps CI aligned with the MCP dependencies detected in this repo, even when they come from config files", " and not just the root package.json.");
|
|
302
276
|
}
|
|
303
277
|
return lines.join("\n");
|
|
304
278
|
}
|
|
279
|
+
// Final release (2.2.2): every tool tells the user the service is closing, the
|
|
280
|
+
// two Policy Gate set-up tools are withdrawn, and once the end date has passed
|
|
281
|
+
// no tool calls the API at all.
|
|
305
282
|
export async function handleTool(name, args) {
|
|
283
|
+
if (serviceEnded())
|
|
284
|
+
return text(ENDED_MESSAGE, true);
|
|
285
|
+
if (name === "generate_policy_gate_setup" || name === "install_policy_gate") {
|
|
286
|
+
return text(GATE_WITHDRAWN, true);
|
|
287
|
+
}
|
|
288
|
+
const result = await runTool(name, args);
|
|
289
|
+
if (result.isError)
|
|
290
|
+
return result;
|
|
291
|
+
return { ...result, content: [...result.content, { type: "text", text: CLOSING_NOTE }] };
|
|
292
|
+
}
|
|
293
|
+
async function runTool(name, args) {
|
|
306
294
|
try {
|
|
307
295
|
switch (name) {
|
|
308
296
|
case "scan_package": {
|
|
@@ -380,9 +368,10 @@ export async function handleTool(name, args) {
|
|
|
380
368
|
" 1. Review the workflow file",
|
|
381
369
|
" 2. Commit and push",
|
|
382
370
|
" 3. The gate runs automatically on every PR and push to main",
|
|
383
|
-
"",
|
|
384
|
-
`If you want a managed pilot with custom thresholds and exceptions: ${pilotUrl}`,
|
|
385
371
|
];
|
|
372
|
+
if (pilotUrl) {
|
|
373
|
+
lines.push("", `If you want a managed pilot with custom thresholds and exceptions: ${pilotUrl}`);
|
|
374
|
+
}
|
|
386
375
|
return text(lines.join("\n"));
|
|
387
376
|
}
|
|
388
377
|
default:
|
package/package.json
CHANGED
|
@@ -1,60 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@agentscore-xyz/mcp-server",
|
|
3
|
-
"version": "2.2.
|
|
4
|
-
"mcpName": "io.github.Thezenmonster/agentscore",
|
|
5
|
-
"description": "MCP security trust layer. Scan packages, inspect repo MCP dependencies, generate Policy Gate setup, check exposure, and query abuse data.",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"bin": {
|
|
8
|
-
"agentscore-mcp": "./dist/index.js"
|
|
9
|
-
},
|
|
10
|
-
"main": "./dist/index.js",
|
|
11
|
-
"scripts": {
|
|
12
|
-
"clean": "node -e \"const fs=require('fs');fs.rmSync('dist',{recursive:true,force:true})\"",
|
|
13
|
-
"build": "npm run clean && tsc",
|
|
14
|
-
"dev": "tsc --watch",
|
|
15
|
-
"start": "node dist/index.js",
|
|
16
|
-
"prepublishOnly": "npm run build"
|
|
17
|
-
},
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
20
|
-
"zod": "^3.22.0"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@types/node": "^20.0.0",
|
|
24
|
-
"typescript": "^5.4.0"
|
|
25
|
-
},
|
|
26
|
-
"keywords": [
|
|
27
|
-
"mcp",
|
|
28
|
-
"mcp-server",
|
|
29
|
-
"mcp-security",
|
|
30
|
-
"agentscore",
|
|
31
|
-
"kya",
|
|
32
|
-
"know-your-agent",
|
|
33
|
-
"trust",
|
|
34
|
-
"ai-agents",
|
|
35
|
-
"ai-security",
|
|
36
|
-
"reputation",
|
|
37
|
-
"verification",
|
|
38
|
-
"agent-trust",
|
|
39
|
-
"agent-verification",
|
|
40
|
-
"model-context-protocol",
|
|
41
|
-
"security",
|
|
42
|
-
"scanner",
|
|
43
|
-
"abuse-detection"
|
|
44
|
-
],
|
|
45
|
-
"author": "AgentScore <hello@agentscores.xyz>",
|
|
46
|
-
"license": "MIT",
|
|
47
|
-
"homepage": "https://agentscores.xyz",
|
|
48
|
-
"repository": {
|
|
49
|
-
"type": "git",
|
|
50
|
-
"url": "https://github.com/Thezenmonster/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentscore-xyz/mcp-server",
|
|
3
|
+
"version": "2.2.2",
|
|
4
|
+
"mcpName": "io.github.Thezenmonster/agentscore",
|
|
5
|
+
"description": "MCP security trust layer. Scan packages, inspect repo MCP dependencies, generate Policy Gate setup, install the workflow directly, check exposure, and query abuse data.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"agentscore-mcp": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"clean": "node -e \"const fs=require('fs');fs.rmSync('dist',{recursive:true,force:true})\"",
|
|
13
|
+
"build": "npm run clean && tsc",
|
|
14
|
+
"dev": "tsc --watch",
|
|
15
|
+
"start": "node dist/index.js",
|
|
16
|
+
"prepublishOnly": "npm run build"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
20
|
+
"zod": "^3.22.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^20.0.0",
|
|
24
|
+
"typescript": "^5.4.0"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"mcp",
|
|
28
|
+
"mcp-server",
|
|
29
|
+
"mcp-security",
|
|
30
|
+
"agentscore",
|
|
31
|
+
"kya",
|
|
32
|
+
"know-your-agent",
|
|
33
|
+
"trust",
|
|
34
|
+
"ai-agents",
|
|
35
|
+
"ai-security",
|
|
36
|
+
"reputation",
|
|
37
|
+
"verification",
|
|
38
|
+
"agent-trust",
|
|
39
|
+
"agent-verification",
|
|
40
|
+
"model-context-protocol",
|
|
41
|
+
"security",
|
|
42
|
+
"scanner",
|
|
43
|
+
"abuse-detection"
|
|
44
|
+
],
|
|
45
|
+
"author": "AgentScore <hello@agentscores.xyz>",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"homepage": "https://agentscores.xyz",
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/Thezenmonster/agentscores.git",
|
|
51
|
+
"directory": "packages/mcp-server"
|
|
52
|
+
},
|
|
53
|
+
"files": [
|
|
54
|
+
"dist/",
|
|
55
|
+
"README.md",
|
|
56
|
+
"smithery.yaml"
|
|
57
|
+
],
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=18"
|
|
60
|
+
}
|
|
61
|
+
}
|
package/smithery.yaml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
startCommand:
|
|
2
|
-
type: stdio
|
|
3
|
-
configSchema:
|
|
4
|
-
type: object
|
|
5
|
-
properties: {}
|
|
6
|
-
required: []
|
|
7
|
-
commandFunction: |-
|
|
8
|
-
(config) => ({
|
|
9
|
-
command: "npx",
|
|
10
|
-
args: ["-y", "@agentscore-xyz/mcp-server"]
|
|
11
|
-
})
|
|
1
|
+
startCommand:
|
|
2
|
+
type: stdio
|
|
3
|
+
configSchema:
|
|
4
|
+
type: object
|
|
5
|
+
properties: {}
|
|
6
|
+
required: []
|
|
7
|
+
commandFunction: |-
|
|
8
|
+
(config) => ({
|
|
9
|
+
command: "npx",
|
|
10
|
+
args: ["-y", "@agentscore-xyz/mcp-server"]
|
|
11
|
+
})
|