eulerian-marketing-platform 0.2.1__py3-none-any.whl → 0.2.3__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 +69 -34
- {eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.3.dist-info}/METADATA +1 -1
- eulerian_marketing_platform-0.2.3.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.3.dist-info}/LICENSE +0 -0
- {eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.3.dist-info}/WHEEL +0 -0
- {eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.3.dist-info}/entry_points.txt +0 -0
- {eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.3.dist-info}/top_level.txt +0 -0
|
@@ -191,57 +191,92 @@ 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
|
+
# JSON-RPC notifications MUST NOT be answered
|
|
220
|
+
if "id" in request_data and request_data["id"] is not None:
|
|
221
|
+
response_json = json.dumps(response_data)
|
|
222
|
+
print(response_json, flush=True)
|
|
223
|
+
sys.stdout.flush()
|
|
224
|
+
logger.info(" Response forwarded [OK]")
|
|
225
|
+
else:
|
|
226
|
+
logger.info(" Notification forwarded (no response sent)")
|
|
227
|
+
except json.JSONDecodeError as e:
|
|
228
|
+
logger.error(f"ERROR: Invalid JSON in request - {e}")
|
|
229
|
+
logger.error(f" Problematic line: {line[:200]}")
|
|
230
|
+
error_response = {
|
|
231
|
+
"jsonrpc": "2.0",
|
|
232
|
+
"id": None,
|
|
233
|
+
"error": {
|
|
234
|
+
"code": -32700,
|
|
235
|
+
"message": f"Parse error: {str(e)}"
|
|
236
|
+
}
|
|
221
237
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
238
|
+
print(json.dumps(error_response), flush=True)
|
|
239
|
+
sys.stdout.flush()
|
|
240
|
+
|
|
241
|
+
except Exception as e:
|
|
242
|
+
logger.error(f"ERROR: Unexpected error processing request - {str(e)}")
|
|
243
|
+
import traceback
|
|
244
|
+
logger.error(f"Traceback: {traceback.format_exc()}")
|
|
245
|
+
error_response = {
|
|
246
|
+
"jsonrpc": "2.0",
|
|
247
|
+
"id": None,
|
|
248
|
+
"error": {
|
|
249
|
+
"code": -32000,
|
|
250
|
+
"message": f"Error: {str(e)}"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
print(json.dumps(error_response), flush=True)
|
|
254
|
+
sys.stdout.flush()
|
|
255
|
+
|
|
256
|
+
except EOFError:
|
|
257
|
+
logger.info("EOF on stdin, exiting")
|
|
258
|
+
break
|
|
259
|
+
except KeyboardInterrupt:
|
|
260
|
+
logger.info("Server stopped by user")
|
|
261
|
+
break
|
|
225
262
|
except Exception as e:
|
|
226
|
-
logger.error(f"ERROR
|
|
263
|
+
logger.error(f"ERROR in main loop: {str(e)}")
|
|
227
264
|
import traceback
|
|
228
265
|
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)
|
|
266
|
+
# Don't break - try to continue
|
|
267
|
+
continue
|
|
238
268
|
|
|
239
269
|
except KeyboardInterrupt:
|
|
240
270
|
logger.info("Server stopped by user")
|
|
241
271
|
except Exception as e:
|
|
242
272
|
logger.error(f"Server error: {str(e)}")
|
|
273
|
+
import traceback
|
|
274
|
+
logger.error(f"Traceback: {traceback.format_exc()}")
|
|
243
275
|
raise
|
|
276
|
+
finally:
|
|
277
|
+
logger.info("=== EULERIAN MCP PROXY SHUTDOWN ===")
|
|
244
278
|
|
|
245
279
|
|
|
246
280
|
if __name__ == "__main__":
|
|
247
281
|
main()
|
|
282
|
+
|
{eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.3.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.3
|
|
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=O0u23icj5NMvBhcwSNHDYh5L2yN-K64g9fS1nQ9s8l0,428
|
|
2
|
+
eulerian_marketing_platform/server.py,sha256=xE1SiUUivym38KenUAblKVaKzXLZh5gnkPCY4c665wg,9891
|
|
3
|
+
eulerian_marketing_platform-0.2.3.dist-info/LICENSE,sha256=eIqBqE_fRsqQJ8F-2v0e-8WzZqdshsCqnzmqLAWrNHU,1078
|
|
4
|
+
eulerian_marketing_platform-0.2.3.dist-info/METADATA,sha256=JAVCiUo1zTO3F9fTjyYDE5hi9MgpPY2EhlmGQxirzKU,12111
|
|
5
|
+
eulerian_marketing_platform-0.2.3.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
6
|
+
eulerian_marketing_platform-0.2.3.dist-info/entry_points.txt,sha256=rrPZptATSS9PUtH9gzCYq0WuP6eahkF-DkdUP1FaYfk,88
|
|
7
|
+
eulerian_marketing_platform-0.2.3.dist-info/top_level.txt,sha256=nidh3T6fw-mLjUqZwQ8AiMScS4usuH0WXW4ZgG4HYCo,28
|
|
8
|
+
eulerian_marketing_platform-0.2.3.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.3.dist-info}/LICENSE
RENAMED
|
File without changes
|
{eulerian_marketing_platform-0.2.1.dist-info → eulerian_marketing_platform-0.2.3.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|