Stackin MCP server
Commit 12 Sep 2026Terbitkan, konsultasikan, perbaiki, dan batalkan faktur elektronik Brasil (NF-e dan NFS-e) melalui client AI.
Juga dikenal sebagai stackin-io/stackin-mcp-plugin, stackin-mcp-plugin
- Stars
- 0
- Tools
- โ
- Unduhan, 30 hari
- โ
- Versi terbaru
- 1.0.0
- Commit terakhir
- 12 Sep 2026
- Lisensi
- MIT
Apa itu Stackin MCP?
Stackin adalah MCP server. Terbitkan, konsultasikan, perbaiki, dan batalkan faktur elektronik Brasil (NF-e dan NFS-e) melalui client AI.
Ringkasan dibuat dari README proyek
Tentang Stackin MCP server
Stackin menyediakan interface khusus untuk mengelola faktur elektronik Brasil, khususnya NF-e untuk barang dan NFS-e untuk jasa. Ini memungkinkan developer untuk berinteraksi dengan SEFAZ dan webservice pemerintah kota menggunakan bahasa alami melalui client AI seperti Claude Code, ChatGPT, Codex, dan Cursor. Server ini menangani kompleksitas dokumentasi fiskal, sehingga pengguna tidak perlu mengelola penandatanganan XML atau sertifikat digital secara lokal, karena semua ditangani di sisi server.
Pengguna dapat terhubung via OAuth 2.1 dengan PKCE untuk otorisasi otomatis di Claude Code atau menggunakan API key statis dari aplikasi Stackin untuk client seperti Cursor. Sistem ini mencakup enam belas tools dan sembilan skill khusus untuk mengelola seluruh siklus hidup dokumen. Ini termasuk menerbitkan, mengonsultasikan, memperbaiki dengan CC-e, dan membatalkan faktur. Sistem ini juga membantu tugas fiskal seperti mencari kode NCM, CFOP, atau CEST serta memverifikasi informasi wajib pajak melalui CNPJ.
Apa yang bisa Anda lakukan dengannya
- 1Terbitkan faktur elektronik baruClient AI dapat membuat faktur jasa berdasarkan permintaan dalam bahasa sehari-hari.
- 2Diagnosa dan perbaiki dokumen yang ditolakSistem dapat menginterpretasikan kode penolakan dari otoritas pajak untuk menyarankan apakah dokumen harus diterbitkan ulang atau diperbaiki.
- 3Lakukan pencarian kode fiskalDeveloper dapat mencari kode pajak spesifik seperti NCM atau CFOP untuk memastikan akurasi sebelum penerbitan.
- 4Kelola dokumentasi yang diterimaServer dapat membaca dan melakukan manifestasi pada dokumen yang diterbitkan oleh perusahaan lain terhadap ID pajak Anda sendiri.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
Cara menginstal Stackin MCP
Format diverifikasi 10 Nov 2026Instal Stackin MCP di Claude Code
$ claude mcp add --transport http stackin-mcp-plugin https://mcp.stackin.io/mcpInstal Stackin MCP di Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"stackin-mcp-plugin": {
"url": "https://mcp.stackin.io/mcp"
}
}
}Instal Stackin MCP di VS Code
.vscode/mcp.json
{
"servers": {
"stackin-mcp-plugin": {
"type": "http",
"url": "https://mcp.stackin.io/mcp"
}
}
}Instal Stackin MCP di Codex
~/.codex/config.toml
[mcp_servers.stackin-mcp-plugin] url = "https://mcp.stackin.io/mcp"
Instal Stackin MCP di Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"stackin-mcp-plugin": {
"httpUrl": "https://mcp.stackin.io/mcp"
}
}
}README
Lihat di GitHubAsk in plain language โ "issue an NFS-e for this service", "why was my last NF-e rejected?", "cancel invoice 1042 and tell me the reason code" โ and the model does it through Stackin, against SEFAZ and the municipal NFS-e webservices.
Sixteen tools, nine skills, one hosted server. No SDK to install, no XML to sign, no certificate to juggle in the client.
- ๐งพ NF-e (goods) and NFS-e (services) โ issue, consult, cancel
- ๐ Diagnose a rejection by the tax authority's own code, and choose reissue vs. correction
- โ๏ธ Correction letter (CC-e) against an authorized NF-e
- ๐ฅ Received invoices โ read and manifest documents other companies issued against yours
- ๐ข Numbering invalidation for a reserved, never-used NF-e range
- ๐ DANFE / DANFSe PDF straight out of the conversation
- ๐ Fiscal code lookup โ resolve an NCM, CFOP or CEST instead of guessing one, and confirm who a CNPJ belongs to
Table of contents
- Install in Claude Code
- Install in ChatGPT and Codex
- Connect from Cursor or any MCP client
- Authentication: OAuth or API key
- Skills
- What is in this repository
- One plugin, three clients
- MCP Registry
- FAQ
- Maintainer notes
Install in Claude Code
The repository is its own marketplace, so it installs straight from GitHub:
claude plugin marketplace add stackin-io/stackin-mcp-plugin
claude plugin install stackin@stackin
The plugin brings the nine skills and points Claude Code at https://mcp.stackin.io/mcp.
There is nothing to configure: the first tool call answers 401 with WWW-Authenticate,
and Claude Code follows it โ run /mcp in the session, authorize in the browser that opens,
and the token is stored for you. The client registers itself through /oauth/register, so no
client_id is handed out by anyone.
Prefer a static key? Add the server by hand with a header instead of installing the plugin โ see Authentication.
Install in ChatGPT and Codex
The same server is published as a ChatGPT app over Developer Mode. Enable developer mode,
register https://mcp.stackin.io/mcp as a connector, and authorize โ the full walkthrough,
with video, is at docs.stackin.io/mcp.
Connect from Cursor or any MCP client
Any MCP client can use the server directly, without this plugin. Cursor reads
.cursor/mcp.json in the project, or ~/.cursor/mcp.json. The interpolation syntax is not
the same as Claude Code's: Cursor wants ${env:VAR}.
{
"mcpServers": {
"stackin": {
"url": "https://mcp.stackin.io/mcp",
"headers": { "Authorization": "Bearer ${env:STACKIN_API_KEY}" }
}
}
}
Claude Code, by hand โ ${VAR} expands from the environment:
claude mcp add --transport http stackin https://mcp.stackin.io/mcp \
--header "Authorization: Bearer ${STACKIN_API_KEY}"
| Property | Value |
|---|---|
| Endpoint | https://mcp.stackin.io/mcp |
| Transport | streamable-http |
| Auth | OAuth 2.1 with PKCE and dynamic client registration, or a static Bearer key |
| Environments | Homologation and production, fixed on the key or on the authorized connection |
Authentication: OAuth or API key
Two ways in, and they behave differently.
An API key. Generate one at app.stackin.io; it already carries
the environment, so there is nothing to choose in the client. Send it as
Authorization: Bearer <key>.
OAuth, with no key at all. Leave the header out: a tool call answers 401 with
WWW-Authenticate pointing at /.well-known/oauth-protected-resource, which is what makes
Claude Code offer to log in when you run /mcp. The server supports dynamic client
registration (/oauth/register), so a client that registers itself gets a client_id without
anyone being asked. Cursor can also hold static client credentials under an auth key instead
of registering dynamically.
Verified on 2026-09-09, up to the browser: the server connects with no header at all, a tool
call answers 401 with the resource_metadata challenge, the protected-resource document
resolves, /oauth/register returns 201 and /oauth/authorize redirects to the consent
screen. The browser leg itself has not been walked from Claude Code or Cursor โ ChatGPT
completed a real consent, those two have not. If one stops midway, look at the redirect_uri
it uses: /oauth/authorize only accepts a URI the client registered.
Skills
A skill exists only where the order of operations, or a fiscal rule, adds something a tool description cannot carry on its own.
| Skill | What it carries |
|---|---|
issue-invoice |
Which document the situation needs, and validating before issuing |
consult-invoice |
Finding a document, and which identifier each operation takes |
cancel-invoice |
Confirming before an irreversible act, and when a correction letter is the right tool instead |
diagnose-invoice |
Reading the tax authority's own rejection code, and choosing between reissue and correction |
correct-invoice |
Filing a correction letter against an authorized NF-e, and what a CC-e may not change |
invalidate-numbering |
Declaring an NF-e numbering range reserved and never used |
received-invoices |
Reading documents other companies issued against this one, and answering them |
fiscal-lookup |
Resolving an NCM, CFOP or CEST before issuing, instead of guessing one |
taxpayer-lookup |
Confirming who a tax id belongs to, and why a 404 is not an invalid CNPJ |
What is in this repository
This repository is the distribution layer: the manifests, the skills and the assets. The
server itself lives at https://mcp.stackin.io/mcp and speaks the Model Context Protocol.
| Path | What it is |
|---|---|
.codex-plugin/plugin.json |
Plugin identity, version, category, legal links |
.app.json |
Maps the plugin to the registered MCP connection |
.agents/plugins/marketplace.json |
Local marketplace, for installing before publishing |
.claude-plugin/plugin.json |
Plugin identity for Claude Code |
.claude-plugin/marketplace.json |
This repository as a marketplace Claude Code can add |
.mcp.json |
The hosted MCP server, for Claude Code |
server.json |
The MCP Registry entry |
skills/ |
The nine workflows that need more than a tool description |
assets/ |
Icon and logo |
One plugin, three clients
The repo carries three manifests because three ecosystems look in three places, and each one fails silently when its file is missing:
| Client | Looks for | What it reads |
|---|---|---|
| ChatGPT / Codex | .codex-plugin/plugin.json + .app.json |
the app id and the hosted MCP |
| Codex marketplace | .agents/plugins/marketplace.json |
this repo as a source |
| Claude Code | .claude-plugin/marketplace.json, .claude-plugin/plugin.json, .mcp.json |
the skills and https://mcp.stackin.io/mcp |
Adding the folder to Claude Code failed with "No marketplace manifest found โฆ
(expected .cursor-plugin/marketplace.json or .claude-plugin/marketplace.json)" until the
third row existed. The skills are shared: all three point at skills/, so a skill written
once is read by every client.
MCP Registry
server.json describes the hosted server for the
official MCP Registry as a remote entry โ
io.github.stackin-io/stackin, streamable-http, no package to install.
Publishing is automated: pushing a v* tag runs .github/workflows/publish-mcp.yml, which
stamps the version from the tag, authenticates with GitHub OIDC (no stored token โ the
workflow's own identity is what grants the io.github.stackin-io/* namespace) and publishes.
git tag v1.0.0 && git push origin v1.0.0
The registry lists the public repository, which is why the entry lives here and not beside the server's own source.
FAQ
Do I need a digital certificate (A1/A3) in the client? No. The certificate is uploaded once at app.stackin.io and stays server-side.
Does it work in production, or only homologation? Both. The environment is fixed on the API key, or on the connection you authorized over OAuth โ there is nothing to pick per call.
Which municipalities are supported for NFS-e? The ones Stackin covers; consult docs.stackin.io. NF-e is nationwide through SEFAZ.
Can I use the server without this plugin? Yes โ it is a plain MCP server. The plugin only adds the skills and saves you the manual configuration.
Is it free? Issuing consumes credits from your Stackin account. Consulting and cancelling do not.
The code lookups answered 403 and now they do not. What changed? Until 2026-09-10
those four routes carried no OAuth scope, so an authorized app was refused whatever it had
been granted. They now need invoice:read, which every connection already holds โ a
connection made before that date works without being remade.
A CNPJ I know is valid comes back 404 from lookup_taxpayer. Is it wrong? Probably not.
That registry reloads monthly from the Receita Federal's dump, so a company registered in
the last few weeks is not in it yet. It is not a validity check, and nothing should block an
invoice over it.
Maintainer notes
app_id in .app.json was filled on 2026-09-06, once mcp.stackin.io was registered in
OpenAI Developer Mode and a real connector completed the OAuth authorisation. It was left
empty until then on purpose โ it is the one value that cannot be prepared ahead of time.
A stale tool list was fixed by creating a new app, not by rescanning. The first app
(asdk_app_6a9d458dโฆ) had been scanned before the NFS-e restriction and kept advertising the
old surface. .app.json now names the second one; if a third is ever created, this file is
the thing to update, and nothing warns you when it is wrong.
NF-e came back on 2026-09-07, in two steps. First document_type widened to accept nfe
on the existing eight tools โ a change the count could not reveal. Then the four NF-e-only
operations came back: correct_invoice, invalidate_numbering, list_received_invoices and
manifest_received_invoice. Twelve tools then, seven skills.
The four lookup tools landed on 2026-09-10: lookup_fiscal_code,
search_fiscal_codes, list_fiscal_kinds and lookup_taxpayer, with the
fiscal-lookup and taxpayer-lookup skills. Sixteen tools now, nine skills. They shipped refusing every OAuth
token, because their routes carried no scope at all; invoice:read was granted to them on
the same day, so nothing has to be reconnected.
The connector caches the tool list from the moment it was scanned. The app was authorized
at 10:48 on 2026-09-06 and the NFS-e restriction went live at 12:00, so ChatGPT kept
advertising eleven tools โ including three the server no longer has. Publishing a new plugin
version and running Scan Tools is what refreshes it; the fix is not on the server, which
was already correct. Check the count before testing anything: the server is the truth, and
scripts/check_skills.py reads it live.
Read the identifier off the connector page, not out of the URL. The address is
chatgpt.com/plugins/plugin_asdk_app_โฆ, and plugin_ there is part of the route, not of the
id. The page's own "App ID" field is the value that belongs here โ asdk_app_โฆ. Getting that
wrong is silent: nothing validates it until a submission fails.
mcp.authentication was bearer, written before the server spoke OAuth. The connector page
now reports Authorization used: OAuth, so it says oauth. The enum for that field is not
in OpenAI's published documentation โ developers.openai.com/codex/plugins/apps.md redirects
to a 404 โ so this is the honest description rather than a verified value. If the submission
rejects it, that is where to look first.
License
MIT โ see LICENSE.
Pertanyaan tentang Stackin MCP
Bagaimana cara menambahkan Stackin MCP ke Claude Code?
Jalankan claude mcp add --transport http stackin-mcp-plugin https://mcp.stackin.io/mcp di terminal Anda. Tambahkan --scope user agar tersedia di semua proyek.
Bagaimana cara menambahkan Stackin MCP ke Cursor?
Buka ~/.cursor/mcp.json dan tambahkan server di bawah mcpServers, menggunakan config Cursor yang ditunjukkan di bagian instalasi di atas.
Apakah saya perlu menyertakan sertifikat digital (A1/A3) di dalam client?
Tidak, sertifikat diunggah satu kali di app.stackin.io dan tetap tersimpan di sisi server.
Apakah ini berfungsi di lingkungan produksi, atau hanya homologasi?
Ini berfungsi di kedua lingkungan, yang ditentukan oleh API key atau koneksi OAuth Anda yang telah diotorisasi.
Apakah layanan ini gratis?
Penerbitan faktur menggunakan kredit dari akun Stackin Anda, tetapi konsultasi dan pembatalan dokumen tidak menggunakan kredit.
Bisakah saya menggunakan server ini tanpa plugin?
Ya, ini adalah MCP server standar; plugin hanya menyediakan skill dan menyederhanakan konfigurasi.