eulerian-marketing-platform 0.2.1__py3-none-any.whl → 0.2.2__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.
- eulerian_marketing_platform/__init__.py +1 -1
- eulerian_marketing_platform/server.py +67 -34
- {eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.2.dist-info}/METADATA +1 -1
- eulerian_marketing_platform-0.2.2.dist-info/RECORD +8 -0
- eulerian_marketing_platform-0.2.1.dist-info/RECORD +0 -8
- {eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.2.dist-info}/LICENSE +0 -0
- {eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.2.dist-info}/WHEEL +0 -0
- {eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.2.dist-info}/entry_points.txt +0 -0
- {eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.2.dist-info}/top_level.txt +0 -0
|
@@ -191,57 +191,90 @@ def main() -> None:
|
|
|
191
191
|
logger.info(f"Timeout: {float(os.environ.get('EMP_TIMEOUT', '300'))}s")
|
|
192
192
|
logger.info("Starting stdio proxy - all remote tools will be available")
|
|
193
193
|
|
|
194
|
+
# Set stdout to unbuffered mode
|
|
195
|
+
sys.stdout.reconfigure(line_buffering=True)
|
|
196
|
+
|
|
194
197
|
try:
|
|
195
198
|
# Read from stdin line by line
|
|
196
|
-
|
|
197
|
-
line = line.strip()
|
|
198
|
-
if not line:
|
|
199
|
-
continue
|
|
200
|
-
|
|
199
|
+
while True:
|
|
201
200
|
try:
|
|
202
|
-
|
|
203
|
-
request_data = json.loads(line)
|
|
201
|
+
line = sys.stdin.readline()
|
|
204
202
|
|
|
205
|
-
#
|
|
206
|
-
|
|
203
|
+
# Check for EOF
|
|
204
|
+
if not line:
|
|
205
|
+
logger.info("EOF received on stdin, exiting")
|
|
206
|
+
break
|
|
207
207
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
logger.info(" Response forwarded [OK]")
|
|
208
|
+
line = line.strip()
|
|
209
|
+
if not line:
|
|
210
|
+
continue
|
|
212
211
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
212
|
+
try:
|
|
213
|
+
# Parse request
|
|
214
|
+
request_data = json.loads(line)
|
|
215
|
+
|
|
216
|
+
# Forward to remote server
|
|
217
|
+
response_data = forward_request(request_data)
|
|
218
|
+
|
|
219
|
+
# Send response to stdout
|
|
220
|
+
response_json = json.dumps(response_data)
|
|
221
|
+
print(response_json, flush=True)
|
|
222
|
+
sys.stdout.flush() # Extra flush for safety
|
|
223
|
+
logger.info(" Response forwarded [OK]")
|
|
224
|
+
|
|
225
|
+
except json.JSONDecodeError as e:
|
|
226
|
+
logger.error(f"ERROR: Invalid JSON in request - {e}")
|
|
227
|
+
logger.error(f" Problematic line: {line[:200]}")
|
|
228
|
+
error_response = {
|
|
229
|
+
"jsonrpc": "2.0",
|
|
230
|
+
"id": None,
|
|
231
|
+
"error": {
|
|
232
|
+
"code": -32700,
|
|
233
|
+
"message": f"Parse error: {str(e)}"
|
|
234
|
+
}
|
|
221
235
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
236
|
+
print(json.dumps(error_response), flush=True)
|
|
237
|
+
sys.stdout.flush()
|
|
238
|
+
|
|
239
|
+
except Exception as e:
|
|
240
|
+
logger.error(f"ERROR: Unexpected error processing request - {str(e)}")
|
|
241
|
+
import traceback
|
|
242
|
+
logger.error(f"Traceback: {traceback.format_exc()}")
|
|
243
|
+
error_response = {
|
|
244
|
+
"jsonrpc": "2.0",
|
|
245
|
+
"id": None,
|
|
246
|
+
"error": {
|
|
247
|
+
"code": -32000,
|
|
248
|
+
"message": f"Error: {str(e)}"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
print(json.dumps(error_response), flush=True)
|
|
252
|
+
sys.stdout.flush()
|
|
253
|
+
|
|
254
|
+
except EOFError:
|
|
255
|
+
logger.info("EOF on stdin, exiting")
|
|
256
|
+
break
|
|
257
|
+
except KeyboardInterrupt:
|
|
258
|
+
logger.info("Server stopped by user")
|
|
259
|
+
break
|
|
225
260
|
except Exception as e:
|
|
226
|
-
logger.error(f"ERROR
|
|
261
|
+
logger.error(f"ERROR in main loop: {str(e)}")
|
|
227
262
|
import traceback
|
|
228
263
|
logger.error(f"Traceback: {traceback.format_exc()}")
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
"id": None,
|
|
232
|
-
"error": {
|
|
233
|
-
"code": -32000,
|
|
234
|
-
"message": f"Error: {str(e)}"
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
print(json.dumps(error_response), flush=True)
|
|
264
|
+
# Don't break - try to continue
|
|
265
|
+
continue
|
|
238
266
|
|
|
239
267
|
except KeyboardInterrupt:
|
|
240
268
|
logger.info("Server stopped by user")
|
|
241
269
|
except Exception as e:
|
|
242
270
|
logger.error(f"Server error: {str(e)}")
|
|
271
|
+
import traceback
|
|
272
|
+
logger.error(f"Traceback: {traceback.format_exc()}")
|
|
243
273
|
raise
|
|
274
|
+
finally:
|
|
275
|
+
logger.info("=== EULERIAN MCP PROXY SHUTDOWN ===")
|
|
244
276
|
|
|
245
277
|
|
|
246
278
|
if __name__ == "__main__":
|
|
247
279
|
main()
|
|
280
|
+
|
{eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.2.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: eulerian-marketing-platform
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
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=nixrhgx4yNj_Iy4OorDr_UTciCpEXPjuJoCLngubna8,428
|
|
2
|
+
eulerian_marketing_platform/server.py,sha256=FnuFvs_yCIaHfDT5Q8LJb--88gZ58iUYQ7bNYYMFRYg,9710
|
|
3
|
+
eulerian_marketing_platform-0.2.2.dist-info/LICENSE,sha256=eIqBqE_fRsqQJ8F-2v0e-8WzZqdshsCqnzmqLAWrNHU,1078
|
|
4
|
+
eulerian_marketing_platform-0.2.2.dist-info/METADATA,sha256=AjQoC4KAd5cGFwGagKSUohxzzoCY9JGGJT5KUlVTxu0,12111
|
|
5
|
+
eulerian_marketing_platform-0.2.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
6
|
+
eulerian_marketing_platform-0.2.2.dist-info/entry_points.txt,sha256=rrPZptATSS9PUtH9gzCYq0WuP6eahkF-DkdUP1FaYfk,88
|
|
7
|
+
eulerian_marketing_platform-0.2.2.dist-info/top_level.txt,sha256=nidh3T6fw-mLjUqZwQ8AiMScS4usuH0WXW4ZgG4HYCo,28
|
|
8
|
+
eulerian_marketing_platform-0.2.2.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
eulerian_marketing_platform/__init__.py,sha256=HibL07V6VMhqFcQSFGJm8ogUu9Qcfl2SSenCfdKtBFY,428
|
|
2
|
-
eulerian_marketing_platform/server.py,sha256=y1vy-LvSjG18dvDv65hO875s_7vogbb5bdNwTetKKcU,8335
|
|
3
|
-
eulerian_marketing_platform-0.2.1.dist-info/LICENSE,sha256=eIqBqE_fRsqQJ8F-2v0e-8WzZqdshsCqnzmqLAWrNHU,1078
|
|
4
|
-
eulerian_marketing_platform-0.2.1.dist-info/METADATA,sha256=WDzHWUPBn0P6MC3PhFXOx70BRGa2xGHIdwoycImLCaA,12111
|
|
5
|
-
eulerian_marketing_platform-0.2.1.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
6
|
-
eulerian_marketing_platform-0.2.1.dist-info/entry_points.txt,sha256=rrPZptATSS9PUtH9gzCYq0WuP6eahkF-DkdUP1FaYfk,88
|
|
7
|
-
eulerian_marketing_platform-0.2.1.dist-info/top_level.txt,sha256=nidh3T6fw-mLjUqZwQ8AiMScS4usuH0WXW4ZgG4HYCo,28
|
|
8
|
-
eulerian_marketing_platform-0.2.1.dist-info/RECORD,,
|
{eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.2.dist-info}/LICENSE
RENAMED
|
File without changes
|
{eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.2.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|