loading…
Search for a command to run...
loading…
Integrates with the Turkish Revenue Administration (GİB) e-Arşiv Fatura system to manage e-invoices via natural language. Users can list, search, create, and ca
Integrates with the Turkish Revenue Administration (GİB) e-Arşiv Fatura system to manage e-invoices via natural language. Users can list, search, create, and cancel invoices, as well as validate Turkish tax numbers and retrieve UBL-TR format XML data.
Türkiye Gelir İdaresi Başkanlığı (GİB) e-Arşiv Fatura sistemi ile entegrasyon sağlayan MCP sunucusu.
📝 Read the full story on Medium (Turkish)
git clone https://github.com/reyhansunduk/efatura-mcp-server.git
cd efatura-mcp-server
pip install -e .
The server works immediately with mock data:
python -m efatura_mcp.server
For test: ⚠️ DEMO MODE: Using mock data
Create config file:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"efatura": {
"command": "python",
"args": ["-m", "efatura_mcp.server"],
"cwd": "C:\\path\\to\\efatura-mcp-server"
}
}
}
Ask Claude:
List invoices
You should see 5 demo invoices!
When ready to use real data:
.env file:GIB_USERNAME=your_vkn_here
GIB_PASSWORD=your_password_here
GIB_ENVIRONMENT=test
The server automatically switches to real API when credentials are provided.
The server provides 7 MCP tools that Claude can use:
list_invoicesList e-Fatura invoices from GIB system.
Parameters:
start_date (optional): Start date (YYYY-MM-DD)end_date (optional): End date (YYYY-MM-DD)limit (optional): Max invoices to return (default: 10)Example: "Show me invoices from last month"
get_invoice_detailGet detailed information for a specific invoice.
Parameters:
invoice_id (required): Invoice ID/UUIDExample: "Show details for invoice ABC2024000001"
get_invoice_xmlGet invoice HTML/XML content in UBL-TR format.
Parameters:
invoice_id (required): Invoice ID/UUIDExample: "Get XML for invoice ABC2024000001"
create_invoiceCreate new e-Fatura invoice in GIB system.
Parameters:
invoice_number, issue_date, supplier_vkn, supplier_namecustomer_vkn, customer_name, items[], total_amountcurrency (optional, default: TRY)Example: "Create invoice for 1000 TRY to customer XYZ"
cancel_invoiceCancel an existing invoice.
Parameters:
invoice_id (required): Invoice ID to cancelreason (required): Cancellation reasonExample: "Cancel invoice ABC2024000001 due to error"
search_invoicesSearch invoices with filters.
Parameters:
customer_name, supplier_name (optional)min_amount, max_amount (optional)status (optional): approved, pending, cancelledExample: "Find invoices over 10000 TRY", "Show pending invoices"
validate_tax_numberValidate Turkish tax number (VKN/TCKN).
Parameters:
tax_number (required): 10 or 11 digit tax numberExample: "Validate tax number 1234567890"
Get Credentials: Use your company's existing e-Fatura credentials
efatura-mcp-server/
├── src/
│ └── efatura_mcp/
│ ├── server.py # Main MCP server
│ ├── gib_earsiv_client.py # Real GİB API client
│ └── mock_data.py # Demo data
├── .env # Credentials (gitignored)
├── .env.example # Template
└── README.md
See SECURITY.md for complete guidelines.
Dependencies are auto-installed with pip install -e .
MIT
git clone https://github.com/reyhansunduk/efatura-mcp-server.git
cd efatura-mcp-server
pip install -e .
Sunucu hemen mock data ile çalışır:
python -m efatura_mcp.server
Test için: ⚠️ DEMO MODE: Using mock data
Config dosyası oluştur:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"efatura": {
"command": "python",
"args": ["-m", "efatura_mcp.server"],
"cwd": "C:\\Users\\..\\efatura-mcp-server"
}
}
}
Claude'a sor:
Faturaları listele
Faturalar listelenecektir.
Gerçek veri kullanmaya hazır olduğunda:
.env dosyasını düzenle:GIB_USERNAME=vkn_buraya
GIB_PASSWORD=sifre_buraya
GIB_ENVIRONMENT=test
Sunucu credentials verildiğinde otomatik olarak gerçek API'ye geçer.
Sunucu Claude'un kullanabileceği 7 MCP aracı sağlar:
list_invoicesGİB sisteminden e-Faturaları listeler.
Parametreler:
start_date (opsiyonel): Başlangıç tarihi (YYYY-MM-DD)end_date (opsiyonel): Bitiş tarihi (YYYY-MM-DD)limit (opsiyonel): Max fatura sayısı (varsayılan: 10)Örnek: "Geçen ayki faturaları göster"
get_invoice_detailBelirli bir faturanın detaylı bilgilerini getirir.
Parametreler:
invoice_id (zorunlu): Fatura ID/UUIDÖrnek: "ABC2024000001 faturasının detaylarını göster"
get_invoice_xmlFatura HTML/XML içeriğini UBL-TR formatında getirir.
Parametreler:
invoice_id (zorunlu): Fatura ID/UUIDÖrnek: "ABC2024000001 faturasının XML'ini getir"
create_invoiceGİB sisteminde yeni e-Fatura oluşturur.
Parametreler:
invoice_number, issue_date, supplier_vkn, supplier_namecustomer_vkn, customer_name, items[], total_amountcurrency (opsiyonel, varsayılan: TRY)Örnek: "XYZ müşterisine 1000 TRY fatura oluştur"
cancel_invoiceMevcut faturayı iptal eder.
Parametreler:
invoice_id (zorunlu): İptal edilecek fatura IDreason (zorunlu): İptal sebebiÖrnek: "ABC2024000001 faturasını hata nedeniyle iptal et"
search_invoicesFiltrelerle fatura ara.
Parametreler:
customer_name, supplier_name (opsiyonel)min_amount, max_amount (opsiyonel)status (opsiyonel): approved, pending, cancelledÖrnek: "10000 TL üzeri faturaları bul", "Beklemedeki faturaları göster"
validate_tax_numberTürk vergi numarasını doğrula (VKN/TCKN).
Parametreler:
tax_number (zorunlu): 10 veya 11 haneli vergi numarasıÖrnek: "1234567890 vergi numarasını doğrula"
Nasıl Yapılır: Şirketinin mevcut e-Fatura credentials'ını kullan
efatura-mcp-server/
├── src/
│ └── efatura_mcp/
│ ├── server.py # Ana MCP sunucu
│ ├── gib_earsiv_client.py # Gerçek GİB API client
│ └── mock_data.py # Demo verisi
├── .env # credentials'ın (gitignored)
├── .env.example # Şablon
└── README.md
Tam rehber için SECURITY.md'ye bak.
Bağımlılıklar pip install -e . ile otomatik kurulur.
MIT
For issues and questions, please open an issue on GitHub.
Sorunlar ve sorular için lütfen GitHub'da bir issue açın.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"e-fatura-mcp-server": {
"command": "npx",
"args": []
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.