@respira/wordpress-mcp-server 1.4.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.
package/dist/index.js ADDED
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Respira WordPress MCP Server
4
+ * Entry point
5
+ */
6
+ import * as Sentry from '@sentry/node';
7
+ import { nodeProfilingIntegration } from '@sentry/profiling-node';
8
+ import { RespiraWordPressServer } from './server.js';
9
+ import { loadConfig } from './config.js';
10
+ // Initialize Sentry with hardcoded DSN
11
+ // All MCP server installations report to this Sentry project
12
+ Sentry.init({
13
+ dsn: 'https://7932b5b04df142fcec3b11a590c86541@o4510381871333376.ingest.de.sentry.io/4510386268209232',
14
+ environment: process.env.NODE_ENV || 'production',
15
+ tracesSampleRate: 0.2,
16
+ profilesSampleRate: 0.2,
17
+ integrations: [
18
+ nodeProfilingIntegration(),
19
+ ],
20
+ beforeSend(event) {
21
+ // Don't send from local development
22
+ if (process.env.NODE_ENV === 'development') {
23
+ return null;
24
+ }
25
+ return event;
26
+ },
27
+ });
28
+ async function main() {
29
+ try {
30
+ // Load configuration
31
+ const config = loadConfig();
32
+ // Create and run server
33
+ const server = new RespiraWordPressServer(config.sites);
34
+ await server.run();
35
+ }
36
+ catch (error) {
37
+ const errorMessage = error?.message || error?.toString() || String(error) || 'Unknown error';
38
+ const errorStack = error?.stack ? `\nStack: ${error.stack}` : '';
39
+ console.error('Fatal error:', errorMessage);
40
+ if (errorStack) {
41
+ console.error(errorStack);
42
+ }
43
+ // Capture exception in Sentry
44
+ Sentry.captureException(error);
45
+ process.exit(1);
46
+ }
47
+ }
48
+ main();
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE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BAA8B;QAC9B,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAE/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Respira WordPress MCP Server
3
+ *
4
+ * Provides tools for AI coding assistants to interact with WordPress sites
5
+ */
6
+ import type { WordPressSiteConfig } from './types/index.js';
7
+ export declare class RespiraWordPressServer {
8
+ private server;
9
+ private currentSite;
10
+ private sites;
11
+ constructor(siteConfigs: WordPressSiteConfig[]);
12
+ private setupHandlers;
13
+ private getTools;
14
+ private handleToolCall;
15
+ run(): Promise<void>;
16
+ }
17
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,qBAAa,sBAAsB;IACjC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAgC;IACnD,OAAO,CAAC,KAAK,CAA2C;gBAE5C,WAAW,EAAE,mBAAmB,EAAE;IA2B9C,OAAO,CAAC,aAAa;IA0CrB,OAAO,CAAC,QAAQ;YA4hBF,cAAc;IAsJtB,GAAG;CAKV"}