sienge-ecbiesek-mcp 1.1.0__py3-none-any.whl → 1.1.1__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.

@@ -0,0 +1,383 @@
1
+ Metadata-Version: 2.4
2
+ Name: sienge-ecbiesek-mcp
3
+ Version: 1.1.1
4
+ Summary: Model Context Protocol (MCP) server for Sienge API integration - Brazilian construction management system
5
+ Author-email: ECBIESEK <ti@ecbiesek.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/INOTECH-ecbiesek/Sienge-MCP
8
+ Project-URL: Documentation, https://github.com/INOTECH-ecbiesek/Sienge-MCP#readme
9
+ Project-URL: Repository, https://github.com/INOTECH-ecbiesek/Sienge-MCP.git
10
+ Project-URL: Issues, https://github.com/INOTECH-ecbiesek/Sienge-MCP/issues
11
+ Project-URL: Bug Reports, https://github.com/INOTECH-ecbiesek/Sienge-MCP/issues
12
+ Project-URL: Source Code, https://github.com/INOTECH-ecbiesek/Sienge-MCP
13
+ Project-URL: PyPI, https://pypi.org/project/sienge-ecbiesek-mcp/
14
+ Keywords: sienge,mcp,model-context-protocol,claude,api,construction,erp,brazil,ecbiesek,fastmcp,ai-integration
15
+ Classifier: Development Status :: 5 - Production/Stable
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: End Users/Desktop
18
+ Classifier: License :: OSI Approved :: MIT License
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
+ Classifier: Topic :: Office/Business :: Financial
27
+ Classifier: Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator
28
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
29
+ Classifier: Environment :: Console
30
+ Classifier: Framework :: FastAPI
31
+ Requires-Python: >=3.9
32
+ Description-Content-Type: text/markdown
33
+ License-File: LICENSE
34
+ Requires-Dist: fastmcp>=0.1.0
35
+ Requires-Dist: httpx>=0.25.0
36
+ Requires-Dist: pydantic>=2.0.0
37
+ Requires-Dist: python-dotenv>=1.0.0
38
+ Provides-Extra: dev
39
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
40
+ Requires-Dist: black>=23.0.0; extra == "dev"
41
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
42
+ Dynamic: license-file
43
+
44
+ # Sienge MCP Server
45
+
46
+ Um servidor Model Context Protocol (MCP) para integração com a API do Sienge, sistema de gestão para empresas de construção civil.
47
+
48
+ ## 🚀 Funcionalidades
49
+
50
+ ### 📊 Contas a Receber
51
+ - **get_sienge_accounts_receivable**: Lista contas a receber com filtros por período
52
+ - Utiliza a Bulk-data API do Sienge para consultas eficientes
53
+ - Suporte a filtros por data de vencimento e data de competência
54
+
55
+ ### 🏢 Projetos e Empresas
56
+ - **get_sienge_projects**: Lista todos os projetos/empresas disponíveis
57
+ - Informações detalhadas incluindo ID, nome, endereço e status
58
+
59
+ ### 📝 Notas Fiscais de Compra
60
+ - **get_sienge_purchase_invoices**: Lista todas as notas fiscais de compra
61
+ - **get_sienge_purchase_invoice_details**: Detalhes completos de uma nota fiscal específica
62
+ - **get_sienge_purchase_invoice_items**: Lista itens de uma nota fiscal
63
+ - **get_sienge_purchase_invoice_payments**: Lista pagamentos de uma nota fiscal
64
+ - **search_sienge_purchase_invoices**: Busca avançada com múltiplos filtros
65
+
66
+ ### 🔍 Solicitações de Compra
67
+ - **get_sienge_purchase_requests**: Lista solicitações de compra do sistema
68
+
69
+ ## 📦 Instalação
70
+
71
+ ### Via PyPI (Recomendado)
72
+ ```bash
73
+ pip install sienge-ecbiesek-mcp
74
+ ```
75
+
76
+ ### Via Código Fonte
77
+ ```bash
78
+ git clone https://github.com/INOTECH-ecbiesek/Sienge-MCP.git
79
+ cd Sienge-MCP
80
+ pip install -e .
81
+ ```
82
+
83
+ ## ⚙️ Configuração
84
+
85
+ ### 1. Variáveis de Ambiente
86
+ Crie um arquivo `.env` no diretório do projeto com as seguintes variáveis:
87
+
88
+ ```env
89
+ # Configurações da API do Sienge
90
+ SIENGE_BASE_URL=https://api.sienge.com.br
91
+ SIENGE_SUBDOMAIN=seu_subdominio
92
+ SIENGE_USERNAME=seu_usuario
93
+ SIENGE_PASSWORD=sua_senha
94
+ SIENGE_TIMEOUT=30
95
+ ```
96
+
97
+ ### 2. Configuração no Claude Desktop
98
+
99
+ #### Configuração Básica
100
+ Adicione ao seu arquivo de configuração do Claude Desktop (`claude_desktop_config.json`):
101
+
102
+ ```json
103
+ {
104
+ "mcpServers": {
105
+ "sienge-mcp": {
106
+ "command": "python",
107
+ "args": ["-m", "sienge_mcp"],
108
+ "env": {
109
+ "SIENGE_BASE_URL": "https://api.sienge.com.br",
110
+ "SIENGE_SUBDOMAIN": "seu_subdominio",
111
+ "SIENGE_USERNAME": "seu_usuario",
112
+ "SIENGE_PASSWORD": "sua_senha",
113
+ "SIENGE_TIMEOUT": "30"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ #### Configuração com Virtual Environment
121
+ Se você estiver usando um ambiente virtual:
122
+
123
+ ```json
124
+ {
125
+ "mcpServers": {
126
+ "sienge-mcp": {
127
+ "command": "C:/caminho/para/seu/venv/Scripts/python.exe",
128
+ "args": ["-m", "sienge_mcp"],
129
+ "env": {
130
+ "SIENGE_BASE_URL": "https://api.sienge.com.br",
131
+ "SIENGE_SUBDOMAIN": "seu_subdominio",
132
+ "SIENGE_USERNAME": "seu_usuario",
133
+ "SIENGE_PASSWORD": "sua_senha",
134
+ "SIENGE_TIMEOUT": "30"
135
+ }
136
+ }
137
+ }
138
+ }
139
+ ```
140
+
141
+ ## 🔐 Autenticação
142
+
143
+ ### Credenciais do Sienge
144
+ A autenticação é feita através de **usuário e senha** do Sienge, não por token API:
145
+
146
+ 1. **SIENGE_BASE_URL**: URL base da API (`https://api.sienge.com.br`)
147
+ 2. **SIENGE_SUBDOMAIN**: Seu subdomínio no Sienge (ex: `suaempresa`)
148
+ 3. **SIENGE_USERNAME**: Seu nome de usuário no Sienge
149
+ 4. **SIENGE_PASSWORD**: Sua senha no Sienge
150
+ 5. **SIENGE_TIMEOUT**: Timeout das requisições em segundos (padrão: 30)
151
+
152
+ ### URLs da API
153
+ - **API Base**: `https://api.sienge.com.br`
154
+ - **Endpoints v1**: `/sienge/api/public/v1/`
155
+ - **Bulk-data API**: `/bulk-data/`
156
+
157
+ ## 💻 Como Usar
158
+
159
+ ### 1. Iniciando o Servidor
160
+ ```bash
161
+ # Via módulo Python
162
+ python -m sienge_mcp
163
+
164
+ # Ou diretamente
165
+ sienge-mcp-server
166
+ ```
167
+
168
+ ### 2. No Claude Desktop
169
+ Após configurar o servidor, reinicie o Claude Desktop. O servidor MCP será automaticamente carregado e as ferramentas ficarão disponíveis.
170
+
171
+ ### 3. Exemplos de Uso no Claude
172
+
173
+ #### Consultar Contas a Receber
174
+ ```
175
+ "Liste as contas a receber com vencimento entre 01/01/2024 e 31/01/2024"
176
+ ```
177
+
178
+ #### Buscar Projetos
179
+ ```
180
+ "Mostre todos os projetos disponíveis no Sienge"
181
+ ```
182
+
183
+ #### Consultar Notas Fiscais
184
+ ```
185
+ "Liste as notas fiscais de compra do mês atual"
186
+ ```
187
+
188
+ #### Busca Avançada de Notas Fiscais
189
+ ```
190
+ "Busque notas fiscais de compra com valor acima de R$ 10.000,00 emitidas em dezembro de 2023"
191
+ ```
192
+
193
+ ## 🛠️ Desenvolvimento
194
+
195
+ ### Estrutura do Projeto
196
+ ```
197
+ src/
198
+ ├── sienge_mcp/
199
+ │ ├── __init__.py
200
+ │ ├── server.py # Servidor MCP principal
201
+ │ ├── services/ # Serviços de integração
202
+ │ ├── tools/ # Ferramentas MCP
203
+ │ └── utils/
204
+ │ └── logger.py # Sistema de logging
205
+ ```
206
+
207
+ ### Executando em Modo de Desenvolvimento
208
+ ```bash
209
+ # Clone o repositório
210
+ git clone https://github.com/INOTECH-ecbiesek/Sienge-MCP.git
211
+ cd Sienge-MCP
212
+
213
+ # Crie um ambiente virtual
214
+ python -m venv .venv
215
+ .venv\Scripts\activate # Windows
216
+ source .venv/bin/activate # Linux/Mac
217
+
218
+ # Instale as dependências
219
+ pip install -e .
220
+
221
+ # Configure as variáveis de ambiente
222
+ cp .env.example .env
223
+ # Edite o arquivo .env com suas configurações
224
+
225
+ # Execute o servidor
226
+ python -m sienge_mcp
227
+ ```
228
+
229
+ ### Testando Localmente
230
+ ```bash
231
+ # Instale as dependências de teste
232
+ pip install pytest pytest-asyncio
233
+
234
+ # Execute os testes
235
+ pytest tests/
236
+ ```
237
+
238
+ ## 📋 Requisitos
239
+
240
+ ### Dependências
241
+ - Python >= 3.8
242
+ - fastmcp >= 2.12.3
243
+ - httpx >= 0.25.0
244
+ - pydantic >= 2.0.0
245
+ - python-dotenv >= 1.0.0
246
+
247
+ ### Compatibilidade
248
+ - ✅ Windows
249
+ - ✅ macOS
250
+ - ✅ Linux
251
+ - ✅ Claude Desktop
252
+ - ✅ Outros clientes MCP
253
+
254
+ ## 🔧 Configurações Avançadas
255
+
256
+ ### Logs e Debug
257
+ O servidor inclui sistema de logging configurável:
258
+
259
+ ```python
260
+ # Nível de log via variável de ambiente
261
+ LOG_LEVEL=DEBUG # DEBUG, INFO, WARNING, ERROR
262
+ ```
263
+
264
+ ### Timeout de Requisições
265
+ Configure o timeout das requisições HTTP:
266
+
267
+ ```python
268
+ # Timeout em segundos (padrão: 30s)
269
+ SIENGE_TIMEOUT=60
270
+ ```
271
+
272
+ ### Cache de Respostas
273
+ Para melhor performance em consultas frequentes:
274
+
275
+ ```python
276
+ # Habilitar cache (padrão: False)
277
+ SIENGE_CACHE_ENABLED=true
278
+ SIENGE_CACHE_TTL=300 # TTL em segundos
279
+ ```
280
+
281
+ ## 🚨 Solução de Problemas
282
+
283
+ ### Erros Comuns
284
+
285
+ #### Erro 401 - Unauthorized
286
+ ```
287
+ Causa: Credenciais inválidas (usuário/senha incorretos)
288
+ Solução: Verifique seu usuário e senha no Sienge
289
+ ```
290
+
291
+ #### Erro 404 - Not Found
292
+ ```
293
+ Causa: Endpoint incorreto ou recurso não encontrado
294
+ Solução: Verifique as URLs base da API
295
+ ```
296
+
297
+ #### Erro 429 - Rate Limited
298
+ ```
299
+ Causa: Muitas requisições por minuto
300
+ Solução: Implemente delay entre requisições
301
+ ```
302
+
303
+ #### Servidor MCP não conecta
304
+ ```
305
+ 1. Verifique se o Python está no PATH
306
+ 2. Confirme se o módulo está instalado: pip show sienge-ecbiesek-mcp
307
+ 3. Teste a execução manual: python -m sienge_mcp
308
+ 4. Verifique os logs do Claude Desktop
309
+ ```
310
+
311
+ ### Debug
312
+ Para debugar problemas de conexão:
313
+
314
+ ```bash
315
+ # Execute com logs detalhados
316
+ LOG_LEVEL=DEBUG python -m sienge_mcp
317
+
318
+ # Teste a conectividade com a API
319
+ # Use as credenciais do seu arquivo de configuração para testar
320
+ ```
321
+
322
+ ## 📚 Documentação da API
323
+
324
+ ### Endpoints Utilizados
325
+
326
+ #### API Padrão (v1)
327
+ - `GET /enterprises` - Lista empresas/projetos
328
+ - `GET /purchase-requests` - Solicitações de compra
329
+ - `GET /purchase-invoices` - Notas fiscais de compra
330
+ - `GET /purchase-invoices/{id}` - Detalhes da nota fiscal
331
+ - `GET /purchase-invoices/{id}/items` - Itens da nota fiscal
332
+ - `GET /purchase-invoices/{id}/payments` - Pagamentos da nota fiscal
333
+
334
+ #### Bulk-data API
335
+ - `POST /income` - Contas a receber (bulk)
336
+
337
+ ### Formatos de Data
338
+ - **ISO 8601**: `2024-01-01T00:00:00Z`
339
+ - **Brasileiro**: `01/01/2024`
340
+ - **Filtros de período**: `start_date` e `end_date`
341
+
342
+ ### Códigos de Status
343
+ - `200` - Sucesso
344
+ - `400` - Requisição inválida
345
+ - `401` - Não autorizado
346
+ - `404` - Recurso não encontrado
347
+ - `429` - Rate limit excedido
348
+ - `500` - Erro interno do servidor
349
+
350
+ ## 📄 Licença
351
+
352
+ Este projeto está licenciado sob a licença MIT. Veja o arquivo [LICENSE](LICENSE) para mais detalhes.
353
+
354
+ ## 🤝 Contribuindo
355
+
356
+ 1. Faça um fork do projeto
357
+ 2. Crie uma branch para sua feature (`git checkout -b feature/AmazingFeature`)
358
+ 3. Commit suas mudanças (`git commit -m 'Add some AmazingFeature'`)
359
+ 4. Push para a branch (`git push origin feature/AmazingFeature`)
360
+ 5. Abra um Pull Request
361
+
362
+ ## 📞 Suporte
363
+
364
+ - **Issues**: [GitHub Issues](https://github.com/INOTECH-ecbiesek/Sienge-MCP/issues)
365
+ - **Documentação**: [Wiki do Projeto](https://github.com/INOTECH-ecbiesek/Sienge-MCP/wiki)
366
+ - **API Sienge**: [Documentação Oficial](https://api.sienge.com.br/docs)
367
+
368
+ ## 📈 Versões
369
+
370
+ ### v1.1.0 (Atual)
371
+ - ✅ Adicionadas 5 ferramentas para Notas Fiscais de Compra
372
+ - ✅ Suporte à Bulk-data API para contas a receber
373
+ - ✅ Correção de endpoints para projetos/empresas
374
+ - ✅ Melhorias na documentação e tratamento de erros
375
+
376
+ ### v1.0.0
377
+ - ✅ Versão inicial com ferramentas básicas
378
+ - ✅ Integração com API padrão do Sienge
379
+ - ✅ Suporte a contas a receber, projetos e solicitações de compra
380
+
381
+ ---
382
+
383
+ **Desenvolvido por INOTECH-ecbiesek** 🚀
@@ -0,0 +1,9 @@
1
+ sienge_ecbiesek_mcp-1.1.1.dist-info/licenses/LICENSE,sha256=leWD46QLXsQ43M8fE_KgOo5Sf0YB9_X8EVqGdV0Dsc0,1101
2
+ sienge_mcp/__init__.py,sha256=Pjl4hgBCWhVJ_BBZXaP7SuZfH7Z1JWZbSs8MV5sUle8,287
3
+ sienge_mcp/server.py,sha256=-xMDp97XliIgJMii4X5Ws7gcHAT9Fwe3S2JViCd0tDs,43690
4
+ sienge_mcp/utils/logger.py,sha256=bqU0GDsQXE9TaKOq5_6S2L8bh_Nas-EuYNDE3fzlPWg,5880
5
+ sienge_ecbiesek_mcp-1.1.1.dist-info/METADATA,sha256=5jrtt8Q5SARdav4CAG7KPPcVLnTj4_fR6KwiTjDKzC8,11230
6
+ sienge_ecbiesek_mcp-1.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ sienge_ecbiesek_mcp-1.1.1.dist-info/entry_points.txt,sha256=jxEu6gvTw3ci0mjDfqbi0rBLRpeuscwwRk9-H-UOnO8,63
8
+ sienge_ecbiesek_mcp-1.1.1.dist-info/top_level.txt,sha256=FCvuhB9JQPKGY0Q8aKoVc7akqG5htoJyfj-eJvVUmWM,11
9
+ sienge_ecbiesek_mcp-1.1.1.dist-info/RECORD,,
@@ -1,34 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: sienge-ecbiesek-mcp
3
- Version: 1.1.0
4
- Summary: Sienge ECBIESEK MCP Server - Model Context Protocol integration for Sienge API (ECBIESEK Company)
5
- Author-email: ECBIESEK <ti@ecbiesek.com>
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/Moizas951/Sienge-mcp
8
- Project-URL: Documentation, https://github.com/Moizas951/Sienge-mcp#readme
9
- Project-URL: Repository, https://github.com/Moizas951/Sienge-mcp.git
10
- Project-URL: Issues, https://github.com/Moizas951/Sienge-mcp/issues
11
- Keywords: sienge,mcp,claude,api,construction,ecbiesek
12
- Classifier: Development Status :: 4 - Beta
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
- Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.9
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.12
21
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
- Classifier: Topic :: Office/Business :: Financial
23
- Requires-Python: >=3.9
24
- Description-Content-Type: text/markdown
25
- License-File: LICENSE
26
- Requires-Dist: fastmcp>=0.1.0
27
- Requires-Dist: httpx>=0.25.0
28
- Requires-Dist: pydantic>=2.0.0
29
- Requires-Dist: python-dotenv>=1.0.0
30
- Provides-Extra: dev
31
- Requires-Dist: pytest>=7.0.0; extra == "dev"
32
- Requires-Dist: black>=23.0.0; extra == "dev"
33
- Requires-Dist: flake8>=6.0.0; extra == "dev"
34
- Dynamic: license-file
@@ -1,9 +0,0 @@
1
- sienge_ecbiesek_mcp-1.1.0.dist-info/licenses/LICENSE,sha256=leWD46QLXsQ43M8fE_KgOo5Sf0YB9_X8EVqGdV0Dsc0,1101
2
- sienge_mcp/__init__.py,sha256=Pjl4hgBCWhVJ_BBZXaP7SuZfH7Z1JWZbSs8MV5sUle8,287
3
- sienge_mcp/server.py,sha256=-xMDp97XliIgJMii4X5Ws7gcHAT9Fwe3S2JViCd0tDs,43690
4
- sienge_mcp/utils/logger.py,sha256=bqU0GDsQXE9TaKOq5_6S2L8bh_Nas-EuYNDE3fzlPWg,5880
5
- sienge_ecbiesek_mcp-1.1.0.dist-info/METADATA,sha256=ayq0Ym2v-7Wik1FUnVvqflTNtz9TrccINRhAVPDpFT0,1534
6
- sienge_ecbiesek_mcp-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- sienge_ecbiesek_mcp-1.1.0.dist-info/entry_points.txt,sha256=jxEu6gvTw3ci0mjDfqbi0rBLRpeuscwwRk9-H-UOnO8,63
8
- sienge_ecbiesek_mcp-1.1.0.dist-info/top_level.txt,sha256=FCvuhB9JQPKGY0Q8aKoVc7akqG5htoJyfj-eJvVUmWM,11
9
- sienge_ecbiesek_mcp-1.1.0.dist-info/RECORD,,