MCP Officegest

MCP Officegest

Exposes a curated subset of the Officegest API v2 (22 CRUD tools) for managing clients, sales, and stock to AI clients like Claude Code and Claude Desktop.

Category
Visit Server

README

MCP Officegest

Servidor MCP que expõe a API Officegest v2 a clientes de IA como o Claude Code e o Claude Desktop.

A API tem 460 endpoints (inventário completo em endpoints-v2.txt); este servidor expõe um subconjunto curado de 22 tools com CRUD para três áreas: Clientes/Entidades, Vendas e Stocks.

Requisitos

  • Python 3.12 (ver .python-version; o projeto usa pyenv + venv, não uv)
  • Uma conta Officegest com acesso à API v2

Instalação

pyenv local 3.12.1
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Configuração

cp .env.example .env

Edita o .env:

OFFICEGEST_BASE_URL=https://A-TUA-EMPRESA.officegest.com/api/v2
OFFICEGEST_USERNAME=o-teu-utilizador
OFFICEGEST_PASSWORD=a-tua-password

⚠️ O .env contém credenciais e está no .gitignore — nunca o commites.

Autenticação

A API usa Bearer token no header Authorization. Com OFFICEGEST_USERNAME e OFFICEGEST_PASSWORD definidos, o servidor autentica-se sozinho na primeira chamada (POST /auth/login) e renova o token automaticamente se expirar (resposta 401). Em alternativa, podes colar um token já obtido em OFFICEGEST_TOKEN.

Nota: a API devolve o token em data.access_token (a documentação diz data.token, mas está desatualizada). O servidor aceita ambos.

Testar (MCP Inspector)

Este projeto usa pyenv + venv, por isso não uses mcp dev (arranca o servidor com uv, que não está instalado). Lança o Inspector apontando ao Python do venv:

npx @modelcontextprotocol/inspector .venv/bin/python server.py

Abre o link, faz ConnectToolsList Tools e experimenta as tools.

Usar no Claude Code

A partir do projeto onde queres usar o MCP:

claude mcp add officegest -- /CAMINHO/ABSOLUTO/.venv/bin/python /CAMINHO/ABSOLUTO/server.py

O Claude Code passa a arrancar o servidor sozinho em cada sessão — não precisas de o correr à mão. Verifica com claude mcp list ou /mcp dentro da sessão.

Depois de alterares o server.py, rearranca o servidor (reabre o Claude Code ou /mcp → reconnect) para as mudanças serem lidas.

Tools disponíveis

Área Tools
Clientes listar_clientes, procurar_clientes, obter_cliente, obter_saldo_cliente, criar_cliente, atualizar_cliente
Vendas listar_tipos_documento, listar_documentos_venda, obter_documento_venda, criar_documento_venda, atualizar_documento_venda, estado_documento_venda, atualizar_estado_documento, pagamentos_pendentes
Stocks listar_artigos, criar_artigo, obter_artigo, atualizar_artigo, eliminar_artigo, consultar_stock, listar_familias, movimentos_stock

A API Officegest não tem delete para clientes nem documentos de venda (só artigos), por isso essas tools não existem — não é limitação deste servidor.

Adicionar mais endpoints

Cada tool é uma função async decorada com @mcp.tool(). Para expor outro endpoint, copia o padrão de uma tool existente e ajusta o caminho/parâmetros a partir de endpoints-v2.txt. A docstring é o que o modelo lê para decidir quando usar a tool — descreve bem os parâmetros.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured