@cryptoquant_official/mcp 0.0.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.
Files changed (55) hide show
  1. package/README.md +88 -0
  2. package/dist/auth/server.d.ts +3 -0
  3. package/dist/auth/server.d.ts.map +1 -0
  4. package/dist/auth/server.js +405 -0
  5. package/dist/auth/server.js.map +1 -0
  6. package/dist/auth/storage.d.ts +11 -0
  7. package/dist/auth/storage.d.ts.map +1 -0
  8. package/dist/auth/storage.js +53 -0
  9. package/dist/auth/storage.js.map +1 -0
  10. package/dist/cache/storage.d.ts +47 -0
  11. package/dist/cache/storage.d.ts.map +1 -0
  12. package/dist/cache/storage.js +140 -0
  13. package/dist/cache/storage.js.map +1 -0
  14. package/dist/cache/summary.d.ts +16 -0
  15. package/dist/cache/summary.d.ts.map +1 -0
  16. package/dist/cache/summary.js +85 -0
  17. package/dist/cache/summary.js.map +1 -0
  18. package/dist/cache/types.d.ts +76 -0
  19. package/dist/cache/types.d.ts.map +1 -0
  20. package/dist/cache/types.js +6 -0
  21. package/dist/cache/types.js.map +1 -0
  22. package/dist/config.d.ts +18 -0
  23. package/dist/config.d.ts.map +1 -0
  24. package/dist/config.js +23 -0
  25. package/dist/config.js.map +1 -0
  26. package/dist/data/metrics.toon +58 -0
  27. package/dist/discovery.d.ts +70 -0
  28. package/dist/discovery.d.ts.map +1 -0
  29. package/dist/discovery.js +159 -0
  30. package/dist/discovery.js.map +1 -0
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +23 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/permissions.d.ts +36 -0
  36. package/dist/permissions.d.ts.map +1 -0
  37. package/dist/permissions.js +135 -0
  38. package/dist/permissions.js.map +1 -0
  39. package/dist/plan-limits.d.ts +71 -0
  40. package/dist/plan-limits.d.ts.map +1 -0
  41. package/dist/plan-limits.js +400 -0
  42. package/dist/plan-limits.js.map +1 -0
  43. package/dist/tools/auth.d.ts +3 -0
  44. package/dist/tools/auth.d.ts.map +1 -0
  45. package/dist/tools/auth.js +157 -0
  46. package/dist/tools/auth.js.map +1 -0
  47. package/dist/tools/core.d.ts +3 -0
  48. package/dist/tools/core.d.ts.map +1 -0
  49. package/dist/tools/core.js +472 -0
  50. package/dist/tools/core.js.map +1 -0
  51. package/dist/utils.d.ts +32 -0
  52. package/dist/utils.d.ts.map +1 -0
  53. package/dist/utils.js +42 -0
  54. package/dist/utils.js.map +1 -0
  55. package/package.json +62 -0
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Cache storage operations for discovery response caching
3
+ */
4
+ import { homedir } from "os";
5
+ import { join } from "path";
6
+ import { readFileSync, writeFileSync, mkdirSync, existsSync, unlinkSync, chmodSync } from "fs";
7
+ import { CACHE_VERSION, CACHE_TTL_DAYS, } from "./types.js";
8
+ const CACHE_DIR = join(homedir(), ".cryptoquant");
9
+ const CACHE_FILE = join(CACHE_DIR, "discovery-cache.json");
10
+ /**
11
+ * Get cache file path.
12
+ */
13
+ export function getCacheFilePath(_apiUrl) {
14
+ return CACHE_FILE;
15
+ }
16
+ /**
17
+ * Check if cache is still valid (not expired and version matches).
18
+ */
19
+ export function isCacheValid(cache, apiUrl, apiKeyPrefix) {
20
+ // Version check
21
+ if (cache.version !== CACHE_VERSION) {
22
+ return false;
23
+ }
24
+ // API URL must match
25
+ if (cache.metadata.api_url !== apiUrl) {
26
+ return false;
27
+ }
28
+ // API key prefix must match (detects account switch)
29
+ if (cache.metadata.api_key_prefix !== apiKeyPrefix) {
30
+ return false;
31
+ }
32
+ // TTL check
33
+ const expiresAt = new Date(cache.metadata.expires_at);
34
+ if (isNaN(expiresAt.getTime()) || expiresAt < new Date()) {
35
+ return false;
36
+ }
37
+ return true;
38
+ }
39
+ /**
40
+ * Read cache from file.
41
+ * Returns null if cache doesn't exist or is invalid JSON.
42
+ */
43
+ export function readCache(apiUrl) {
44
+ const cachePath = getCacheFilePath(apiUrl);
45
+ try {
46
+ if (!existsSync(cachePath)) {
47
+ return null;
48
+ }
49
+ const data = JSON.parse(readFileSync(cachePath, "utf-8"));
50
+ // Basic structure validation
51
+ if (!data.version || !data.metadata || !data.raw_response || !data.summary) {
52
+ return null;
53
+ }
54
+ return data;
55
+ }
56
+ catch {
57
+ return null;
58
+ }
59
+ }
60
+ /**
61
+ * Write cache to file with secure permissions.
62
+ */
63
+ export function writeCache(apiUrl, apiKey, rawResponse, parsed, summary, plan) {
64
+ // Ensure directory exists
65
+ if (!existsSync(CACHE_DIR)) {
66
+ mkdirSync(CACHE_DIR, { recursive: true, mode: 0o700 });
67
+ }
68
+ const now = new Date();
69
+ const expiresAt = new Date(now);
70
+ expiresAt.setDate(expiresAt.getDate() + CACHE_TTL_DAYS);
71
+ const cache = {
72
+ version: CACHE_VERSION,
73
+ metadata: {
74
+ api_url: apiUrl,
75
+ api_key_prefix: apiKey.slice(0, 8),
76
+ cached_at: now.toISOString(),
77
+ expires_at: expiresAt.toISOString(),
78
+ plan,
79
+ },
80
+ raw_response: rawResponse,
81
+ parsed,
82
+ summary,
83
+ };
84
+ const cachePath = getCacheFilePath(apiUrl);
85
+ writeFileSync(cachePath, JSON.stringify(cache, null, 2), { encoding: "utf-8" });
86
+ chmodSync(cachePath, 0o600);
87
+ }
88
+ /**
89
+ * Delete cache file.
90
+ */
91
+ export function invalidateCache(apiUrl) {
92
+ const cachePath = getCacheFilePath(apiUrl);
93
+ try {
94
+ if (existsSync(cachePath)) {
95
+ unlinkSync(cachePath);
96
+ }
97
+ }
98
+ catch {
99
+ // Already deleted or inaccessible
100
+ }
101
+ }
102
+ /**
103
+ * Delete the cache file.
104
+ */
105
+ export function clearAllCaches() {
106
+ try {
107
+ if (existsSync(CACHE_FILE)) {
108
+ unlinkSync(CACHE_FILE);
109
+ }
110
+ }
111
+ catch {
112
+ // Ignore errors
113
+ }
114
+ }
115
+ /**
116
+ * Calculate cache age in days.
117
+ */
118
+ export function getCacheAgeDays(cache) {
119
+ const cachedAt = new Date(cache.metadata.cached_at);
120
+ const now = new Date();
121
+ const diffMs = now.getTime() - cachedAt.getTime();
122
+ return Math.floor(diffMs / (1000 * 60 * 60 * 24));
123
+ }
124
+ /**
125
+ * Get human-readable cache status string.
126
+ */
127
+ export function getCacheStatus(cache, fromCache) {
128
+ if (!fromCache || !cache) {
129
+ return "fresh";
130
+ }
131
+ const days = getCacheAgeDays(cache);
132
+ return `cached (${days}d old)`;
133
+ }
134
+ /**
135
+ * Get cache file path for user display.
136
+ */
137
+ export function getCachePath() {
138
+ return CACHE_DIR;
139
+ }
140
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/cache/storage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAC/F,OAAO,EAIL,aAAa,EACb,cAAc,GACf,MAAM,YAAY,CAAC;AAGpB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,cAAc,CAAC,CAAC;AAClD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAA2B,EAAE,MAAc,EAAE,YAAoB;IAC5F,gBAAgB;IAChB,IAAI,KAAK,CAAC,OAAO,KAAK,aAAa,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,qBAAqB;IACrB,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,KAAK,MAAM,EAAE,C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U,CAAC,UAAU,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,gBAAgB;IAClB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACpD,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC;IAClD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAkC,EAAE,SAAkB;IACnF,IAAI,CAAC,SAAS,IAAI,CAAC,KAAK,EAAE,CAAC;QACzB,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,MAAM,IAAI,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IACpC,OAAO,WAAW,IAAI,QAAQ,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Summary generation for cached discovery data
3
+ */
4
+ import type { DiscoverySummaryData, MyDiscoveryRawResponse } from "./types.js";
5
+ import type { PlanLimits } from "../plan-limits.js";
6
+ /**
7
+ * Generate summary from parsed plan limits.
8
+ * Counts endpoints and organizes by asset/category.
9
+ */
10
+ export declare function generateSummary(limits: PlanLimits | null, statics: string[]): DiscoverySummaryData;
11
+ /**
12
+ * Extract raw response structure for caching.
13
+ * Only keeps necessary fields.
14
+ */
15
+ export declare function extractRawResponse(apiResponse: Record<string, unknown>): MyDiscoveryRawResponse | null;
16
+ //# sourceMappingURL=summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../src/cache/summary.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAiElG;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,sBAAsB,GAAG,IAAI,CAqB/B"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Summary generation for cached discovery data
3
+ */
4
+ /**
5
+ * Generate summary from parsed plan limits.
6
+ * Counts endpoints and organizes by asset/category.
7
+ */
8
+ export function generateSummary(limits, statics) {
9
+ const assetData = new Map();
10
+ // Count endpoints from limits
11
+ if (limits) {
12
+ for (const [asset, categories] of Object.entries(limits)) {
13
+ if (!assetData.has(asset)) {
14
+ assetData.set(asset, { endpoint_count: 0, categories: new Set() });
15
+ }
16
+ const data = assetData.get(asset);
17
+ for (const [category, metrics] of Object.entries(categories)) {
18
+ data.categories.add(category);
19
+ if (metrics) {
20
+ data.endpoint_count += Object.keys(metrics).length;
21
+ }
22
+ }
23
+ }
24
+ }
25
+ // Count static endpoints (parse asset from path)
26
+ for (const staticPath of statics) {
27
+ const parts = staticPath.split("/");
28
+ if (parts.length >= 4) {
29
+ const asset = parts[2];
30
+ const category = parts[3];
31
+ if (!assetData.has(asset)) {
32
+ assetData.set(asset, { endpoint_count: 0, categories: new Set() });
33
+ }
34
+ const data = assetData.get(asset);
35
+ data.endpoint_count++;
36
+ data.categories.add(category);
37
+ }
38
+ }
39
+ // Build summary
40
+ const assets = [];
41
+ const categoryByAsset = {};
42
+ let totalEndpoints = 0;
43
+ for (const [asset, data] of assetData.entries()) {
44
+ assets.push({
45
+ name: asset,
46
+ endpoint_count: data.endpoint_count,
47
+ categories: Array.from(data.categories).sort(),
48
+ });
49
+ categoryByAsset[asset] = Array.from(data.categories).sort();
50
+ totalEndpoints += data.endpoint_count;
51
+ }
52
+ // Sort assets alphabetically
53
+ assets.sort((a, b) => a.name.localeCompare(b.name));
54
+ return {
55
+ total_endpoints: totalEndpoints,
56
+ assets,
57
+ category_by_asset: categoryByAsset,
58
+ };
59
+ }
60
+ /**
61
+ * Extract raw response structure for caching.
62
+ * Only keeps necessary fields.
63
+ */
64
+ export function extractRawResponse(apiResponse) {
65
+ try {
66
+ const apiEndpoint = apiResponse.apiEndpoint;
67
+ const plan = apiResponse.plan;
68
+ const apiRateLimit = apiResponse.apiRateLimit;
69
+ if (!apiEndpoint || typeof apiEndpoint !== "object") {
70
+ return null;
71
+ }
72
+ return {
73
+ apiEndpoint: apiEndpoint,
74
+ plan: { name: plan?.name || "unknown" },
75
+ apiRateLimit: {
76
+ token: apiRateLimit?.token || 0,
77
+ window: apiRateLimit?.window || "day",
78
+ },
79
+ };
80
+ }
81
+ catch {
82
+ return null;
83
+ }
84
+ }
85
+ //# sourceMappingURL=summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summary.js","sourceRoot":"","sources":["../../src/cache/summary.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,MAAyB,EAAE,OAAiB;IAC1E,MAAM,SAAS,GAMX,IAAI,GAAG,EAAE,CAAC;IAEd,8BAA8B;IAC9B,IAAI,MAAM,EAAE,CAAC;QACX,KAAK,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACzD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1B,SAAS,CAAC,GAAG,C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KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;gBAC/B,MAAM,EAAE,YAAY,EAAE,MAAM,IAAI,KAAK;aACtC;SACF,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Cache schema types for CryptoQuant discovery caching
3
+ */
4
+ import type { UserPlan, ApiRateLimit, PlanLimits } from "../plan-limits.js";
5
+ export declare const CACHE_VERSION = 1;
6
+ export declare const CACHE_TTL_DAYS = 7;
7
+ /**
8
+ * Raw API response structure from /my/discovery/endpoints
9
+ */
10
+ export interface MyDiscoveryRawResponse {
11
+ apiEndpoint: Record<string, unknown>;
12
+ plan: {
13
+ name: string;
14
+ };
15
+ apiRateLimit: {
16
+ token: number;
17
+ window: string;
18
+ };
19
+ }
20
+ /**
21
+ * Summary data generated from the raw response
22
+ */
23
+ export interface DiscoverySummaryData {
24
+ total_endpoints: number;
25
+ assets: Array<{
26
+ name: string;
27
+ endpoint_count: number;
28
+ categories: string[];
29
+ }>;
30
+ category_by_asset: Record<string, string[]>;
31
+ }
32
+ /**
33
+ * Cache metadata for validation
34
+ */
35
+ export interface CacheMetadata {
36
+ api_url: string;
37
+ api_key_prefix: string;
38
+ cached_at: string;
39
+ expires_at: string;
40
+ plan: UserPlan;
41
+ }
42
+ /**
43
+ * Full cache schema stored in file
44
+ */
45
+ export interface DiscoveryCacheSchema {
46
+ version: typeof CACHE_VERSION;
47
+ metadata: CacheMetadata;
48
+ raw_response: MyDiscoveryRawResponse;
49
+ parsed: {
50
+ limits: PlanLimits | null;
51
+ statics: string[];
52
+ apiRateLimit: ApiRateLimit | null;
53
+ };
54
+ summary: DiscoverySummaryData;
55
+ }
56
+ /**
57
+ * Compact response format for initialize() tool
58
+ */
59
+ export interface CompactInitializeResponse {
60
+ success: boolean;
61
+ session: {
62
+ plan: UserPlan;
63
+ rate_limit: string;
64
+ cache_status: string;
65
+ };
66
+ scope: {
67
+ total_endpoints: number;
68
+ accessible: number;
69
+ assets: Record<string, {
70
+ endpoints: number;
71
+ categories: number;
72
+ }>;
73
+ note: string;
74
+ };
75
+ }
76
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cache/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE5E,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvB,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,cAAc,EAAE,MAAM,CAAC;QACvB,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC,CAAC;IACH,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,QAAQ,EAAE,aAAa,CAAC;IACxB,YAAY,EAAE,sBAAsB,CAAC;IACrC,MAAM,EAAE;QACN,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;QAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;KACnC,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE;QACP,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CACZ,MAAM,EACN;YACE,SAAS,EAAE,MAAM,CAAC;YAClB,UAAU,EAAE,MAAM,CAAC;SACpB,CACF,CAAC;QACF,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Cache schema types for CryptoQuant discovery caching
3
+ */
4
+ export const CACHE_VERSION = 1;
5
+ export const CACHE_TTL_DAYS = 7;
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/cache/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAC/B,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Centralized configuration for CryptoQuant MCP Server
3
+ *
4
+ * API URL Priority:
5
+ * 1. CRYPTOQUANT_API_URL environment variable (optional override)
6
+ * 2. Default production URL
7
+ */
8
+ /**
9
+ * Get the configured API URL.
10
+ * Returns the base URL with /v1 suffix (e.g., "https://api.cryptoquant.com/v1")
11
+ */
12
+ export declare function getApiUrl(): string;
13
+ /**
14
+ * Get the API base URL without version suffix.
15
+ * Returns the base URL (e.g., "https://api.cryptoquant.com")
16
+ */
17
+ export declare function getApiBaseUrl(): string;
18
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;GAGG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC"}
package/dist/config.js ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Centralized configuration for CryptoQuant MCP Server
3
+ *
4
+ * API URL Priority:
5
+ * 1. CRYPTOQUANT_API_URL environment variable (optional override)
6
+ * 2. Default production URL
7
+ */
8
+ const DEFAULT_API_URL = "https://api.cryptoquant.com/v1";
9
+ /**
10
+ * Get the configured API URL.
11
+ * Returns the base URL with /v1 suffix (e.g., "https://api.cryptoquant.com/v1")
12
+ */
13
+ export function getApiUrl() {
14
+ return process.env.CRYPTOQUANT_API_URL || DEFAULT_API_URL;
15
+ }
16
+ /**
17
+ * Get the API base URL without version suffix.
18
+ * Returns the base URL (e.g., "https://api.cryptoquant.com")
19
+ */
20
+ export function getApiBaseUrl() {
21
+ return getApiUrl().replace(/\/v1$/, "");
22
+ }
23
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,eAAe,GAAG,gCAAgC,CAAC;AAEzD;;;GAGG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,eAAe,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,58 @@
1
+ # Metric Descriptions for describe_metric() tool
2
+ # Format: TOON (Token-Oriented Object Notation)
3
+ # Schema: id, name, category, asset, description, thresholds, interpretation
4
+
5
+ metrics[50]{id,name,category,asset,description,thresholds,interpretation}:
6
+
7
+ # Market Indicators - BTC
8
+ mvrv,Market Value to Realized Value,market-indicator,btc,Compares current market cap to realized cap (aggregate cost basis of all coins),<1 undervalued|1-2.5 neutral|2.5-3.7 overheated|>3.7 extreme top,Primary cycle indicator. Values below 1 historically mark accumulation zones. Values above 3.7 indicate cycle tops.
9
+ nupl,Net Unrealized Profit/Loss,market-indicator,btc,Percentage of coins in profit or loss relative to total market cap,<0 capitulation|0-0.25 hope|0.25-0.5 belief|0.5-0.75 optimism|>0.75 euphoria,Sentiment gauge. Extreme values (below 0 or above 0.75) often precede major reversals.
10
+ sopr,Spent Output Profit Ratio,market-indicator,btc,Ratio of price sold to price paid for coins moved on-chain,<1 selling at loss|=1 breakeven|>1 selling at profit,Real-time profit/loss behavior. SOPR=1 often acts as support in bull markets resistance in bear markets.
11
+ asopr,Adjusted SOPR,market-indicator,btc,SOPR excluding coins younger than 1 hour to filter noise,<1 loss realization|>1 profit taking,More accurate than raw SOPR for trend analysis. Filters out exchange-related movements.
12
+ realized-price,Realized Price,market-indicator,btc,Average acquisition price of all BTC based on when each coin last moved,N/A - use as reference price,Aggregate cost basis. Price below realized price = most holders in loss (capitulation zone).
13
+ puell-multiple,Puell Multiple,market-indicator,btc,Daily miner revenue divided by 365-day moving average revenue,<0.5 undervalued|0.5-4 neutral|>4 overheated,Miner profitability indicator. Low values indicate miner stress high values indicate excess profitability.
14
+
15
+ # Market Indicators - ETH
16
+ eth-mvrv,Market Value to Realized Value (ETH),market-indicator,eth,Compares ETH market cap to realized cap,<1 undervalued|1-2 neutral|>2 overheated,ETH valuation indicator. Similar interpretation to BTC MVRV but with different threshold ranges.
17
+
18
+ # Exchange Flows - BTC
19
+ netflow,Exchange Netflow,exchange-flows,btc,Net flow of BTC into (positive) or out of (negative) exchanges,positive sell pressure|negative accumulation,Key supply dynamics indicator. Sustained outflows suggest accumulation sustained inflows suggest distribution.
20
+ reserve,Exchange Reserve,exchange-flows,btc,Total BTC held across all tracked exchanges,increasing distribution|decreasing accumulation,Long-term trend indicator. Declining reserves bullish for price (less liquid supply).
21
+ inflow,Exchange Inflow,exchange-flows,btc,Total BTC deposited to exchanges,high inflow potential sell pressure,Immediate selling potential. Large inflows may precede price drops.
22
+ outflow,Exchange Outflow,exchange-flows,btc,Total BTC withdrawn from exchanges,high outflow accumulation,Accumulation signal. Large outflows suggest coins moving to cold storage.
23
+ exchange-whale-ratio,Exchange Whale Ratio,exchange-flows,btc,Ratio of top 10 inflow transactions to total inflows,>0.9 whale dominated|<0.5 retail dominated,Who is moving coins. High ratio means large players dominating exchange activity.
24
+
25
+ # Exchange Flows - ETH
26
+ eth-netflow,Exchange Netflow (ETH),exchange-flows,eth,Net flow of ETH into or out of exchanges,positive sell pressure|negative accumulation,ETH supply dynamics. Same interpretation as BTC netflow.
27
+ eth-reserve,Exchange Reserve (ETH),exchange-flows,eth,Total ETH held on exchanges,increasing distribution|decreasing accumulation,ETH long-term supply trend.
28
+
29
+ # Derivatives Data
30
+ funding-rates,Funding Rates,market-data,btc,Periodic payment between long and short perpetual swap holders,<0 bearish bias|0-0.03% neutral|>0.1% extreme bullish,Leverage sentiment. Extreme positive rates often precede corrections.
31
+ open-interest,Open Interest,market-data,btc,Total value of outstanding derivative contracts,rising with price continuation|falling unwinding,Position buildup indicator. Rising OI with rising price = new money entering. Falling OI = positions closing.
32
+ long-short-ratio,Long/Short Ratio,market-data,btc,Ratio of accounts holding long vs short positions,>1 more longs|<1 more shorts,Retail positioning. Can be contrarian - extreme ratios often precede reversals.
33
+ liquidations,Liquidations,market-data,btc,Value of forced position closures,high liquidations volatility and trend exhaustion,Leverage washout. Large liquidation events often mark local tops or bottoms.
34
+
35
+ # Miner Flows
36
+ miner-netflow,Miner Netflow,miner-flows,btc,Net flow from miner wallets to exchanges (positive = selling),positive miner selling|negative miner accumulating,Miner behavior. Sustained miner selling can add supply pressure. Miner accumulation bullish.
37
+ hashrate,Hash Rate,network-indicator,btc,Total computational power securing the Bitcoin network,rising network growth|falling miner stress,Network health. Declining hashrate may indicate miner capitulation.
38
+ difficulty,Mining Difficulty,network-indicator,btc,Computational difficulty of mining a block,rising competition|falling capitulation,Mining economics. Difficulty adjustments follow hashrate changes.
39
+
40
+ # Network Indicators
41
+ active-addresses,Active Addresses,network-indicator,btc,Number of unique addresses transacting daily,rising adoption|falling reduced activity,Network usage proxy. More active addresses = more organic usage.
42
+ transaction-count,Transaction Count,network-indicator,btc,Number of on-chain transactions per day,rising demand|falling reduced usage,Network demand. High transaction counts indicate active usage.
43
+ nvt-ratio,NVT Ratio,network-indicator,btc,Network Value to Transactions ratio (market cap / daily tx volume),high overvalued|low undervalued,Valuation vs usage. High NVT suggests price outpacing network activity.
44
+
45
+ # Stablecoin Data
46
+ stablecoin-supply,Stablecoin Supply Ratio,stablecoin,btc,Ratio of stablecoin market cap to BTC market cap,high buying power|low limited firepower,Dry powder indicator. High ratio = lots of stables ready to buy BTC.
47
+ usdt-exchange-reserve,USDT Exchange Reserve,stablecoin,stablecoin,USDT held on exchanges,increasing ready to buy|decreasing deployed or withdrawn,Immediate buying potential. Rising USDT reserves suggest incoming demand.
48
+
49
+ # ETH Specific
50
+ eth-staking-rate,ETH Staking Rate,network-indicator,eth,Percentage of ETH supply staked in beacon chain,high reduced liquid supply|low more tradeable,ETH supply dynamics. Higher staking = less sell pressure.
51
+ eth-validator-count,Validator Count,network-indicator,eth,Number of active Ethereum validators,rising network security|falling concerning,Network participation. More validators = more decentralized and secure.
52
+ eth-gas-used,Gas Used,network-indicator,eth,Total gas consumed in transactions,high network congestion|low low activity,Network demand. High gas usage indicates strong demand for block space.
53
+
54
+ # Advanced Metrics
55
+ sthr-sopr,Short-Term Holder SOPR,market-indicator,btc,SOPR for coins held less than 155 days,<1 STH capitulation|>1 STH profit taking,Recent buyer behavior. STH panic often marks local bottoms.
56
+ lth-sopr,Long-Term Holder SOPR,market-indicator,btc,SOPR for coins held more than 155 days,rarely below 1 LTH selling at loss is extreme|high profit taking at tops,Diamond hands behavior. LTH selling at loss is historically rare and marks deep capitulation.
57
+ supply-in-profit,Supply in Profit,market-indicator,btc,Percentage of circulating supply currently in profit,<50% capitulation zone|>95% euphoria zone,Market-wide profit state. Extreme readings mark cycle phases.
58
+ coin-days-destroyed,Coin Days Destroyed,network-indicator,btc,Sum of coins multiplied by days held when moved,spike old coins moving (distribution)|low hodling,Old money movement. CDD spikes often occur at market tops as long-term holders distribute.
@@ -0,0 +1,70 @@
1
+ export interface EndpointParameter {
2
+ [paramName: string]: string[];
3
+ }
4
+ export interface DiscoveryEndpoint {
5
+ path: string;
6
+ parameters: EndpointParameter;
7
+ required_parameters: string[];
8
+ }
9
+ export interface DiscoveryResponse {
10
+ status: {
11
+ code: number;
12
+ message: string;
13
+ };
14
+ result: {
15
+ data: DiscoveryEndpoint[];
16
+ };
17
+ }
18
+ export interface ParsedEndpoint {
19
+ path: string;
20
+ asset: string;
21
+ category: string;
22
+ metric: string;
23
+ parameters: EndpointParameter;
24
+ required_parameters: string[];
25
+ }
26
+ export interface EndpointCatalog {
27
+ endpoints: ParsedEndpoint[];
28
+ assets: string[];
29
+ categories: string[];
30
+ byAsset: Map<string, ParsedEndpoint[]>;
31
+ byCategory: Map<string, ParsedEndpoint[]>;
32
+ byAssetCategory: Map<string, ParsedEndpoint[]>;
33
+ fetched_at: number;
34
+ }
35
+ export declare function fetchDiscoveryEndpoints(apiKey: string, apiUrl: string): Promise<{
36
+ success: boolean;
37
+ error?: string;
38
+ }>;
39
+ export declare function getEndpointCatalog(): EndpointCatalog | null;
40
+ export declare function isDiscoveryLoaded(): boolean;
41
+ export declare function searchEndpoints(options: {
42
+ asset?: string;
43
+ category?: string;
44
+ query?: string;
45
+ }): ParsedEndpoint[];
46
+ export declare function getEndpointByPath(path: string): ParsedEndpoint | undefined;
47
+ export declare function validateEndpointParams(endpoint: ParsedEndpoint, params: Record<string, unknown>): {
48
+ valid: boolean;
49
+ errors: string[];
50
+ };
51
+ export declare function getParameterOptions(path: string): {
52
+ parameters: EndpointParameter;
53
+ required: string[];
54
+ } | null;
55
+ export interface DiscoverySummary {
56
+ total_endpoints: number;
57
+ assets: {
58
+ name: string;
59
+ count: number;
60
+ }[];
61
+ categories: {
62
+ name: string;
63
+ count: number;
64
+ }[];
65
+ fetched_at: string | null;
66
+ }
67
+ export declare function getDiscoverySummary(): DiscoverySummary | null;
68
+ export declare function getAssetCategoryMap(): Record<string, string[]> | null;
69
+ export declare function resetDiscovery(): void;
70
+ //# sourceMappingURL=discovery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,iBAAiB,CAAC;IAC9B,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,MAAM,EAAE;QAAE,IAAI,EAAE,iBAAiB,EAAE,CAAA;KAAE,CAAC;CACvC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,iBAAiB,CAAC;IAC9B,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,S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