npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@florinszilagyi/anaf-mcp

v0.1.0

Published

MCP server for the ANAF e-Factura SDK — exposes lookup, UBL, upload, status, download, messages, validate as tools

Readme

@florinszilagyi/anaf-mcp

MCP server exposing the ANAF e-Factura SDK as tools for LLM agents (Claude Desktop, Claude Code, etc.).

Prerequisites

This server reuses the anaf-cli state on disk for authentication. Before using the MCP, complete a one-time CLI setup:

# 1. Install the CLI
npm install -g @florinszilagyi/anaf-cli

# 2. Register your OAuth credential (once, ever)
anaf-cli cred set --client-id <id> --redirect-uri https://localhost:3000/callback

# 3. Log in for a specific company (obtains refresh token)
anaf-cli auth login <CUI>

The MCP server reads:

| File | Purpose | |---|---| | ~/.config/anaf-cli/credential.yaml | OAuth client ID + redirect URI (optional if env vars set) | | ~/.config/anaf-cli/config.yaml | Active company CUI (written by anaf_auth_login/anaf_switch_company) | | ~/.local/share/anaf-cli/tokens/_default.json | Refresh + access tokens |

All OAuth values (ANAF_CLIENT_ID, ANAF_CLIENT_SECRET, ANAF_REDIRECT_URI) and the environment (ANAF_ENV=prod|test, default prod) are set as env vars in mcpServers. No anaf-cli installation required. The token file is shared with anaf-cli if you use both.

Tools

| Tool | Auth | Description | |---|---|---| | anaf_auth_login | Setup | Start OAuth flow — returns URL to open in browser | | anaf_auth_complete | Setup | Finish OAuth — waits for callback, stores token | | anaf_switch_company | No | Switch active company CUI (no re-auth needed) | | anaf_lookup_company | No | Public ANAF company registry lookup by CUI | | anaf_build_ubl | No | Generate CIUS-RO UBL 2.1 invoice XML | | anaf_validate_xml | Yes | Validate UBL XML against ANAF rules | | anaf_upload_invoice | Yes | Upload UBL XML to e-Factura (B2B or B2C) | | anaf_invoice_status | Yes | Poll upload processing status | | anaf_download_invoice | Yes | Download the processed ZIP archive | | anaf_list_messages | Yes | List sent/received/error messages |

Authentication

Authentication is a two-step flow the agent performs on your behalf:

  1. Agent calls anaf_auth_login({ cui: "12345678" }) → returns the ANAF OAuth URL
  2. You open the URL in your browser and authenticate with your digital certificate
  3. Agent calls anaf_auth_complete() → exchanges the code, stores the token

After that, all tools work automatically. To switch companies without re-authenticating, call anaf_switch_company.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on other OSes:

{
  "mcpServers": {
    "anaf": {
      "command": "npx",
      "args": ["-y", "@florinszilagyi/anaf-mcp"],
      "env": {
        "ANAF_CLIENT_ID": "your-oauth-client-id",
        "ANAF_CLIENT_SECRET": "your-oauth-client-secret",
        "ANAF_REDIRECT_URI": "https://localhost:9002/callback",
        "ANAF_ENV": "prod"
      }
    }
  }
}

Claude Code

claude mcp add anaf -- npx -y @florinszilagyi/anaf-mcp

Set the secret in your shell env or via a .env file sourced before launch.

Local Development

pnpm install
pnpm --filter @florinszilagyi/anaf-mcp run dev     # runs via tsx
pnpm --filter @florinszilagyi/anaf-mcp run test    # unit tests
pnpm --filter @florinszilagyi/anaf-mcp run build   # produces dist/