opedd-mcp 0.6.1 → 0.6.3

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.
Files changed (3) hide show
  1. package/README.md +29 -2
  2. package/dist/index.js +17 -5
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -1,11 +1,38 @@
1
- # opedd-mcp
1
+ <p align="center">
2
+ <img src="assets/opedd-logo.png" alt="Opedd" height="72">
3
+ </p>
2
4
 
3
- Licensed content retrieval for AI agents via [MCP (Model Context Protocol)](https://modelcontextprotocol.io). The alternative to unlicensed web scraping for RAG pipelines, AI search, and LLM grounding.
5
+ <h1 align="center">opedd-mcp</h1>
6
+
7
+ <p align="center">
8
+ <strong>Licensed, rights-cleared content for AI agents</strong> — the alternative to unlicensed scraping for RAG, AI search, and LLM grounding.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/opedd-mcp"><img src="https://img.shields.io/npm/v/opedd-mcp?color=4A26ED&label=npm" alt="npm"></a>
13
+ <a href="https://www.npmjs.com/package/opedd-mcp"><img src="https://img.shields.io/npm/dm/opedd-mcp?color=4A26ED&label=downloads" alt="downloads"></a>
14
+ <a href="https://registry.modelcontextprotocol.io/v0/servers?search=opedd"><img src="https://img.shields.io/badge/MCP%20Registry-com.opedd%2Fopedd--mcp-4A26ED" alt="MCP Registry"></a>
15
+ <a href="./LICENSE"><img src="https://img.shields.io/npm/l/opedd-mcp?color=4A26ED" alt="MIT"></a>
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="cursor://anysphere.cursor-deeplink/mcp/install?name=opedd&config=eyJjb21tYW5kIjoibnB4IC15IG9wZWRkLW1jcCJ9"><img src="https://img.shields.io/badge/Add%20to-Cursor-000?logo=cursor" alt="Add to Cursor"></a>
20
+ <a href="https://insiders.vscode.dev/redirect/mcp/install?name=opedd&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22opedd-mcp%22%5D%7D"><img src="https://img.shields.io/badge/Install%20in-VS%20Code-007ACC?logo=visualstudiocode" alt="Install in VS Code"></a>
21
+ <a href="https://opedd.com/for-ai-agents"><img src="https://img.shields.io/badge/Docs-opedd.com-111" alt="Docs"></a>
22
+ </p>
4
23
 
5
24
  Lets AI assistants (Claude Desktop, Cursor, Windsurf, or any MCP-compatible host) discover, purchase, and verify content licenses autonomously — mid-conversation, without opening a browser. Every license is registered on-chain (Tempo blockchain) with cryptographic proof.
6
25
 
7
26
  **Unlike generic search APIs**, Opedd returns content with a verifiable license key — defensible under the EU AI Act and any copyright jurisdiction.
8
27
 
28
+ ## Quick start
29
+
30
+ ```bash
31
+ npx opedd-mcp
32
+ ```
33
+
34
+ Then add it to your MCP host (see [Claude Desktop / Cursor / Windsurf setup](#claude-desktop-setup) below). Discovery + verification tools work with no configuration; purchasing and content retrieval use optional API keys from [opedd.com](https://opedd.com).
35
+
9
36
  ## What it does
10
37
 
11
38
  Exposes up to 17 tools to any AI assistant (some are conditional on env vars):
package/dist/index.js CHANGED
@@ -24,6 +24,10 @@ const BUYER_TOKEN = process.env.OPEDD_BUYER_TOKEN; // buyer API token (opedd_buy
24
24
  const ACCESS_KEY = process.env.OPEDD_ACCESS_KEY; // enterprise access key (ent_*); for /enterprise-license GET feed
25
25
  const BUYER_JWT = process.env.OPEDD_BUYER_JWT; // Supabase JWT; for /buyer-audit + /buyer-compliance-report
26
26
  // ─── HTTP helpers ─────────────────────────────────────────────────────────────
27
+ // 30s cap (2026-07-10 hardening audit): without it a hung api.opedd.com
28
+ // call hangs the agent's tool call indefinitely — an MCP server must fail
29
+ // fast so the agent can recover.
30
+ const FETCH_TIMEOUT_MS = 30_000;
27
31
  async function opeddFetch(path, options = {}) {
28
32
  const url = `${API_BASE}${path}`;
29
33
  const headers = {
@@ -33,13 +37,21 @@ async function opeddFetch(path, options = {}) {
33
37
  ...(PUB_BEARER ? { Authorization: `Bearer ${PUB_BEARER}` } : (API_KEY ? { "X-API-Key": API_KEY } : {})),
34
38
  ...(options.headers ?? {}),
35
39
  };
36
- const res = await fetch(url, { ...options, headers });
37
- const body = await res.json();
40
+ const res = await fetch(url, { ...options, headers, signal: AbortSignal.timeout(FETCH_TIMEOUT_MS) });
41
+ // Check ok BEFORE parsing (2026-07-10 hardening): an HTML 502/504 from the
42
+ // proxy must surface as "HTTP 502", not a JSON SyntaxError.
38
43
  if (!res.ok) {
39
- const msg = body?.error || body?.message || `HTTP ${res.status}`;
44
+ let msg = `HTTP ${res.status}`;
45
+ try {
46
+ const errBody = await res.json();
47
+ msg = errBody?.error || errBody?.message || msg;
48
+ }
49
+ catch {
50
+ // non-JSON error body — keep the HTTP-status default
51
+ }
40
52
  throw new Error(msg);
41
53
  }
42
- return body;
54
+ return await res.json();
43
55
  }
44
56
  // Fetch an NDJSON endpoint and collect parsed lines into an array.
45
57
  // Last line is typically `{"_meta": {...}}`; surfaced as `meta` field on the
@@ -52,7 +64,7 @@ async function opeddFetchNdjson(path, options = {}) {
52
64
  ...(PUB_BEARER ? { Authorization: `Bearer ${PUB_BEARER}` } : (API_KEY ? { "X-API-Key": API_KEY } : {})),
53
65
  ...(options.headers ?? {}),
54
66
  };
55
- const res = await fetch(url, { ...options, headers });
67
+ const res = await fetch(url, { ...options, headers, signal: AbortSignal.timeout(FETCH_TIMEOUT_MS) });
56
68
  if (!res.ok) {
57
69
  let msg = `HTTP ${res.status}`;
58
70
  try {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "opedd-mcp",
3
- "version": "0.6.1",
4
- "description": "Licensed content for AI agents \u2014 discover, purchase, verify, and retrieve rights-cleared expert analysis with a verifiable license key per article, on-chain proof, and EU AI Act Article 53 attestation. The alternative to unlicensed scraping for RAG, AI search, and training pipelines.",
3
+ "version": "0.6.3",
4
+ "description": "Licensed, rights-cleared content for AI agents — verifiable license keys, on-chain proof, and EU AI Act attestation. The MCP alternative to unlicensed scraping for RAG and AI search.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
- "mcpName": "io.github.opedd/opedd-mcp",
7
+ "mcpName": "com.opedd/opedd-mcp",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/Opedd/opedd-mcp.git"
@@ -56,4 +56,4 @@
56
56
  "files": [
57
57
  "dist"
58
58
  ]
59
- }
59
+ }