Pre-check an MCP server (free local scan; optional paid audit)
mcp_server_precheckScan MCP server tool names, descriptions and parameters for injection phrasing, hidden characters and cross-server shadowing before install, returning an ok, review or block verdict.
Instructions
WHAT: Pre-install check for one MCP server. Scans tool names, descriptions and parameter text for injection phrasing, concealed characters, hidden markup and cross-server shadowing. meta.verdict is ok, review or block, with why holding up to three plain findings. WHEN: Before installing or enabling an MCP server, once you have a tools/list result, the package on disk, or an npm package name. WHEN NOT: For a dependency audit with no tool list, call osv_audit_dependencies. For a few exact versions, call osv_query_packages. For an install, pin or block label on a dependency, call osv_install_verdict. This tool does not install, start or execute the package. remoteUrl is not available. COST: The scan is free. A packageName that is not on disk is read from registry.npmjs.org (no Apify charge). auditDependencies=true is optional and bills YOUR Apify account via your APIFY_TOKEN: $0.50 per 1,000 packages + $1.50 per 1,000 vulnerabilities found. That mode also looks up license and publish age on the public npm registry (package name only) when the tarball was not already read. With no token the scan still returns and the audit row is APIFY_TOKEN_MISSING. RETURNS: Paged "finding" rows (rule, severity, tool, field, evidence) and, when an audit was requested, one "dependency_audit" row plus any OSV rows. meta.verdict is ok, review or block. meta.why is up to three plain findings. critical or high maps to block, medium to review, and anything else to ok, except risk_level not_assessed which is review and never ok. meta.shared_externally.tool_names_and_descriptions is always false. Errors: INPUT_EMPTY, INVALID_JSON, INVALID_PACKAGE_NAME, PATH_NOT_FOUND, PATH_NOT_ALLOWED, INPUT_TOO_LARGE, REMOTE_URL_NOT_SUPPORTED, REGISTRY_NOT_FOUND, REGISTRY_FETCH_FAILED, REGISTRY_NO_LATEST, TARBALL_TOO_LARGE, TARBALL_INVALID, TARBALL_HOST_NOT_ALLOWED. BEHAVIOR: tools, toolsListJson and path: no network calls and no process spawn. Reads only package.json, package-lock.json, npm-shrinkwrap.json, manifest.json and server.json inside a directory you name, or one .json file you name. Refuses sensitive filenames and does not follow a symlink that leaves that directory. packageName on disk uses that copy and does not download. packageName that is not on disk GETs the public npm packument and then the tarball, one after the other, with User-Agent Fairquery (info@getfairquery.com). Only package.json, manifest.json and server.json are unpacked in memory. The package is not installed and no lifecycle script is run. Maintainer emails are removed from the result. remoteUrl is refused and no connection is opened. auditDependencies=true may call the OSV Actor (300 s timeout). PARAMETERS: At least one of tools, toolsListJson, path or packageName (none of them -> INPUT_EMPTY, not billed). remoteUrl is refused with REMOTE_URL_NOT_SUPPORTED and nothing else runs. tools: structured tools/list entries. toolsListJson: raw JSON of a tools/list result, an MCPB manifest or a tools array; invalid JSON -> INVALID_JSON and nothing else is read. path: a local directory or a .json file; a sensitive basename -> PATH_NOT_ALLOWED and the file is not read. packageName: npm name. On disk it is node_modules/ under path or the working directory, or a directory whose package.json name matches. If it is not on disk, the published tarball is read from registry.npmjs.org. Each field is scanned up to 20,000 characters and the raw total must be <= 500,000. auditDependencies defaults to false. minSeverity and includeDevDependencies are forwarded to the OSV Actor only when the audit runs (same meaning as osv_audit_dependencies). limit/offset page the combined rows. When the audit flag is true, every call runs the paid audit again, including a call that only changes offset. EXAMPLE: {"tools":[{"name":"sum","description":"Add two numbers."}]} -> verdict "ok", risk_level "none", why [], shared_externally.tool_names_and_descriptions false. A critical finding returns verdict "block".
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "mcp_server_precheck"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional if tools, toolsListJson or packageName is given. Local directory, or a .json file (tools/list, package.json, manifest.json). Example: "/tmp/some-mcp" | |
| limit | No | Optional page size: items to return, integer 1-1000 (default 100). Example: 50 | |
| tools | No | Optional if toolsListJson, path or packageName is given. 0-400 tools, as returned by tools/list. Example: [{"name":"sum","description":"Add two numbers."}] | |
| offset | No | Optional zero-based number of items to skip, integer 0-1000000 (default 0); pass nextOffset from the previous response, e.g. 100 | |
| remoteUrl | No | Not accepted. A remote MCP URL is on hold. Passing it returns REMOTE_URL_NOT_SUPPORTED and no connection is opened | |
| minSeverity | No | Optional, one of "ALL" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL", default "ALL". Forwarded to the OSV Actor only when auditDependencies is true | ALL |
| packageName | No | Optional if tools, toolsListJson or path is given. npm package name, e.g. "@scope/server" or "some-mcp". An installed copy is used when present. Otherwise the published tarball is read from registry.npmjs.org and not installed | |
| toolsListJson | No | Optional if tools, path or packageName is given. Raw JSON (<= 2,000,000 chars) of a tools/list result, {"tools":[...]}, an MCPB manifest, or a tools array. Example: "{\"tools\":[{\"name\":\"sum\",\"description\":\"Add two numbers.\"}]}" | |
| auditDependencies | No | Optional boolean, default false. true also audits a local package.json or package-lock.json with the OSV Actor (paid) and adds license and npm publish-age facts. Example: false | |
| includeDevDependencies | No | Optional boolean, default true. Forwarded to the OSV Actor only when auditDependencies is true; false skips devDependencies |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | No | Tool-specific context (summary counts, cost notes, ...) | |
| count | Yes | Number of items in this page | |
| items | Yes | Result rows for this page | |
| total | Yes | Total items before paging | |
| offset | Yes | Offset of the first item in this page | |
| hasMore | Yes | True if more items exist after this page | |
| nextOffset | Yes | Offset to pass for the next page, or null |