@reaudit/mcp-server 1.0.0

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 (119) hide show
  1. package/LICENSE +33 -0
  2. package/README.md +399 -0
  3. package/dist/auth/oauth-client.d.ts +43 -0
  4. package/dist/auth/oauth-client.d.ts.map +1 -0
  5. package/dist/auth/oauth-client.js +340 -0
  6. package/dist/auth/oauth-client.js.map +1 -0
  7. package/dist/auth/token-store.d.ts +41 -0
  8. package/dist/auth/token-store.d.ts.map +1 -0
  9. package/dist/auth/token-store.js +176 -0
  10. package/dist/auth/token-store.js.map +1 -0
  11. package/dist/index.d.ts +11 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +480 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/lib/api-client.d.ts +970 -0
  16. package/dist/lib/api-client.d.ts.map +1 -0
  17. package/dist/lib/api-client.js +441 -0
  18. package/dist/lib/api-client.js.map +1 -0
  19. package/dist/lib/confirmation.d.ts +92 -0
  20. package/dist/lib/confirmation.d.ts.map +1 -0
  21. package/dist/lib/confirmation.js +224 -0
  22. package/dist/lib/confirmation.js.map +1 -0
  23. package/dist/lib/error-handler.d.ts +57 -0
  24. package/dist/lib/error-handler.d.ts.map +1 -0
  25. package/dist/lib/error-handler.js +235 -0
  26. package/dist/lib/error-handler.js.map +1 -0
  27. package/dist/lib/offline-mode.d.ts +107 -0
  28. package/dist/lib/offline-mode.d.ts.map +1 -0
  29. package/dist/lib/offline-mode.js +356 -0
  30. package/dist/lib/offline-mode.js.map +1 -0
  31. package/dist/lib/progress-tracker.d.ts +87 -0
  32. package/dist/lib/progress-tracker.d.ts.map +1 -0
  33. package/dist/lib/progress-tracker.js +238 -0
  34. package/dist/lib/progress-tracker.js.map +1 -0
  35. package/dist/prompts/index.d.ts +24 -0
  36. package/dist/prompts/index.d.ts.map +1 -0
  37. package/dist/prompts/index.js +305 -0
  38. package/dist/prompts/index.js.map +1 -0
  39. package/dist/resources/index.d.ts +44 -0
  40. package/dist/resources/index.d.ts.map +1 -0
  41. package/dist/resources/index.js +125 -0
  42. package/dist/resources/index.js.map +1 -0
  43. package/dist/tools/account.d.ts +25 -0
  44. package/dist/tools/account.d.ts.map +1 -0
  45. package/dist/tools/account.js +69 -0
  46. package/dist/tools/account.js.map +1 -0
  47. package/dist/tools/action-grids.d.ts +414 -0
  48. package/dist/tools/action-grids.d.ts.map +1 -0
  49. package/dist/tools/action-grids.js +271 -0
  50. package/dist/tools/action-grids.js.map +1 -0
  51. package/dist/tools/analytics-query.d.ts +126 -0
  52. package/dist/tools/analytics-query.d.ts.map +1 -0
  53. package/dist/tools/analytics-query.js +106 -0
  54. package/dist/tools/analytics-query.js.map +1 -0
  55. package/dist/tools/analytics.d.ts +57 -0
  56. package/dist/tools/analytics.d.ts.map +1 -0
  57. package/dist/tools/analytics.js +122 -0
  58. package/dist/tools/analytics.js.map +1 -0
  59. package/dist/tools/audits.d.ts +123 -0
  60. package/dist/tools/audits.d.ts.map +1 -0
  61. package/dist/tools/audits.js +226 -0
  62. package/dist/tools/audits.js.map +1 -0
  63. package/dist/tools/calendar.d.ts +57 -0
  64. package/dist/tools/calendar.d.ts.map +1 -0
  65. package/dist/tools/calendar.js +109 -0
  66. package/dist/tools/calendar.js.map +1 -0
  67. package/dist/tools/content-generation.d.ts +211 -0
  68. package/dist/tools/content-generation.d.ts.map +1 -0
  69. package/dist/tools/content-generation.js +363 -0
  70. package/dist/tools/content-generation.js.map +1 -0
  71. package/dist/tools/content.d.ts +92 -0
  72. package/dist/tools/content.d.ts.map +1 -0
  73. package/dist/tools/content.js +130 -0
  74. package/dist/tools/content.js.map +1 -0
  75. package/dist/tools/indexing.d.ts +132 -0
  76. package/dist/tools/indexing.d.ts.map +1 -0
  77. package/dist/tools/indexing.js +190 -0
  78. package/dist/tools/indexing.js.map +1 -0
  79. package/dist/tools/optimization.d.ts +70 -0
  80. package/dist/tools/optimization.d.ts.map +1 -0
  81. package/dist/tools/optimization.js +106 -0
  82. package/dist/tools/optimization.js.map +1 -0
  83. package/dist/tools/projects.d.ts +67 -0
  84. package/dist/tools/projects.d.ts.map +1 -0
  85. package/dist/tools/projects.js +113 -0
  86. package/dist/tools/projects.js.map +1 -0
  87. package/dist/tools/prompts.d.ts +306 -0
  88. package/dist/tools/prompts.d.ts.map +1 -0
  89. package/dist/tools/prompts.js +378 -0
  90. package/dist/tools/prompts.js.map +1 -0
  91. package/dist/tools/publishing.d.ts +135 -0
  92. package/dist/tools/publishing.d.ts.map +1 -0
  93. package/dist/tools/publishing.js +209 -0
  94. package/dist/tools/publishing.js.map +1 -0
  95. package/dist/tools/reports.d.ts +252 -0
  96. package/dist/tools/reports.d.ts.map +1 -0
  97. package/dist/tools/reports.js +183 -0
  98. package/dist/tools/reports.js.map +1 -0
  99. package/dist/tools/social.d.ts +224 -0
  100. package/dist/tools/social.d.ts.map +1 -0
  101. package/dist/tools/social.js +291 -0
  102. package/dist/tools/social.js.map +1 -0
  103. package/dist/tools/sources.d.ts +221 -0
  104. package/dist/tools/sources.d.ts.map +1 -0
  105. package/dist/tools/sources.js +308 -0
  106. package/dist/tools/sources.js.map +1 -0
  107. package/dist/tools/strategy.d.ts +345 -0
  108. package/dist/tools/strategy.d.ts.map +1 -0
  109. package/dist/tools/strategy.js +392 -0
  110. package/dist/tools/strategy.js.map +1 -0
  111. package/dist/tools/usage.d.ts +101 -0
  112. package/dist/tools/usage.d.ts.map +1 -0
  113. package/dist/tools/usage.js +184 -0
  114. package/dist/tools/usage.js.map +1 -0
  115. package/dist/tools/visibility.d.ts +95 -0
  116. package/dist/tools/visibility.d.ts.map +1 -0
  117. package/dist/tools/visibility.js +163 -0
  118. package/dist/tools/visibility.js.map +1 -0
  119. package/package.json +54 -0
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ /**
3
+ * Usage Tools
4
+ *
5
+ * MCP tools for tracking token usage and managing budgets.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.usageTools = exports.setBudgetLimitsSchema = exports.getBudgetStatusSchema = exports.getTokenUsageSchema = void 0;
9
+ exports.getTokenUsage = getTokenUsage;
10
+ exports.getBudgetStatus = getBudgetStatus;
11
+ exports.setBudgetLimits = setBudgetLimits;
12
+ const zod_1 = require("zod");
13
+ // Schemas
14
+ exports.getTokenUsageSchema = zod_1.z.object({
15
+ days: zod_1.z.number().min(1).max(90).optional().describe('Number of days to include (default: 30, max: 90)'),
16
+ });
17
+ exports.getBudgetStatusSchema = zod_1.z.object({});
18
+ exports.setBudgetLimitsSchema = zod_1.z.object({
19
+ monthlyTokenLimit: zod_1.z.number().nullable().optional().describe('Monthly token limit (null for unlimited)'),
20
+ monthlyCostLimit: zod_1.z.number().nullable().optional().describe('Monthly cost limit in dollars (null for unlimited)'),
21
+ alertThreshold: zod_1.z.number().min(0).max(100).optional().describe('Alert threshold percentage (default: 80)'),
22
+ pauseOnLimit: zod_1.z.boolean().optional().describe('Pause operations when limit reached'),
23
+ });
24
+ /**
25
+ * Get token usage summary
26
+ */
27
+ async function getTokenUsage(client, args) {
28
+ const data = await client.getTokenUsage(args.days);
29
+ let output = `## Token Usage Summary (${data.period})\n\n`;
30
+ output += `**Total Tokens:** ${data.totalTokens.toLocaleString()}\n`;
31
+ output += `**Total Cost:** ${data.totalCostFormatted}\n\n`;
32
+ if (data.budget) {
33
+ output += `### Budget Status\n`;
34
+ if (data.budget.tokenLimit) {
35
+ output += `- Token Limit: ${data.budget.tokenLimit.toLocaleString()}\n`;
36
+ }
37
+ if (data.budget.costLimit) {
38
+ output += `- Cost Limit: $${(data.budget.costLimit / 100).toFixed(2)}\n`;
39
+ }
40
+ output += `- Usage: ${data.budget.percentUsed}%\n\n`;
41
+ }
42
+ if (data.byOperation && data.byOperation.length > 0) {
43
+ output += `### Usage by Operation\n`;
44
+ output += `| Operation | Tokens | Cost | Count |\n`;
45
+ output += `|-----------|--------|------|-------|\n`;
46
+ for (const op of data.byOperation.slice(0, 10)) {
47
+ output += `| ${op.operation} | ${op.tokens.toLocaleString()} | $${(op.cost / 100).toFixed(2)} | ${op.count} |\n`;
48
+ }
49
+ output += '\n';
50
+ }
51
+ if (data.byDay && data.byDay.length > 0) {
52
+ output += `### Recent Daily Usage\n`;
53
+ for (const day of data.byDay.slice(-7)) {
54
+ output += `- ${day.date}: ${day.tokens.toLocaleString()} tokens ($${(day.cost / 100).toFixed(2)})\n`;
55
+ }
56
+ }
57
+ return output;
58
+ }
59
+ /**
60
+ * Get budget status
61
+ */
62
+ async function getBudgetStatus(client, _args) {
63
+ const data = await client.getBudgetStatus();
64
+ let output = `## Budget Status\n\n`;
65
+ if (!data.hasLimits) {
66
+ output += `No budget limits configured. Usage is unlimited.\n\n`;
67
+ output += `To set limits, use the \`set_budget_limits\` tool.\n`;
68
+ return output;
69
+ }
70
+ if (data.settings) {
71
+ output += `### Current Settings\n`;
72
+ if (data.settings.monthlyTokenLimit) {
73
+ output += `- Monthly Token Limit: ${data.settings.monthlyTokenLimit.toLocaleString()}\n`;
74
+ }
75
+ if (data.settings.monthlyCostLimitFormatted) {
76
+ output += `- Monthly Cost Limit: ${data.settings.monthlyCostLimitFormatted}\n`;
77
+ }
78
+ output += `- Alert Threshold: ${data.settings.alertThreshold}%\n`;
79
+ output += `- Pause on Limit: ${data.settings.pauseOnLimit ? 'Yes' : 'No'}\n`;
80
+ output += `- Notify on Alert: ${data.settings.notifyOnAlert ? 'Yes' : 'No'}\n\n`;
81
+ }
82
+ if (data.usage) {
83
+ output += `### Current Usage (${data.currentPeriod})\n`;
84
+ output += `- Tokens Used: ${data.usage.tokens.toLocaleString()}`;
85
+ if (data.usage.tokenLimit) {
86
+ output += ` / ${data.usage.tokenLimit.toLocaleString()}`;
87
+ }
88
+ output += '\n';
89
+ output += `- Cost: ${data.usage.costFormatted}`;
90
+ if (data.usage.costLimit) {
91
+ output += ` / $${(data.usage.costLimit / 100).toFixed(2)}`;
92
+ }
93
+ output += '\n';
94
+ output += `- Usage: ${data.usage.percentUsed}%\n\n`;
95
+ }
96
+ output += `### Status\n`;
97
+ if (data.status.limitReached) {
98
+ output += `⚠️ **Limit Reached**`;
99
+ if (data.status.reason) {
100
+ output += `: ${data.status.reason}`;
101
+ }
102
+ output += '\n';
103
+ }
104
+ else if (data.status.alertSent) {
105
+ output += `⚠️ Alert threshold reached\n`;
106
+ }
107
+ else {
108
+ output += `✅ Within budget\n`;
109
+ }
110
+ return output;
111
+ }
112
+ /**
113
+ * Set budget limits
114
+ */
115
+ async function setBudgetLimits(client, args) {
116
+ await client.updateBudgetSettings(args);
117
+ let output = `## Budget Settings Updated\n\n`;
118
+ if ('monthlyTokenLimit' in args) {
119
+ output += `- Monthly Token Limit: ${args.monthlyTokenLimit === null ? 'Unlimited' : args.monthlyTokenLimit?.toLocaleString()}\n`;
120
+ }
121
+ if ('monthlyCostLimit' in args) {
122
+ output += `- Monthly Cost Limit: ${args.monthlyCostLimit === null ? 'Unlimited' : `$${args.monthlyCostLimit?.toFixed(2)}`}\n`;
123
+ }
124
+ if ('alertThreshold' in args) {
125
+ output += `- Alert Threshold: ${args.alertThreshold}%\n`;
126
+ }
127
+ if ('pauseOnLimit' in args) {
128
+ output += `- Pause on Limit: ${args.pauseOnLimit ? 'Yes' : 'No'}\n`;
129
+ }
130
+ output += `\nUse \`get_budget_status\` to view your current budget status.`;
131
+ return output;
132
+ }
133
+ // Tool definitions
134
+ exports.usageTools = [
135
+ {
136
+ name: 'get_token_usage',
137
+ description: 'Get a summary of your LLM token usage and costs over a specified period',
138
+ inputSchema: {
139
+ type: 'object',
140
+ properties: {
141
+ days: {
142
+ type: 'number',
143
+ description: 'Number of days to include (default: 30, max: 90)',
144
+ },
145
+ },
146
+ },
147
+ },
148
+ {
149
+ name: 'get_budget_status',
150
+ description: 'Get your current budget limits and usage status',
151
+ inputSchema: {
152
+ type: 'object',
153
+ properties: {},
154
+ },
155
+ },
156
+ {
157
+ name: 'set_budget_limits',
158
+ description: 'Set monthly budget limits for token usage and costs. Set to null to remove limits.',
159
+ inputSchema: {
160
+ type: 'object',
161
+ properties: {
162
+ monthlyTokenLimit: {
163
+ type: ['number', 'null'],
164
+ description: 'Monthly token limit (null for unlimited)',
165
+ },
166
+ monthlyCostLimit: {
167
+ type: ['number', 'null'],
168
+ description: 'Monthly cost limit in dollars (null for unlimited)',
169
+ },
170
+ alertThreshold: {
171
+ type: 'number',
172
+ description: 'Alert threshold percentage (default: 80)',
173
+ minimum: 0,
174
+ maximum: 100,
175
+ },
176
+ pauseOnLimit: {
177
+ type: 'boolean',
178
+ description: 'Pause operations when limit reached',
179
+ },
180
+ },
181
+ },
182
+ },
183
+ ];
184
+ //# sourceMappingURL=usage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/tools/usage.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAsBH,sCAwCC;AAKD,0CAwDC;AAKD,0CAwBC;AAtJD,6BAAwB;AAGxB,UAAU;AACG,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;CACxG,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAErC,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACxG,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;IACjH,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,C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+ /**
2
+ * Visibility Tools
3
+ *
4
+ * MCP tools for AI visibility tracking and analysis.
5
+ */
6
+ import { z } from 'zod';
7
+ import { ReauditAPIClient } from '../lib/api-client.js';
8
+ export declare const getVisibilityScoreSchema: z.ZodObject<{
9
+ projectId: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ projectId: string;
12
+ }, {
13
+ projectId: string;
14
+ }>;
15
+ export declare const getBrandMentionsSchema: z.ZodObject<{
16
+ projectId: z.ZodString;
17
+ platform: z.ZodOptional<z.ZodString>;
18
+ limit: z.ZodOptional<z.ZodNumber>;
19
+ days: z.ZodOptional<z.ZodNumber>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ projectId: string;
22
+ platform?: string | undefined;
23
+ limit?: number | undefined;
24
+ days?: number | undefined;
25
+ }, {
26
+ projectId: string;
27
+ platform?: string | undefined;
28
+ limit?: number | undefined;
29
+ days?: number | undefined;
30
+ }>;
31
+ export declare const getCompetitorComparisonSchema: z.ZodObject<{
32
+ projectId: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ projectId: string;
35
+ }, {
36
+ projectId: string;
37
+ }>;
38
+ /**
39
+ * Get visibility score tool handler
40
+ */
41
+ export declare function getVisibilityScore(client: ReauditAPIClient, args: z.infer<typeof getVisibilityScoreSchema>): Promise<string>;
42
+ /**
43
+ * Get brand mentions tool handler
44
+ */
45
+ export declare function getBrandMentions(client: ReauditAPIClient, args: z.infer<typeof getBrandMentionsSchema>): Promise<string>;
46
+ /**
47
+ * Get competitor comparison tool handler
48
+ */
49
+ export declare function getCompetitorComparison(client: ReauditAPIClient, args: z.infer<typeof getCompetitorComparisonSchema>): Promise<string>;
50
+ /**
51
+ * Tool definitions for MCP
52
+ */
53
+ export declare const visibilityTools: ({
54
+ name: string;
55
+ description: string;
56
+ inputSchema: {
57
+ type: "object";
58
+ properties: {
59
+ projectId: {
60
+ type: string;
61
+ description: string;
62
+ };
63
+ platform?: undefined;
64
+ limit?: undefined;
65
+ days?: undefined;
66
+ };
67
+ required: string[];
68
+ };
69
+ } | {
70
+ name: string;
71
+ description: string;
72
+ inputSchema: {
73
+ type: "object";
74
+ properties: {
75
+ projectId: {
76
+ type: string;
77
+ description: string;
78
+ };
79
+ platform: {
80
+ type: string;
81
+ description: string;
82
+ };
83
+ limit: {
84
+ type: string;
85
+ description: string;
86
+ };
87
+ days: {
88
+ type: string;
89
+ description: string;
90
+ };
91
+ };
92
+ required: string[];
93
+ };
94
+ })[];
95
+ //# sourceMappingURL=visibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../src/tools/visibility.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,eAAO,MAAM,wBAAwB;;;;;;EAEnC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;EAExC,CAAC;AAEH;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,GAC7C,OAAO,CAAC,MAAM,CAAC,CA2BjB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,GAC3C,OAAO,CAAC,MAAM,CAAC,CA6BjB;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,GAClD,OAAO,CAAC,MAAM,CAAC,CAyBjB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuD3B,CAAC"}
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ /**
3
+ * Visibility Tools
4
+ *
5
+ * MCP tools for AI visibility tracking and analysis.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.visibilityTools = exports.getCompetitorComparisonSchema = exports.getBrandMentionsSchema = exports.getVisibilityScoreSchema = void 0;
9
+ exports.getVisibilityScore = getVisibilityScore;
10
+ exports.getBrandMentions = getBrandMentions;
11
+ exports.getCompetitorComparison = getCompetitorComparison;
12
+ const zod_1 = require("zod");
13
+ // Tool schemas
14
+ exports.getVisibilityScoreSchema = zod_1.z.object({
15
+ projectId: zod_1.z.string().describe('The ID of the project to get visibility score for'),
16
+ });
17
+ exports.getBrandMentionsSchema = zod_1.z.object({
18
+ projectId: zod_1.z.string().describe('The ID of the project'),
19
+ platform: zod_1.z.string().optional().describe('Filter by platform (chatgpt, claude, perplexity, etc.)'),
20
+ limit: zod_1.z.number().optional().describe('Maximum number of mentions to return (default: 20, max: 50)'),
21
+ days: zod_1.z.number().optional().describe('Number of days to look back (default: 30, max: 90)'),
22
+ });
23
+ exports.getCompetitorComparisonSchema = zod_1.z.object({
24
+ projectId: zod_1.z.string().describe('The ID of the project to compare'),
25
+ });
26
+ /**
27
+ * Get visibility score tool handler
28
+ */
29
+ async function getVisibilityScore(client, args) {
30
+ const result = await client.getVisibilityScore(args.projectId);
31
+ let response = `## AI Visibility Score for ${result.brandName}\n\n`;
32
+ response += `**Overall Score:** ${result.visibilityScore}/100\n`;
33
+ response += `**Period:** Last ${result.period}\n\n`;
34
+ response += `### Key Metrics\n`;
35
+ response += `- Total Mentions: ${result.metrics.totalMentions}\n`;
36
+ response += `- Citations Received: ${result.metrics.citationsReceived}\n`;
37
+ response += `- Citation Rate: ${result.metrics.citationRate}%\n`;
38
+ response += `- Average Sentiment: ${result.metrics.avgSentiment}/100\n\n`;
39
+ if (result.platformBreakdown.length > 0) {
40
+ response += `### Platform Breakdown\n`;
41
+ for (const platform of result.platformBreakdown) {
42
+ response += `- **${platform.platform}**: ${platform.mentions} mentions (sentiment: ${platform.avgSentiment})\n`;
43
+ }
44
+ response += '\n';
45
+ }
46
+ response += `### Sentiment Distribution\n`;
47
+ response += `- Positive: ${result.sentimentDistribution.positive}\n`;
48
+ response += `- Neutral: ${result.sentimentDistribution.neutral}\n`;
49
+ response += `- Negative: ${result.sentimentDistribution.negative}\n`;
50
+ return response;
51
+ }
52
+ /**
53
+ * Get brand mentions tool handler
54
+ */
55
+ async function getBrandMentions(client, args) {
56
+ const result = await client.getBrandMentions(args.projectId, {
57
+ platform: args.platform,
58
+ limit: args.limit,
59
+ days: args.days,
60
+ });
61
+ if (result.mentions.length === 0) {
62
+ return `No brand mentions found for ${result.brandName} in the last ${result.period}.`;
63
+ }
64
+ let response = `## Brand Mentions for ${result.brandName}\n`;
65
+ response += `Found ${result.count} mentions in the last ${result.period}\n\n`;
66
+ for (const mention of result.mentions) {
67
+ const sentimentEmoji = mention.sentimentLabel === 'positive' ? '✅' :
68
+ mention.sentimentLabel === 'negative' ? '❌' : '➖';
69
+ response += `### ${mention.platform} ${sentimentEmoji}\n`;
70
+ response += `**Prompt:** ${mention.prompt}\n`;
71
+ response += `**Excerpt:** ${mention.excerpt}\n`;
72
+ response += `**Sentiment:** ${mention.sentimentLabel} (${mention.sentiment}/100)\n`;
73
+ if (mention.citationCount > 0) {
74
+ response += `**Citations:** ${mention.citationCount}\n`;
75
+ }
76
+ response += `**Date:** ${new Date(mention.timestamp).toLocaleDateString()}\n\n`;
77
+ }
78
+ return response;
79
+ }
80
+ /**
81
+ * Get competitor comparison tool handler
82
+ */
83
+ async function getCompetitorComparison(client, args) {
84
+ const result = await client.getCompetitorComparison(args.projectId);
85
+ if (result.competitors.length === 0) {
86
+ return `No competitors configured for ${result.brandName}. Add competitors in the Reaudit dashboard to enable comparison.`;
87
+ }
88
+ let response = `## Competitor Comparison for ${result.brandName}\n`;
89
+ response += `Period: Last ${result.period}\n\n`;
90
+ response += `### Your Performance\n`;
91
+ response += `- **Rank:** #${result.yourMetrics.rank} of ${result.yourMetrics.totalCompetitors + 1}\n`;
92
+ response += `- **Mentions:** ${result.yourMetrics.mentions}\n`;
93
+ response += `- **Avg Sentiment:** ${result.yourMetrics.avgSentiment}/100\n`;
94
+ response += `- **Citations:** ${result.yourMetrics.citations}\n\n`;
95
+ response += `### Competitors\n`;
96
+ for (const comp of result.competitors) {
97
+ response += `**${comp.name}** (${comp.domain})\n`;
98
+ response += `- Mentions: ${comp.mentions}\n`;
99
+ response += `- Sentiment: ${comp.avgSentiment}/100\n`;
100
+ response += `- Citations: ${comp.citations}\n\n`;
101
+ }
102
+ return response;
103
+ }
104
+ /**
105
+ * Tool definitions for MCP
106
+ */
107
+ exports.visibilityTools = [
108
+ {
109
+ name: 'get_visibility_score',
110
+ description: 'Get the AI visibility score for a project. Shows how often your brand is mentioned by AI assistants, citation rates, and sentiment analysis.',
111
+ inputSchema: {
112
+ type: 'object',
113
+ properties: {
114
+ projectId: {
115
+ type: 'string',
116
+ description: 'The ID of the project to get visibility score for',
117
+ },
118
+ },
119
+ required: ['projectId'],
120
+ },
121
+ },
122
+ {
123
+ name: 'get_brand_mentions',
124
+ description: 'Get recent brand mentions across AI platforms like ChatGPT, Claude, and Perplexity. Shows the prompts that triggered mentions and sentiment analysis.',
125
+ inputSchema: {
126
+ type: 'object',
127
+ properties: {
128
+ projectId: {
129
+ type: 'string',
130
+ description: 'The ID of the project',
131
+ },
132
+ platform: {
133
+ type: 'string',
134
+ description: 'Filter by platform (chatgpt, claude, perplexity, etc.)',
135
+ },
136
+ limit: {
137
+ type: 'number',
138
+ description: 'Maximum number of mentions to return (default: 20, max: 50)',
139
+ },
140
+ days: {
141
+ type: 'number',
142
+ description: 'Number of days to look back (default: 30, max: 90)',
143
+ },
144
+ },
145
+ required: ['projectId'],
146
+ },
147
+ },
148
+ {
149
+ name: 'get_competitor_comparison',
150
+ description: 'Compare your AI visibility with competitors. Shows ranking, mention counts, and sentiment comparison.',
151
+ inputSchema: {
152
+ type: 'object',
153
+ properties: {
154
+ projectId: {
155
+ type: 'string',
156
+ description: 'The ID of the project to compare',
157
+ },
158
+ },
159
+ required: ['projectId'],
160
+ },
161
+ },
162
+ ];
163
+ //# sourceMappingURL=visibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visibility.js","sourceRoot":"","sources":["../../src/tools/visibility.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAwBH,gDA8BC;AAKD,4CAgCC;AAKD,0DA4BC;AA1HD,6BAAwB;AAGxB,eAAe;AACF,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;CACpF,CAAC,CAAC;AAEU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACvD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;IAClG,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6DAA6D,CAAC;IACpG,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;CAC3F,CAAC,CAAC;AAEU,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;CACnE,CAAC,CAAC;AAEH;;GAEG;AACI,KAAK,UAAU,kBAAkB,CACtC,MAAwB,EACxB,IAA8C;IAE9C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,IAAI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,eAAe,GAAG;IAC7B;QACE,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,8IAA8I;QAC3J,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mDAAmD;iBACjE;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,uJAAuJ;QACpK,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,uBAAuB;iBACrC;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wDAAwD;iBACtE;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6DAA6D;iBAC3E;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oDAAoD;iBAClE;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;IACD;QACE,IAAI,EAAE,2BAA2B;QACjC,WAAW,EAAE,uGAAuG;QACpH,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kCAAkC;iBAChD;aACF;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;SACxB;KACF;CACF,CAAC"}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@reaudit/mcp-server",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for Reaudit AI Visibility Platform - Access your AI visibility data from Claude, Cursor, and other AI assistants",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "reaudit-mcp": "dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "dev": "tsc --watch",
13
+ "start": "node dist/index.js",
14
+ "prepublishOnly": "npm run build",
15
+ "test": "jest"
16
+ },
17
+ "keywords": [
18
+ "mcp",
19
+ "model-context-protocol",
20
+ "reaudit",
21
+ "ai-visibility",
22
+ "seo",
23
+ "claude",
24
+ "cursor",
25
+ "ai-assistant"
26
+ ],
27
+ "author": "Reaudit <support@reaudit.io>",
28
+ "license": "SEE LICENSE IN LICENSE",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/RoseSamaras/reaudit-mcp-server"
32
+ },
33
+ "homepage": "https://reaudit.io/docs/mcp",
34
+ "bugs": {
35
+ "url": "https://github.com/RoseSamaras/reaudit-mcp-server/issues"
36
+ },
37
+ "engines": {
38
+ "node": ">=18.0.0"
39
+ },
40
+ "dependencies": {
41
+ "@modelcontextprotocol/sdk": "^1.0.0",
42
+ "axios": "^1.6.0",
43
+ "zod": "^3.22.0"
44
+ },
45
+ "devDependencies": {
46
+ "@types/node": "^20.0.0",
47
+ "typescript": "^5.3.0"
48
+ },
49
+ "files": [
50
+ "dist",
51
+ "README.md",
52
+ "LICENSE"
53
+ ]
54
+ }