@agentscore-xyz/mcp-server 2.2.0 → 2.2.1

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 CHANGED
@@ -1,12 +1,18 @@
1
1
  # @agentscore-xyz/mcp-server
2
2
 
3
- MCP security trust layer. Scan packages, get trust verdicts, inspect repo-wide MCP dependencies, generate Policy Gate setup, check incident exposure, and query the abuse database. Seven tools for MCP security decisions. No API key, zero config.
3
+ **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.
4
4
 
5
- [![KYA Scan](https://agentscores.xyz/api/scan/badge?npm=@agentscore-xyz/mcp-server)](https://agentscores.xyz/scan?npm=@agentscore-xyz/mcp-server)
5
+ [![AgentScore](https://agentscores.xyz/api/scan/badge?npm=@agentscore-xyz/mcp-server)](https://agentscores.xyz/report/@agentscore-xyz/mcp-server)
6
6
 
7
- > **Scan any MCP package for security issues:** [agentscores.xyz](https://agentscores.xyz)
7
+ > 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).
8
8
 
9
- ## Quick Start
9
+ ## Why it exists
10
+
11
+ 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.
12
+
13
+ It is the **machine-readable trust layer** behind agentscores.xyz, packaged as an MCP server so any agent can consume it.
14
+
15
+ ## Quick start
10
16
 
11
17
  ### Claude Desktop
12
18
 
@@ -23,59 +29,64 @@ Add to your `claude_desktop_config.json`:
23
29
  }
24
30
  ```
25
31
 
26
- ### Cursor / Any MCP Client
32
+ ### Cursor / VS Code / any MCP client
27
33
 
28
34
  ```bash
29
35
  npx @agentscore-xyz/mcp-server
30
36
  ```
31
37
 
32
- ## What This Does
38
+ ## What you can ask
33
39
 
34
- Your AI can now make security decisions about MCP packages:
40
+ The primary use case: trust questions about packages, answered in conversation.
35
41
 
36
42
  > **You:** "Is exa-mcp-server safe to install?"
37
43
  >
38
44
  > **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
45
 
40
- > **You:** "The axios package was compromised. Which MCP servers are affected?"
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"
46
+ > **You:** "Scan @azure-devops/mcp for security issues."
45
47
  >
46
48
  > **Claude:** *calls scan_package* "Score 75/100, MODERATE risk. Found: preinstall script modifying npm registry config. No provenance attestations."
47
49
 
48
- > **You:** "Check this repo for MCP dependencies"
50
+ > **You:** "The axios package was compromised. Which MCP servers depend on it?"
49
51
  >
50
- > **Claude:** *calls check_my_repo* "MCP dependencies found: 5. Two are warnings. Run generate_policy_gate_setup to turn these checks into a CI gate."
52
+ > **Claude:** *calls check_exposure* "Multiple monitored MCP servers depend on axios, including exa-mcp-server, tavily-mcp, and figma-mcp."
51
53
 
52
- > **You:** "Set up AgentScore Policy Gate for this repo"
54
+ > **You:** "Is fa-mcp-sdk monitored? What is its history?"
53
55
  >
54
- > **Claude:** *calls generate_policy_gate_setup* "Here is the exact GitHub Actions workflow, the AGENTSCORE_KEY secret name, and the pilot link for your repo."
56
+ > **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."
57
+
58
+ The agent picks the right tool. You ask the question the way you would ask a colleague.
59
+
60
+ ## CI enforcement (optional, section 2)
55
61
 
56
- ## Available Tools
62
+ 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
63
 
58
- | Tool | What it does |
59
- |------|-------------|
60
- | `scan_package` | Full security scan: install scripts, prompt injection, source code patterns, provenance posture, MCP tool extraction |
61
- | `get_verdict` | Trust decision: allow, warn, or block based on scan findings. Also reports monitoring status and publisher posture. |
62
- | `check_my_repo` | Inspect the current repo for MCP dependencies and summarise verdicts for every package detected locally. |
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 |
64
+ > **You:** "Check this repo for MCP dependencies and set up a policy gate."
65
+ >
66
+ > **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."
67
+
68
+ Three tools support that flow:
67
69
 
68
- ## From Ad-Hoc Scans To CI Enforcement
70
+ - `check_my_repo` — inspect the current repo's MCP dependencies.
71
+ - `generate_policy_gate_setup` — preview the OIDC-based GitHub Actions workflow.
72
+ - `install_policy_gate` — write `.github/workflows/agentscore-policy-gate.yml` directly into the repo.
69
73
 
70
- The MCP server now bridges one-off package checks into the sticky product:
74
+ The gate is the same data, just at a different point in the lifecycle. The primary surface is still the question.
71
75
 
72
- 1. Run `check_my_repo` to see every MCP package used in a repo.
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`.
76
+ ## Available tools
75
77
 
76
- That turns "is this package safe?" into "this repo now enforces MCP dependency policy on every PR."
78
+ | Tool | Question it answers |
79
+ |------|---------------------|
80
+ | `scan_package` | What does the live scan of this package look like, including install scripts, source patterns, capability surface, and findings? |
81
+ | `get_verdict` | Should I allow, warn, or block this package? |
82
+ | `check_exposure` | Which monitored MCP servers depend on a given package? (Incident response.) |
83
+ | `monitor_status` | Is this package under continuous monitoring? What is its scan history? |
84
+ | `check_abuse` | Has this package been reported in the KYA abuse database? |
85
+ | `check_my_repo` | Inspect the current repo for MCP dependencies and summarise verdicts. |
86
+ | `generate_policy_gate_setup` | Preview the OIDC-based GitHub Actions workflow for CI enforcement. |
87
+ | `install_policy_gate` | Write the workflow file directly into `.github/workflows/`. |
77
88
 
78
- ## Risk Levels
89
+ ## Risk levels
79
90
 
80
91
  | Score | Risk | Meaning |
81
92
  |-------|------|---------|
@@ -85,25 +96,31 @@ That turns "is this package safe?" into "this repo now enforces MCP dependency p
85
96
  | 30-49 | HIGH | Serious issues, not recommended |
86
97
  | 0-29 | CRITICAL | Do not use |
87
98
 
88
- ## What the Scanner Checks
99
+ ## What the scanner checks
89
100
 
90
101
  - Install scripts (postinstall/preinstall hooks with network calls or code execution)
91
102
  - Prompt injection patterns in package metadata
92
103
  - Suspicious URLs (sketchy TLDs, ngrok, raw IPs)
93
- - Source code patterns (command injection, unsafe eval, hardcoded secrets)
104
+ - Source code patterns (command injection, unsafe eval, hardcoded secrets) with context-aware mitigators
94
105
  - Publisher provenance (trusted publishing, attestations)
95
106
  - Dependency count and metadata completeness
96
107
  - MCP tool definitions extracted from published source
97
108
 
98
- ## Monitoring
109
+ 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.
110
+
111
+ ## Continuous monitoring
99
112
 
100
- AgentScore continuously monitors hundreds of MCP packages. The `check_exposure` and `monitor_status` tools use this live dataset. When a package like axios gets compromised, you can instantly find which MCP servers are affected.
113
+ 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
114
 
102
115
  ## Links
103
116
 
104
- - **Website:** [agentscores.xyz](https://agentscores.xyz)
105
- - **API Docs:** [agentscores.xyz/docs](https://agentscores.xyz/docs)
117
+ - **Live data:** [agentscores.xyz](https://agentscores.xyz)
118
+ - **Per-package reports:** [agentscores.xyz/report/<package>](https://agentscores.xyz/report)
119
+ - **Advisory feed:** [agentscores.xyz/security/advisories](https://agentscores.xyz/security/advisories) (also RSS)
120
+ - **API docs:** [agentscores.xyz/docs](https://agentscores.xyz/docs)
106
121
  - **Methodology:** [agentscores.xyz/methodology](https://agentscores.xyz/methodology)
122
+ - **Scanner precision changelog:** [agentscores.xyz/scanner/precision](https://agentscores.xyz/scanner/precision)
123
+ - **Embed a badge:** [agentscores.xyz/badge](https://agentscores.xyz/badge)
107
124
 
108
125
  ## Licence
109
126
 
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.1";
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: { Accept: "application/json" },
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
@@ -26,7 +26,7 @@ server.tool("monitor_status", "Check if an MCP package is under continuous monit
26
26
  server.tool("check_my_repo", "Inspect the current repo for MCP dependencies, look up AgentScore verdicts for each package, and summarise what should be gated in CI. 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", "Generate the exact GitHub Actions workflow needed to enforce AgentScore Policy Gate for a repo. Detects MCP dependencies locally and returns the YAML, secret name, and pilot link needed for setup.", {
29
+ server.tool("generate_policy_gate_setup", "Generate the exact GitHub Actions workflow needed to enforce AgentScore Policy Gate for a repo. Detects MCP dependencies locally and returns the OIDC-based YAML needed for setup. No API key or secret is required.", {
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));
package/dist/tools.js CHANGED
@@ -36,7 +36,8 @@ function policyGateHint(options) {
36
36
  "",
37
37
  "Policy Gate:",
38
38
  " Run check_my_repo to inspect every MCP dependency used by this repo.",
39
- " Run generate_policy_gate_setup to turn the same checks into a CI gate.",
39
+ " Run generate_policy_gate_setup to preview the CI workflow.",
40
+ " Run install_policy_gate to write the workflow file directly into the repo.",
40
41
  ];
41
42
  if (options.repoUrl) {
42
43
  lines.push(` Start a free pilot: ${buildIntentUrl("pilot", options.repoUrl)}`);
@@ -223,7 +224,7 @@ function formatRepoSummary(repoPath, repoUrl, checkedFiles, results) {
223
224
  const reasons = item.reasons.length > 0 ? ` | reasons: ${item.reasons.join(", ")}` : "";
224
225
  lines.push(` ${item.name}@${version} - ${item.verdict.toUpperCase()} (${score}/100, ${risk}) [source: ${item.source}]${reasons}`);
225
226
  }
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
+ lines.push("", "Next step:", " Run generate_policy_gate_setup to preview the OIDC-based GitHub Actions workflow for this repo.", " Run install_policy_gate to write .github/workflows/agentscore-policy-gate.yml directly.");
227
228
  return lines.join("\n");
228
229
  }
229
230
  function buildOidcWorkflowYaml(packages) {
@@ -254,33 +255,8 @@ function buildOidcWorkflowYaml(packages) {
254
255
  lines.push("");
255
256
  return lines.join("\n");
256
257
  }
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
258
  function formatPolicyGateSetup(repoPath, repoUrl, dependencies, checkedFiles) {
282
259
  const explicitPackages = dependencies.map((dep) => dep.name);
283
- const pilotUrl = buildIntentUrl("pilot", repoUrl);
284
260
  const lines = [
285
261
  `Repo path: ${repoPath}`,
286
262
  `Repository: ${repoUrl || "not detected"}`,
@@ -288,17 +264,17 @@ function formatPolicyGateSetup(repoPath, repoUrl, dependencies, checkedFiles) {
288
264
  `Detected MCP dependencies: ${explicitPackages.length > 0 ? explicitPackages.join(", ") : "none"}`,
289
265
  "",
290
266
  "Next steps:",
291
- `1. Start a free Policy Gate pilot to get a repo-scoped key: ${pilotUrl}`,
292
- "2. Add a GitHub Actions secret named AGENTSCORE_KEY to the repo.",
293
- "3. Save this workflow as .github/workflows/agentscore-policy-gate.yml:",
267
+ "1. Save this workflow as .github/workflows/agentscore-policy-gate.yml.",
268
+ "2. Commit and push. The first run will authenticate with GitHub OIDC and auto-provision the repo.",
269
+ "3. If you want the MCP server to write the file for you, run install_policy_gate.",
294
270
  "",
295
- buildWorkflowYaml(explicitPackages),
271
+ buildOidcWorkflowYaml(explicitPackages),
296
272
  ];
297
273
  if (explicitPackages.length === 0) {
298
274
  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
275
  }
300
276
  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.");
277
+ 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
278
  }
303
279
  return lines.join("\n");
304
280
  }
@@ -380,9 +356,10 @@ export async function handleTool(name, args) {
380
356
  " 1. Review the workflow file",
381
357
  " 2. Commit and push",
382
358
  " 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
359
  ];
360
+ if (pilotUrl) {
361
+ lines.push("", `If you want a managed pilot with custom thresholds and exceptions: ${pilotUrl}`);
362
+ }
386
363
  return text(lines.join("\n"));
387
364
  }
388
365
  default:
package/package.json CHANGED
@@ -1,60 +1,61 @@
1
- {
2
- "name": "@agentscore-xyz/mcp-server",
3
- "version": "2.2.0",
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/agentscore-mcp-server"
51
- },
52
- "files": [
53
- "dist/",
54
- "README.md",
55
- "smithery.yaml"
56
- ],
57
- "engines": {
58
- "node": ">=18"
59
- }
60
- }
1
+ {
2
+ "name": "@agentscore-xyz/mcp-server",
3
+ "version": "2.2.1",
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
+ })