@patentprecheck/mcp 0.1.0 → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Patent PreCheck
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,5 +1,10 @@
1
1
  # @patentprecheck/mcp — Patent PreCheck CLI + MCP server
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@patentprecheck/mcp.svg)](https://www.npmjs.com/package/@patentprecheck/mcp)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@patentprecheck/mcp.svg)](https://www.npmjs.com/package/@patentprecheck/mcp)
5
+ [![license](https://img.shields.io/npm/l/@patentprecheck/mcp.svg)](./LICENSE)
6
+ [![node](https://img.shields.io/node/v/@patentprecheck/mcp.svg)](https://nodejs.org)
7
+
3
8
  Run a patentability pre-check on your code from inside your terminal or your AI
4
9
  coding agent (Cursor, Claude Code, Codex, Antigravity). It wraps the hosted
5
10
  [Patent PreCheck](https://patentprecheck.com) engine, so **no API keys are
package/package.json CHANGED
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "name": "@patentprecheck/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
+ "mcpName": "io.github.Patent-PreCheck/patent-precheck",
4
5
  "description": "Patent PreCheck CLI + MCP server — run a patentability pre-check on your code from inside Cursor, Claude Code, Codex, and other AI coding agents.",
6
+ "homepage": "https://patentprecheck.com/integrations",
7
+ "bugs": {
8
+ "url": "https://patentprecheck.com/contact",
9
+ "email": "info@patentprecheck.com"
10
+ },
5
11
  "type": "module",
6
12
  "bin": {
7
13
  "precheck": "bin/precheck.js"
@@ -12,6 +18,7 @@
12
18
  "files": [
13
19
  "bin",
14
20
  "src",
21
+ "server.json",
15
22
  "SKILL.md",
16
23
  "README.md"
17
24
  ],
package/server.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.Patent-PreCheck/patent-precheck",
4
+ "title": "Patent PreCheck",
5
+ "description": "Patentability pre-check for code: USPTO pillar scores, filing-readiness, and prior-art signals.",
6
+ "version": "0.1.1",
7
+ "websiteUrl": "https://patentprecheck.com/integrations",
8
+ "packages": [
9
+ {
10
+ "registryType": "npm",
11
+ "identifier": "@patentprecheck/mcp",
12
+ "version": "0.1.1",
13
+ "transport": {
14
+ "type": "stdio"
15
+ },
16
+ "runtimeHint": "npx",
17
+ "runtimeArguments": [
18
+ {
19
+ "type": "positional",
20
+ "value": "mcp"
21
+ }
22
+ ]
23
+ }
24
+ ]
25
+ }
package/src/api.js CHANGED
@@ -92,7 +92,18 @@ export async function callAnalyze({ code, filename, tier, aiAssistance, timeoutM
92
92
  return { ok: true, status: res.status, data, error: null };
93
93
  }
94
94
 
95
- /** URL that starts a paid Interactive Code Review for a given invention. */
96
- export function reviewSignupUrl() {
97
- return `${siteUrl()}/review-signup`;
95
+ /**
96
+ * URL that starts a paid Interactive Code Review.
97
+ *
98
+ * Carries UTM attribution so signups that originate from the CLI / MCP tool are
99
+ * distinguishable from organic web traffic in GA4 (utm_source=patent-precheck-mcp).
100
+ * `medium` lets callers separate the CLI ("cli") from an AI agent ("ai-agent").
101
+ */
102
+ export function reviewSignupUrl({ medium = 'cli' } = {}) {
103
+ const params = new URLSearchParams({
104
+ utm_source: 'patent-precheck-mcp',
105
+ utm_medium: medium,
106
+ utm_campaign: 'in-tool-precheck',
107
+ });
108
+ return `${siteUrl()}/review-signup?${params.toString()}`;
98
109
  }
package/src/render.js CHANGED
@@ -45,7 +45,7 @@ export function renderPillarsReference() {
45
45
  }
46
46
 
47
47
  /** Render an analyze result as a compact, terminal-friendly report. */
48
- export function renderScoreText(data, { filename } = {}) {
48
+ export function renderScoreText(data, { filename, medium = 'cli' } = {}) {
49
49
  if (!data || typeof data !== 'object') return 'No result.';
50
50
 
51
51
  const lines = [];
@@ -106,7 +106,7 @@ export function renderScoreText(data, { filename } = {}) {
106
106
 
107
107
  lines.push('');
108
108
  lines.push(`Next step \u2014 strengthen this with a live, evidence-backed Interactive Code Review:`);
109
- lines.push(` ${reviewSignupUrl()}`);
109
+ lines.push(` ${reviewSignupUrl({ medium })}`);
110
110
 
111
111
  return lines.join('\n');
112
112
  }
package/src/server.js CHANGED
@@ -87,13 +87,13 @@ export function buildServer(version = readPkgVersion()) {
87
87
  const hint =
88
88
  error && /HTTP 402|Upgrade/i.test(error)
89
89
  ? ' (this invention has used its free analysis; start an Interactive Code Review at ' +
90
- reviewSignupUrl() +
90
+ reviewSignupUrl({ medium: 'ai-agent' }) +
91
91
  ')'
92
92
  : '';
93
93
  return textResult(`Patent PreCheck error: ${error}${hint}`, { isError: true });
94
94
  }
95
95
 
96
- const summary = renderScoreText(data, { filename: name });
96
+ const summary = renderScoreText(data, { filename: name, medium: 'ai-agent' });
97
97
  const compact = JSON.stringify(data);
98
98
  return {
99
99
  content: [
@@ -128,7 +128,7 @@ export function buildServer(version = readPkgVersion()) {
128
128
  },
129
129
  async () =>
130
130
  textResult(
131
- `Start an Interactive Code Review (live coaching + evidence + filing package):\n${reviewSignupUrl()}`,
131
+ `Start an Interactive Code Review (live coaching + evidence + filing package):\n${reviewSignupUrl({ medium: 'ai-agent' })}`,
132
132
  ),
133
133
  );
134
134