sienge-ecbiesek-mcp 1.2.1__py3-none-any.whl → 1.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.

Potentially problematic release.


This version of sienge-ecbiesek-mcp might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sienge-ecbiesek-mcp
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: 🏗️ Model Context Protocol (MCP) server for Sienge API integration - Brazilian construction ERP system. Connect Claude AI to Sienge with 50+ powerful tools for comprehensive business management including financials, projects, and operations.
5
5
  Author-email: ECBIESEK <ti@ecbiesek.com>
6
6
  License: MIT
@@ -0,0 +1,11 @@
1
+ sienge_ecbiesek_mcp-1.2.2.dist-info/licenses/LICENSE,sha256=leWD46QLXsQ43M8fE_KgOo5Sf0YB9_X8EVqGdV0Dsc0,1101
2
+ sienge_mcp/__init__.py,sha256=LgXn5BfGLTWmLi5p1JbweikNexTc_1wLHBfGJBxwX7M,297
3
+ sienge_mcp/metadata.py,sha256=wN_XSjUkHJ0QA38CaCtAR7ImsYndSvBPrTmRe8gSLdM,1109
4
+ sienge_mcp/server.py,sha256=2pAJcpF29bjOM4rd6rc-yzWYIdGWjYr5BlVc3pxsD8E,102160
5
+ sienge_mcp/server2.py,sha256=2pAJcpF29bjOM4rd6rc-yzWYIdGWjYr5BlVc3pxsD8E,102160
6
+ sienge_mcp/utils/logger.py,sha256=3Ty7SGcpxAC3vruoRJEK78iZb7wxnDv__EESYQrIMB4,5712
7
+ sienge_ecbiesek_mcp-1.2.2.dist-info/METADATA,sha256=8s5o0xPW1E4d-bp9qL7VZ08bx1JgfhbgTOFIFtXTYdo,11406
8
+ sienge_ecbiesek_mcp-1.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ sienge_ecbiesek_mcp-1.2.2.dist-info/entry_points.txt,sha256=jxEu6gvTw3ci0mjDfqbi0rBLRpeuscwwRk9-H-UOnO8,63
10
+ sienge_ecbiesek_mcp-1.2.2.dist-info/top_level.txt,sha256=FCvuhB9JQPKGY0Q8aKoVc7akqG5htoJyfj-eJvVUmWM,11
11
+ sienge_ecbiesek_mcp-1.2.2.dist-info/RECORD,,
sienge_mcp/__init__.py CHANGED
@@ -3,7 +3,7 @@ Sienge MCP Server Package
3
3
  Model Context Protocol integration for Sienge API
4
4
  """
5
5
 
6
- __version__ = "1.0.0"
7
- __author__ = "Sienge MCP Contributors"
8
- __email__ = "contributors@sienge-mcp.com"
9
- __description__ = "Sienge MCP Server - Model Context Protocol integration for Sienge API"
6
+ __version__ = "1.2.2"
7
+ __author__ = "ECBIESEK"
8
+ __email__ = "ti@ecbiesek.com"
9
+ __description__ = "🏗️ Model Context Protocol (MCP) server for Sienge API integration - Brazilian construction ERP system"
sienge_mcp/server.py CHANGED
@@ -2494,13 +2494,50 @@ async def search_sienge_financial_data(
2494
2494
  }
2495
2495
 
2496
2496
 
2497
+ async def _svc_test_connection() -> Dict:
2498
+ """Serviço interno: testar conexão com a API do Sienge"""
2499
+ try:
2500
+ # Usar serviço interno
2501
+ result = await _svc_get_customer_types()
2502
+
2503
+ if result["success"]:
2504
+ auth_method = "Bearer Token" if SIENGE_API_KEY else "Basic Auth"
2505
+ return {
2506
+ "success": True,
2507
+ "message": "✅ Conexão com API do Sienge estabelecida com sucesso!",
2508
+ "api_status": "Online",
2509
+ "auth_method": auth_method,
2510
+ "timestamp": datetime.now().isoformat(),
2511
+ "request_id": result.get("request_id"),
2512
+ "latency_ms": result.get("latency_ms"),
2513
+ "cache": result.get("cache")
2514
+ }
2515
+ else:
2516
+ return {
2517
+ "success": False,
2518
+ "message": "❌ Falha ao conectar com API do Sienge",
2519
+ "error": result.get("error"),
2520
+ "details": result.get("message"),
2521
+ "timestamp": datetime.now().isoformat(),
2522
+ "request_id": result.get("request_id")
2523
+ }
2524
+ except Exception as e:
2525
+ return {
2526
+ "success": False,
2527
+ "message": "❌ Erro ao testar conexão",
2528
+ "error": str(e),
2529
+ "timestamp": datetime.now().isoformat(),
2530
+ }
2531
+
2532
+
2497
2533
  @mcp.tool
2498
- async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2499
- """
2500
- Obtém um resumo tipo dashboard com informações gerais do Sienge
2501
- Útil para visão geral rápida do sistema
2502
- """
2503
-
2534
+ async def test_sienge_connection(_meta: Optional[Dict] = None) -> Dict:
2535
+ """Testa a conexão com a API do Sienge"""
2536
+ return await _svc_test_connection()
2537
+
2538
+
2539
+ async def _svc_get_dashboard_summary() -> Dict:
2540
+ """Serviço interno: obter resumo do dashboard"""
2504
2541
  # Data atual e períodos
2505
2542
  today = datetime.now()
2506
2543
  current_month_start = today.replace(day=1).strftime("%Y-%m-%d")
@@ -2511,7 +2548,7 @@ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2511
2548
 
2512
2549
  # 1. Testar conexão
2513
2550
  try:
2514
- connection_test = await test_sienge_connection()
2551
+ connection_test = await _svc_test_connection()
2515
2552
  dashboard_data["connection"] = connection_test
2516
2553
  except Exception as e:
2517
2554
  errors.append(f"Teste de conexão: {str(e)}")
@@ -2519,16 +2556,14 @@ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2519
2556
 
2520
2557
  # 2. Contar clientes (amostra)
2521
2558
  try:
2522
- # CORRIGIDO: Usar serviço interno
2523
2559
  customers_result = await _svc_get_customers(limit=1)
2524
- dashboard_data["customers"] = {"available": customers_result["success"]}
2560
+ dashboard_data["customers_available"] = customers_result["success"]
2525
2561
  except Exception as e:
2526
2562
  errors.append(f"Clientes: {str(e)}")
2527
- dashboard_data["customers"] = {"available": False}
2563
+ dashboard_data["customers_available"] = False
2528
2564
 
2529
2565
  # 3. Contar projetos (amostra)
2530
2566
  try:
2531
- # CORRIGIDO: Usar serviço interno
2532
2567
  projects_result = await _svc_get_projects(limit=5)
2533
2568
  if projects_result["success"]:
2534
2569
  data = projects_result["data"]
@@ -2548,7 +2583,6 @@ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2548
2583
 
2549
2584
  # 4. Títulos a pagar do mês atual
2550
2585
  try:
2551
- # CORRIGIDO: Usar serviço interno
2552
2586
  bills_result = await _svc_get_bills(
2553
2587
  start_date=current_month_start,
2554
2588
  end_date=current_month_end,
@@ -2572,7 +2606,6 @@ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2572
2606
 
2573
2607
  # 5. Tipos de clientes
2574
2608
  try:
2575
- # CORRIGIDO: Usar serviço interno
2576
2609
  customer_types_result = await _svc_get_customer_types()
2577
2610
  if customer_types_result["success"]:
2578
2611
  data = customer_types_result["data"]
@@ -2609,6 +2642,15 @@ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2609
2642
  }
2610
2643
 
2611
2644
 
2645
+ @mcp.tool
2646
+ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2647
+ """
2648
+ Obtém um resumo tipo dashboard com informações gerais do Sienge
2649
+ Útil para visão geral rápida do sistema
2650
+ """
2651
+ return await _svc_get_dashboard_summary()
2652
+
2653
+
2612
2654
  # ============ UTILITÁRIOS ============
2613
2655
 
2614
2656
 
sienge_mcp/server2.py CHANGED
@@ -2494,13 +2494,50 @@ async def search_sienge_financial_data(
2494
2494
  }
2495
2495
 
2496
2496
 
2497
+ async def _svc_test_connection() -> Dict:
2498
+ """Serviço interno: testar conexão com a API do Sienge"""
2499
+ try:
2500
+ # Usar serviço interno
2501
+ result = await _svc_get_customer_types()
2502
+
2503
+ if result["success"]:
2504
+ auth_method = "Bearer Token" if SIENGE_API_KEY else "Basic Auth"
2505
+ return {
2506
+ "success": True,
2507
+ "message": "✅ Conexão com API do Sienge estabelecida com sucesso!",
2508
+ "api_status": "Online",
2509
+ "auth_method": auth_method,
2510
+ "timestamp": datetime.now().isoformat(),
2511
+ "request_id": result.get("request_id"),
2512
+ "latency_ms": result.get("latency_ms"),
2513
+ "cache": result.get("cache")
2514
+ }
2515
+ else:
2516
+ return {
2517
+ "success": False,
2518
+ "message": "❌ Falha ao conectar com API do Sienge",
2519
+ "error": result.get("error"),
2520
+ "details": result.get("message"),
2521
+ "timestamp": datetime.now().isoformat(),
2522
+ "request_id": result.get("request_id")
2523
+ }
2524
+ except Exception as e:
2525
+ return {
2526
+ "success": False,
2527
+ "message": "❌ Erro ao testar conexão",
2528
+ "error": str(e),
2529
+ "timestamp": datetime.now().isoformat(),
2530
+ }
2531
+
2532
+
2497
2533
  @mcp.tool
2498
- async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2499
- """
2500
- Obtém um resumo tipo dashboard com informações gerais do Sienge
2501
- Útil para visão geral rápida do sistema
2502
- """
2503
-
2534
+ async def test_sienge_connection(_meta: Optional[Dict] = None) -> Dict:
2535
+ """Testa a conexão com a API do Sienge"""
2536
+ return await _svc_test_connection()
2537
+
2538
+
2539
+ async def _svc_get_dashboard_summary() -> Dict:
2540
+ """Serviço interno: obter resumo do dashboard"""
2504
2541
  # Data atual e períodos
2505
2542
  today = datetime.now()
2506
2543
  current_month_start = today.replace(day=1).strftime("%Y-%m-%d")
@@ -2511,7 +2548,7 @@ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2511
2548
 
2512
2549
  # 1. Testar conexão
2513
2550
  try:
2514
- connection_test = await test_sienge_connection()
2551
+ connection_test = await _svc_test_connection()
2515
2552
  dashboard_data["connection"] = connection_test
2516
2553
  except Exception as e:
2517
2554
  errors.append(f"Teste de conexão: {str(e)}")
@@ -2519,16 +2556,14 @@ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2519
2556
 
2520
2557
  # 2. Contar clientes (amostra)
2521
2558
  try:
2522
- # CORRIGIDO: Usar serviço interno
2523
2559
  customers_result = await _svc_get_customers(limit=1)
2524
- dashboard_data["customers"] = {"available": customers_result["success"]}
2560
+ dashboard_data["customers_available"] = customers_result["success"]
2525
2561
  except Exception as e:
2526
2562
  errors.append(f"Clientes: {str(e)}")
2527
- dashboard_data["customers"] = {"available": False}
2563
+ dashboard_data["customers_available"] = False
2528
2564
 
2529
2565
  # 3. Contar projetos (amostra)
2530
2566
  try:
2531
- # CORRIGIDO: Usar serviço interno
2532
2567
  projects_result = await _svc_get_projects(limit=5)
2533
2568
  if projects_result["success"]:
2534
2569
  data = projects_result["data"]
@@ -2548,7 +2583,6 @@ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2548
2583
 
2549
2584
  # 4. Títulos a pagar do mês atual
2550
2585
  try:
2551
- # CORRIGIDO: Usar serviço interno
2552
2586
  bills_result = await _svc_get_bills(
2553
2587
  start_date=current_month_start,
2554
2588
  end_date=current_month_end,
@@ -2572,7 +2606,6 @@ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2572
2606
 
2573
2607
  # 5. Tipos de clientes
2574
2608
  try:
2575
- # CORRIGIDO: Usar serviço interno
2576
2609
  customer_types_result = await _svc_get_customer_types()
2577
2610
  if customer_types_result["success"]:
2578
2611
  data = customer_types_result["data"]
@@ -2609,6 +2642,15 @@ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2609
2642
  }
2610
2643
 
2611
2644
 
2645
+ @mcp.tool
2646
+ async def get_sienge_dashboard_summary(_meta: Optional[Dict] = None) -> Dict:
2647
+ """
2648
+ Obtém um resumo tipo dashboard com informações gerais do Sienge
2649
+ Útil para visão geral rápida do sistema
2650
+ """
2651
+ return await _svc_get_dashboard_summary()
2652
+
2653
+
2612
2654
  # ============ UTILITÁRIOS ============
2613
2655
 
2614
2656
 
@@ -1,11 +0,0 @@
1
- sienge_ecbiesek_mcp-1.2.1.dist-info/licenses/LICENSE,sha256=leWD46QLXsQ43M8fE_KgOo5Sf0YB9_X8EVqGdV0Dsc0,1101
2
- sienge_mcp/__init__.py,sha256=Pjl4hgBCWhVJ_BBZXaP7SuZfH7Z1JWZbSs8MV5sUle8,287
3
- sienge_mcp/metadata.py,sha256=wN_XSjUkHJ0QA38CaCtAR7ImsYndSvBPrTmRe8gSLdM,1109
4
- sienge_mcp/server.py,sha256=12mFPM0it5dFlzykTxOgNH370AB-tjrQ67UjBoyFoZ8,100646
5
- sienge_mcp/server2.py,sha256=12mFPM0it5dFlzykTxOgNH370AB-tjrQ67UjBoyFoZ8,100646
6
- sienge_mcp/utils/logger.py,sha256=3Ty7SGcpxAC3vruoRJEK78iZb7wxnDv__EESYQrIMB4,5712
7
- sienge_ecbiesek_mcp-1.2.1.dist-info/METADATA,sha256=ZXcJUXK0-SaEE4mJKHCtC10OKGjxy53xOWl3imRT620,11406
8
- sienge_ecbiesek_mcp-1.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- sienge_ecbiesek_mcp-1.2.1.dist-info/entry_points.txt,sha256=jxEu6gvTw3ci0mjDfqbi0rBLRpeuscwwRk9-H-UOnO8,63
10
- sienge_ecbiesek_mcp-1.2.1.dist-info/top_level.txt,sha256=FCvuhB9JQPKGY0Q8aKoVc7akqG5htoJyfj-eJvVUmWM,11
11
- sienge_ecbiesek_mcp-1.2.1.dist-info/RECORD,,