AbraFlexi MCP Server

AbraFlexi MCP Server

Provides a comprehensive MCP interface to the AbraFlexi ERP REST API, enabling management of invoices, contacts, products, bank transactions, and other evidence through natural language.

Category
访问服务器

README

AbraFlexi MCP Server

License: MIT Python 3.10+ PyPI version

A comprehensive Model Context Protocol (MCP) server for AbraFlexi integration using FastMCP and python-abraflexi. This server provides complete access to AbraFlexi REST API functionality through MCP-compatible tools.

Features

📄 Invoice Management

  • invoice_issued_get - Retrieve issued invoices (faktura-vydana)
  • invoice_issued_create - Create new issued invoices
  • invoice_issued_update - Update existing issued invoices
  • invoice_issued_delete - Remove issued invoices
  • invoice_received_get - Retrieve received invoices (faktura-prijata)
  • invoice_received_create - Create new received invoices

👥 Contact Management

  • contact_get - Retrieve contacts and companies (adresar)
  • contact_create - Create new contacts
  • contact_update - Update existing contacts
  • contact_delete - Remove contacts

📦 Product Management

  • product_get - Retrieve products from price list (cenik)
  • product_create - Create new products
  • product_update - Update existing products
  • product_delete - Remove products

🏦 Bank Transaction Management

  • bank_transaction_get - Retrieve bank transactions (banka)
  • bank_transaction_create - Create new bank transactions

🔧 Generic Evidence Operations

  • evidence_get - Get records from any evidence
  • evidence_create - Create record in any evidence
  • evidence_update - Update record in any evidence
  • evidence_delete - Delete record from any evidence
  • evidence_list - List all available evidences

Installation

Prerequisites

  • Python 3.10 or higher
  • Access to an AbraFlexi server with API enabled

Option 1: Install from PyPI (Recommended)

pip install abraflexi-mcp-server

Then run the server:

abraflexi-mcp

Option 2: AppImage (Linux)

Download the self-contained AppImage from the latest release:

chmod +x AbraFlexi-MCP-Server-*-x86_64.AppImage
./AbraFlexi-MCP-Server-*-x86_64.AppImage

No Python or pip required. See AppImage section for details.

Option 3: Install from Source

  1. Clone the repository:

    git clone https://github.com/VitexSoftware/abraflexi-mcp-server.git
    cd abraflexi-mcp-server
    
  2. Install with uv (recommended):

    uv sync
    uv run python scripts/start_server.py
    

    Or with pip:

    pip install -e .
    abraflexi-mcp
    

Cloud Deployment

A testing deployment is available at:

🌐 https://abraflexi.fastmcp.app/mcp

This cloud-hosted instance allows you to test and use the AbraFlexi MCP server without local installation. Configure your MCP client to connect to this endpoint with HTTP transport.

Note: This is a testing deployment. For production use, we recommend self-hosting using one of the installation methods above.

Configuration

Create a .env file or set environment variables:

cp .env.example .env
# Edit .env with your AbraFlexi server details

Configuration

Required Environment Variables

  • ABRAFLEXI_URL - Your AbraFlexi server URL (e.g., https://demo.flexibee.eu:5434)
  • ABRAFLEXI_COMPANY - Company identifier (e.g., demo_de)

Authentication (choose one method)

Method 1: Username/Password (Recommended)

  • ABRAFLEXI_LOGIN - Your AbraFlexi username
  • ABRAFLEXI_PASSWORD - Your AbraFlexi password

Method 2: Session ID

  • ABRAFLEXI_AUTHSESSID - Your AbraFlexi session ID

Optional Configuration

  • READ_ONLY - Set to true, 1, or yes to enable read-only mode (default: true)
  • ABRAFLEXI_TIMEOUT - Request timeout in seconds (default: 300)

Transport Configuration

  • ABRAFLEXI_MCP_TRANSPORT - Transport type: stdio (default) or streamable-http

HTTP Transport Configuration (only used when ABRAFLEXI_MCP_TRANSPORT=streamable-http):

  • ABRAFLEXI_MCP_HOST - Server host (default: 127.0.0.1)
  • ABRAFLEXI_MCP_PORT - Server port (default: 8000)
  • ABRAFLEXI_MCP_STATELESS_HTTP - Stateless mode (default: false)
  • AUTH_TYPE - Must be set to no-auth for streamable-http transport

Usage

Running the Server

With startup script (recommended):

uv run python scripts/start_server.py

Direct execution:

uv run python -m abraflexi_mcp_server.server

Transport Options

The server supports two transport methods:

STDIO Transport (Default)

Standard input/output transport for MCP clients like Claude Desktop:

# Set in .env or environment
ABRAFLEXI_MCP_TRANSPORT=stdio

HTTP Transport

HTTP-based transport for web integrations:

# Set in .env or environment
ABRAFLEXI_MCP_TRANSPORT=streamable-http
ABRAFLEXI_MCP_HOST=127.0.0.1
ABRAFLEXI_MCP_PORT=8000
ABRAFLEXI_MCP_STATELESS_HTTP=false
AUTH_TYPE=no-auth

Testing

Run test suite:

uv run python scripts/test_server.py

Read-Only Mode

When READ_ONLY=true (default), the server will only expose GET operations (retrieve data) and block all create, update, and delete operations. This is useful for:

  • 📊 Monitoring dashboards
  • 🔍 Read-only integrations
  • 🔒 Security-conscious environments
  • 🛡️ Preventing accidental modifications

To enable write operations, set READ_ONLY=false in your .env file.

Example Tool Calls

Get all issued invoices:

invoice_issued_get(limit=10)

Get specific invoice by code:

invoice_issued_get(kod="INV-2024-001")

Create a new contact:

contact_create(
    kod="CUSTOMER01",
    nazev="Example Company s.r.o.",
    email="info@example.com",
    tel="+420123456789"
)

Get products:

product_get(nazev="Widget", limit=5)

Generic evidence query:

evidence_get(
    evidence="faktura-vydana",
    filter_expr="datVyst >= '2024-01-01'",
    limit=20
)

MCP Integration

This server is designed to work with MCP-compatible clients like Claude Desktop. See MCP_SETUP.md for detailed integration instructions.

OCI Container

The server can be run as an OCI container (Docker/Podman) — no Python installation needed on the host.

Building the image

podman build -t abraflexi-mcp-server -f Containerfile .

Running the container

The image defaults to streamable-http transport on port 8000.

With individual environment variables:

podman run --rm -p 8000:8000 \
  -e ABRAFLEXI_URL=https://demo.flexibee.eu:5434 \
  -e ABRAFLEXI_COMPANY=demo_de \
  -e ABRAFLEXI_LOGIN=winstrom \
  -e ABRAFLEXI_PASSWORD=winstrom \
  abraflexi-mcp-server

With an env file:

podman run --rm -p 8000:8000 --env-file .env abraflexi-mcp-server

Container environment defaults

Variable Default
ABRAFLEXI_MCP_TRANSPORT streamable-http
ABRAFLEXI_MCP_HOST 0.0.0.0
ABRAFLEXI_MCP_PORT 8000
READ_ONLY true

All other configuration variables can be passed as environment variables.

AppImage

A self-contained, single-file Linux executable — no Python, pip, or any other dependency required on the host.

Building the AppImage

bash appimage/build-appimage.sh

The script downloads a portable CPython and appimagetool automatically. The resulting file is placed in build/appimage/:

build/appimage/AbraFlexi-MCP-Server-<version>-x86_64.AppImage

Running the AppImage

The AppImage automatically loads a .env file from the current working directory if one is present.

With a .env file (recommended):

cp .env.example .env
# edit .env with your credentials
./AbraFlexi-MCP-Server-*-x86_64.AppImage

With inline environment variables:

ABRAFLEXI_URL=https://demo.flexibee.eu:5434 \
ABRAFLEXI_COMPANY=demo_de \
ABRAFLEXI_LOGIN=winstrom \
ABRAFLEXI_PASSWORD=winstrom \
./AbraFlexi-MCP-Server-*-x86_64.AppImage

Development

Project Structure

abraflexi-mcp-server/
├── abraflexi_mcp_server/
│   ├── __init__.py
│   └── server.py                  # Main server implementation
├── appimage/
│   ├── AppRun                     # AppImage entry point
│   ├── abraflexi-mcp-server.desktop
│   ├── abraflexi-mcp-server.svg
│   └── build-appimage.sh          # AppImage build script
├── debian/                        # Debian packaging
├── scripts/
│   ├── start_server.py            # Startup script with validation
│   └── test_server.py             # Test script
├── Containerfile                  # OCI container build
├── server.json                    # MCP Registry manifest
├── pyproject.toml                 # Python project configuration
├── setup.py                       # Legacy setuptools configuration
├── requirements.txt               # Dependencies
├── .env.example                   # Environment configuration template
├── .env                           # Your configuration (not in git)
├── .gitignore                     # Git ignore patterns
└── README.md                      # This file

Running Tests

# Test server functionality
uv run python scripts/test_server.py

# Test with specific environment
ABRAFLEXI_URL=https://your-server.com uv run python scripts/test_server.py

Error Handling

The server includes comprehensive error handling:

  • ✅ Authentication errors are clearly reported
  • 🔒 Read-only mode violations are blocked with descriptive messages
  • ✔️ Invalid parameters are validated
  • 🌐 Network and API errors are properly formatted
  • 📝 Detailed logging for troubleshooting

Security Considerations

  • 🔑 Store credentials securely in .env file (never commit to git)
  • 🔒 Enable read-only mode for monitoring-only use cases
  • 🛡️ Use HTTPS for AbraFlexi server connections
  • 🔄 Regularly rotate passwords
  • 📁 Ensure .env file has proper permissions (600)

Troubleshooting

Common Issues

Connection Failed:

  • Verify ABRAFLEXI_URL is correct and accessible
  • Check authentication credentials
  • Ensure AbraFlexi API is enabled
  • Check firewall/network settings

Permission Denied:

  • Verify user has sufficient AbraFlexi permissions
  • Check if read-only mode is enabled when trying to modify data

Tool Not Found:

  • Ensure all dependencies are installed: uv sync
  • Verify Python version compatibility (3.10+)

Debug Mode

Set environment variable for detailed logging:

export DEBUG=1
uv run python scripts/start_server.py

Dependencies

License

This project is licensed under the MIT License.

Acknowledgments

Support

Author

Vítězslav Dvořák


Made with ❤️ for the AbraFlexi and MCP communities

<!-- mcp-name: io.github.Vitexus/abraflexi -->

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选