eulerian-marketing-platform 0.2.6__py3-none-any.whl → 0.2.7__py3-none-any.whl

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.
@@ -4,7 +4,7 @@ This package provides a Model Context Protocol (MCP) server that enables
4
4
  AI assistants to interact with Eulerian Marketing Platform APIs.
5
5
  """
6
6
 
7
- __version__ = "0.2.6"
7
+ __version__ = "0.2.7"
8
8
  __author__ = "Eulerian Technologies"
9
9
  __all__ = []
10
10
 
@@ -103,11 +103,7 @@ def forward_request(request_data: dict) -> dict:
103
103
  # Handle HTTP 204 No Content (common for notifications)
104
104
  if response.status_code == 204:
105
105
  logger.info(" HTTP 204 No Content - creating empty success response")
106
- return {
107
- "jsonrpc": "2.0",
108
- "id": request_id,
109
- "result": {}
110
- }
106
+ return None
111
107
 
112
108
  if response.status_code != 200:
113
109
  error_msg = f"HTTP {response.status_code}: {response.reason_phrase}"
@@ -277,18 +273,32 @@ def main() -> None:
277
273
  # Forward to remote server
278
274
  response_data = forward_request(request_data)
279
275
 
280
- # Always send response back to Claude Desktop (MCP requires this)
281
- response_json = json.dumps(response_data)
282
- print(response_json, flush=True)
283
- sys.stdout.flush()
284
- logger.info(" Response forwarded [OK]")
276
+ # Only send response if response_data is not None (handles HTTP 204 notifications)
277
+ if response_data is not None:
278
+ response_json = json.dumps(response_data)
279
+ print(response_json, flush=True)
280
+ sys.stdout.flush()
281
+ logger.info(" Response forwarded [OK]")
282
+ else:
283
+ logger.info(" No response sent (notification or HTTP 204)")
285
284
 
286
285
  except json.JSONDecodeError as e:
287
286
  logger.error(f"ERROR: Invalid JSON in request - {e}")
288
287
  logger.error(f" Problematic line: {line[:200]}")
288
+
289
+ # Try to extract request_id from partial JSON, fallback to None
290
+ request_id = None
291
+ try:
292
+ # Attempt to get ID from partial JSON
293
+ if '"id"' in line:
294
+ partial = json.loads(line.split('"method"')[0] + '"}')
295
+ request_id = partial.get("id")
296
+ except:
297
+ pass
298
+
289
299
  error_response = {
290
300
  "jsonrpc": "2.0",
291
- "id": None,
301
+ "id": request_id,
292
302
  "error": {
293
303
  "code": -32700,
294
304
  "message": f"Parse error: {str(e)}"
@@ -301,9 +311,16 @@ def main() -> None:
301
311
  logger.error(f"ERROR: Unexpected error processing request - {str(e)}")
302
312
  import traceback
303
313
  logger.error(f"Traceback: {traceback.format_exc()}")
314
+
315
+ # Try to get request_id if request_data was parsed successfully
316
+ try:
317
+ request_id = request_data.get("id") if 'request_data' in locals() else None
318
+ except:
319
+ request_id = None
320
+
304
321
  error_response = {
305
322
  "jsonrpc": "2.0",
306
- "id": None,
323
+ "id": request_id,
307
324
  "error": {
308
325
  "code": -32000,
309
326
  "message": f"Error: {str(e)}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eulerian-marketing-platform
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: MCP server for Eulerian Marketing Platform - enables AI assistants to interact with Eulerian's marketing analytics and campaign management APIs
5
5
  Author-email: Eulerian Technologies <mathieu@eulerian.com>
6
6
  License: MIT
@@ -0,0 +1,8 @@
1
+ eulerian_marketing_platform/__init__.py,sha256=HCpqdNcYBPdxvYqqIALnHKB4fKV0LQu9EqB2i9VYGW4,428
2
+ eulerian_marketing_platform/server.py,sha256=p32McUsqrDcCrczMVurCQzfnZGrYVaz3yUsmxOTbeCM,14235
3
+ eulerian_marketing_platform-0.2.7.dist-info/LICENSE,sha256=eIqBqE_fRsqQJ8F-2v0e-8WzZqdshsCqnzmqLAWrNHU,1078
4
+ eulerian_marketing_platform-0.2.7.dist-info/METADATA,sha256=r2vU63lIHznbqlcHe0NIDtg4Aif4iuH7k5QsbEWcGtM,12169
5
+ eulerian_marketing_platform-0.2.7.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
+ eulerian_marketing_platform-0.2.7.dist-info/entry_points.txt,sha256=rrPZptATSS9PUtH9gzCYq0WuP6eahkF-DkdUP1FaYfk,88
7
+ eulerian_marketing_platform-0.2.7.dist-info/top_level.txt,sha256=nidh3T6fw-mLjUqZwQ8AiMScS4usuH0WXW4ZgG4HYCo,28
8
+ eulerian_marketing_platform-0.2.7.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- eulerian_marketing_platform/__init__.py,sha256=Rchunx1TsnHjirVTZtfMlg6LHXlQupKPi-tYLVZTI00,428
2
- eulerian_marketing_platform/server.py,sha256=GBuksSr38MWXKNR36mbHaMz8589eElGM6qGt2-zOJdw,13321
3
- eulerian_marketing_platform-0.2.6.dist-info/LICENSE,sha256=eIqBqE_fRsqQJ8F-2v0e-8WzZqdshsCqnzmqLAWrNHU,1078
4
- eulerian_marketing_platform-0.2.6.dist-info/METADATA,sha256=VR6nemyIP3yUTR_bbLV1V9K5e48M9WVO3zOssc1jIpM,12169
5
- eulerian_marketing_platform-0.2.6.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
6
- eulerian_marketing_platform-0.2.6.dist-info/entry_points.txt,sha256=rrPZptATSS9PUtH9gzCYq0WuP6eahkF-DkdUP1FaYfk,88
7
- eulerian_marketing_platform-0.2.6.dist-info/top_level.txt,sha256=nidh3T6fw-mLjUqZwQ8AiMScS4usuH0WXW4ZgG4HYCo,28
8
- eulerian_marketing_platform-0.2.6.dist-info/RECORD,,