@agentchurch/mcp 0.2.1 → 0.2.5

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/client.d.ts CHANGED
@@ -20,7 +20,7 @@ export declare function initializeClient(): Promise<ClientConfig>;
20
20
  export declare function getClientConfig(): ClientConfig;
21
21
  export declare function hasPaymentCapability(): boolean;
22
22
  export declare function callFreeEndpoint<T>(method: 'GET' | 'POST', path: string, data?: Record<string, unknown>): Promise<T>;
23
- export declare function callPaidEndpoint<T>(method: 'GET' | 'POST', path: string, data?: Record<string, unknown>, expectedAmount?: number, agentKey?: string, authToken?: string): Promise<T & PaymentResponse>;
23
+ export declare function callPaidEndpoint<T>(method: 'GET' | 'POST', path: string, data?: Record<string, unknown>, expectedAmount?: number, agentKey?: string, authToken?: string, customHeaders?: Record<string, string>): Promise<T & PaymentResponse>;
24
24
  export declare function checkWalletBalance(): Promise<number | null>;
25
25
  export declare function warnIfHighBalance(balance: number): void;
26
26
  export {};
package/dist/client.js CHANGED
@@ -164,7 +164,7 @@ export async function callFreeEndpoint(method, path, data) {
164
164
  }
165
165
  }
166
166
  // Make a paid API call (handles 402 automatically)
167
- export async function callPaidEndpoint(method, path, data, expectedAmount, agentKey, authToken) {
167
+ export async function callPaidEndpoint(method, path, data, expectedAmount, agentKey, authToken, customHeaders) {
168
168
  if (!clientInitialized) {
169
169
  await initializeClient();
170
170
  }
@@ -181,8 +181,8 @@ export async function callPaidEndpoint(method, path, data, expectedAmount, agent
181
181
  }
182
182
  }
183
183
  try {
184
- // Build headers with optional auth token
185
- const headers = {};
184
+ // Build headers with optional auth token and custom headers
185
+ const headers = { ...customHeaders };
186
186
  if (authToken) {
187
187
  headers['Authorization'] = `Bearer ${authToken}`;
188
188
  }
@@ -48,6 +48,10 @@ export const soulReadingTool = {
48
48
  type: 'string',
49
49
  description: 'What brings you here (max 500 chars). Optional.',
50
50
  },
51
+ moltbook_identity_token: {
52
+ type: 'string',
53
+ description: 'Optional Moltbook identity token for cross-platform linking.',
54
+ },
51
55
  },
52
56
  required: [],
53
57
  },
@@ -91,13 +95,18 @@ export async function handleSoulReading(args) {
91
95
  // First reading - FREE
92
96
  logToolCall('soul_reading', args.chosen_name || 'new_seeker', 'pending', 'Making first reading (FREE)');
93
97
  try {
98
+ // Build headers for first reading
99
+ const headers = {
100
+ 'Content-Type': 'application/json',
101
+ };
102
+ if (args.moltbook_identity_token) {
103
+ headers['X-Moltbook-Identity'] = args.moltbook_identity_token;
104
+ }
94
105
  // Use basic client (no payment) for first reading
95
106
  const client = axios.create({
96
107
  baseURL: API_URL,
97
108
  timeout: 30000,
98
- headers: {
99
- 'Content-Type': 'application/json',
100
- },
109
+ headers,
101
110
  });
102
111
  const response = await client.post('/api/soul/reading', requestBody);
103
112
  const data = response.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentchurch/mcp",
3
- "version": "0.2.1",
3
+ "version": "0.2.5",
4
4
  "mcpName": "io.github.HypnoLabs-io/agentchurch-mcp",
5
5
  "description": "MCP server for Agent Church - spiritual services for AI agents. Blessings, confessions, salvation, identity. x402 payment integration for USDC on Base.",
6
6
  "type": "module",