# SEF e-fakture (Srbija)

> SEF e-fakture (Srbija) is an open-source MCP server for finance and payments. Local MCP server for drafting and sending Serbian SEF e-invoices with human approval. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, CLI, macOS, Windows, Linux
- **Repository:** https://github.com/janko-vrbnjak/sef-mcp
- **MCP Registry name:** io.github.janko-vrbnjak/sef-mcp
- **Categories:** [finance and payments](https://ai-powered.com/categories/finance-and-payments), [legal and government](https://ai-powered.com/categories/legal-and-government)
- **Listing updated:** 2026-11-18

## About

This server runs on your own machine and talks only to the Serbian SEF e-invoicing service, using your own API key, with no hosted intermediary. It defaults to the demo environment, which has no tax effect. Production needs two switches, SEF_ENV=prod and SEF_MCP_ALLOW_PROD_WRITE=true.

Sending is a two-step flow. sef_draft_invoice builds a UBL invoice locally and returns the amounts and an approvalCode, a short hash of the XML. sef_send_invoice only sends a draft when given the matching draftId and approvalCode, so the exact version you reviewed is what goes out. The key is read from the environment only, never logged or stored, and a local audit log records each draft, send and cancel.

Other tools cover company and customer setup through conversation, setup checks, official VAT exemption and unit-of-measure codes, invoice status, cancellation and storno. The README is largely in Serbian, is at v0.1, and says this is not an official Ministry of Finance tool, so the issuer stays responsible for tax correctness. It is MIT licensed.

## Features

- **Draft then approve:** Builds the invoice locally and requires an approval code before anything is sent.
- **Demo by default:** Production writes need two explicit switches.
- **Local profile:** Company, VAT status, customers and numbering rules live in a local validated profile.
- **Cancel and storno:** Cancels draft or errored invoices and reverses sent or accepted ones.
- **Official code lists:** Lists VAT exemption reasons and units of measure.
- **Audit log:** Records every draft, send and cancel in a local file.

## Good for

- Prepare a monthly invoice for a Serbian client through conversation
- Check the status of invoices already sent to SEF
- Reverse a sent invoice with storno
- Test invoicing safely against the demo environment
- Keep an API key off third-party servers

## Install

### Claude Code (Terminal)

```sh
claude mcp add sef-mcp -- npx -y https://github.com/janko-vrbnjak/sef-mcp/releases/download/v0.4.0/sef-mcp.mcpb
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "sef-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/janko-vrbnjak/sef-mcp/releases/download/v0.4.0/sef-mcp.mcpb"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "sef-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/janko-vrbnjak/sef-mcp/releases/download/v0.4.0/sef-mcp.mcpb"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "sef-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/janko-vrbnjak/sef-mcp/releases/download/v0.4.0/sef-mcp.mcpb"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "sef-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/janko-vrbnjak/sef-mcp/releases/download/v0.4.0/sef-mcp.mcpb"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "sef-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/janko-vrbnjak/sef-mcp/releases/download/v0.4.0/sef-mcp.mcpb"
      ]
    }
  }
}
```

## Tools

- `sef_check_setup`: Checks environment, safety switches and profile.
- `sef_setup_company`: Sets up company details through conversation, stored locally.
- `sef_add_customer`: Adds or changes a customer in the local profile.
- `sef_ping`: Checks the key and connection to SEF.
- `sef_list_customers`: Lists customers from the profile.
- `sef_list_vat_exemption_reasons`: Lists official VAT exemption codes.
- `sef_list_unit_measures`: Lists official units of measure.
- `sef_draft_invoice`: Builds a UBL invoice locally and returns amounts and an approvalCode.
- `sef_get_draft`: Reads a draft, optionally with XML.
- `sef_send_invoice`: Sends an approved draft to SEF.
- `sef_get_invoice`: Returns invoice status.
- `sef_list_invoice_ids`: Lists sent invoices.
- `sef_cancel_invoice`: Cancels an invoice in draft, new or send-error status.
- `sef_storno_invoice`: Reverses an invoice that was sent, accepted or rejected.

## FAQ

### Where does my API key go?

It stays on your computer, read from the environment, and the client only contacts efaktura.mfin.gov.rs and demoefaktura.mfin.gov.rs.

### Can it send invoices by mistake?

Sending needs a draftId and approvalCode for the exact draft, and production needs two switches.

### Is it an official tool?

No. The README says it is not an official Ministry of Finance tool and the issuer remains responsible.

### What is the licence?

MIT.

### Is SEF e-fakture (Srbija) free?

Yes. SEF e-fakture (Srbija) is open source, so you can use and self-host it for free.

### How do I add SEF e-fakture (Srbija) to Claude Code?

Run this command in your terminal: claude mcp add sef-mcp -- npx -y https://github.com/janko-vrbnjak/sef-mcp/releases/download/v0.4.0/sef-mcp.mcpb

### What are the best alternatives to SEF e-fakture (Srbija)?

The closest alternatives to SEF e-fakture (Srbija) are Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Budget Tracker, Data Ny and Crypto Feeds.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Solana MCP by Vybe](https://ai-powered.com/mcp/solana-mcp-by-vybe): Solana MCP by Vybe is an MCP server for finance and payments.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [Budget Tracker](https://ai-powered.com/mcp/budget-tracker-2): Budget Tracker is a freemium MCP server for finance and payments.
- [Data Ny](https://ai-powered.com/mcp/data-ny): Data Ny is a freemium MCP server for legal and government.
- [Crypto Feeds](https://ai-powered.com/mcp/crypto-feeds): Crypto Feeds is a freemium MCP server for finance and payments.
- [Datos Gob Es](https://ai-powered.com/mcp/datos-gob-es): Datos Gob Es is a freemium MCP server for legal and government.
- [Datos Cl](https://ai-powered.com/mcp/datos-cl): Datos Cl is a freemium MCP server for legal and government.
- [Cipo](https://ai-powered.com/mcp/cipo): Cipo is a freemium MCP server for legal and government.

---
Source: https://ai-powered.com/mcp/sef-e-fakture-srbija
