Skip to main content
Glama
mcp-efile-mock

mcp-efile-mock

by b33-steve

Mock server: does not file with the IRS, does not connect to any IRS system, test data only.

mcp-efile-mock

A local, offline Model Context Protocol server that mimics the shape of IRS Modernized e-File (MeF) for a few employment-tax and extension forms, so developers and AI assistants can practice building, validating and "submitting" returns without touching anything real.

  • No network calls at runtime, no IRS connection, no credentials, no persistence (submissions live in memory until the process exits).

  • Not IRS-approved and not affiliated with the IRS. It cannot file, extend or pay anything.

  • Use fake values only: EINs starting 00 (for example 00-0000000), SSNs shaped like 000-00-0000. Never enter real taxpayer identifiers.

Maintained by efile.technology (Terragroupe, LLC), an invite-only e-filing API for software and AI agents. This mock is a separate, offline practice tool and cannot file anything. Mock docs: https://efile.technology/docs

Copyright (c) 2026 Terragroupe, LLC. MIT licensed (see LICENSE). Security contact: see SECURITY.md.

What it models

Form

Notes

941

Lines 1-15, deposit schedules, Schedule B (daily liability), Schedule R (aggregate filers), Form 8974 credit, refund choice

941-X

Per-line corrected vs previously reported amounts, adjustment and claim processes; linked to an original 941 in the mock MeF

944

Line-numbered annual model: wages through balance due, daily 945-A style schedule, Form 8974, final return, third-party designee

4868

Individual extension with optional payment (fake SSN only; signature only with payment)

7004

Business extension for 1041, 1042, 1065, 1066, 1120, 1120-F, 706-GS(T), 8804, 3520-A with due-date logic and payment authorization

Forms 940, 945, 1120-S and 8868 are not exposed in this version of the mock. A 7004 request for 1120-S is refused. 943 is listed as planned, not implemented.

Cross-cutting pieces:

  • "00" EIN prefix rule. A default (test) transmission needs an EIN beginning 00 (rule R0000-148, illustrative here). With the production indicator, 00 EINs are refused. Optional ATS mode adds the 94x test-EIN range.

  • Return header. Optional header block: Software ID (8 digits, first two = tax year; 94x quarterly YY99NNNN, annual YY88NNNN), ETIN, test indicator, transmitter IP, signature option (PIN / 8453 attachment), PIN fields, ERO and signer.

  • Transmission container. mock_submit_return returns an illustrative transmission header, manifest and zip-entry list (no file is created and nothing is sent), modeled on the public description in IRS Pub 4164.

  • Acknowledgements. JSON or illustrative XML. Processing is a status record (not proof of acceptance); Accepted/Rejected is an acknowledgement.

Related MCP server: Paymos MCP Server

Accuracy and rule codes (read this)

  • Rule codes are illustrative. Codes such as F941-030, HDR-001 or R0000-148 are labeled basis: "illustrative" in every result. Only four codes are taken from a downloaded IRS document and are labeled with their source (R0000-183-01, R0000-185, R0000-904-03, X0000-010, all from Pub 4164); even those are paraphrased and applied loosely. See src/rules.ts.

  • The official IRS MeF XSDs are not included. The IRS distributes schema and business-rule packages only through its Secure Object Repository (e-Services login). The generated XML uses hand-modeled element names in a mock namespace and will not pass the real IRS schema. xsd.status is not_available unless you install a package yourself (see below), and not_available means the XML was not schema-validated.

  • Optional real validation. If you legitimately hold an IRS schema package, place it at schemas/xsd/<form>/ with a manifest.json ({"main": "<root .xsd>", "version": "..."}). src/xsd.ts (pinned xmllint-wasm, pure WASM, offline) then validates against it. That folder is git-ignored and npm-ignored on purpose: do not redistribute IRS packages.

  • Due dates for 4868/7004 use weekend rollover only (federal holidays are not modeled) and follow the public IRS due-date charts for the common cases. Tax rates, limits and line numbers are modeled from public forms and may lag the current revision. Verify anything that matters against the IRS instructions.

  • Not modeled: stylesheets, 94x online signature PIN registration, state returns, real A2A/SOAP transport, certificates.

Tools

Tool

What it does

MCP hints

list_supported_forms

Lists forms, each form's top-level input fields (and which are required), the header fields, and which forms are planned or not available. Call first.

read-only, idempotent; closed-world.

validate_return

Validates formType + JSON data: input shape, recomputed line math, deposit/liability checks, header and EIN rules. Returns errors/warnings (code, path, message, basis), computed totals and xsd status. Read-only.

read-only, idempotent; closed-world.

build_return_xml

Validates, then returns illustrative MeF-style XML plus xsd status. Read-only.

read-only, idempotent; closed-world.

mock_submit_return

Submits to the in-memory mock MeF. Returns a 20-digit submission ID, message ID and the illustrative transmission container. Optional forceReject test hook.

not read-only, non-destructive (only adds in-memory records), not idempotent; closed-world.

get_acknowledgement

Returns the mock status record or acknowledgement for a submission ID (format: json or xml).

read-only, idempotent; closed-world.

Every tool also declares its MCP title, readOnlyHint, destructiveHint, idempotentHint and openWorldHint annotations; openWorldHint is false for all because the mock touches no external system.

Mock rejection triggers: any validation error (codes carried into the ack), EIN 99-9999999 (R0000-504-01, and also R0000-148 in test mode because it does not begin with 00), a duplicate of an already accepted return for the same form/identifier/period (R0000-902-01), a production-indicator submission whose Software ID has not "passed testing" (R0000-904-03), and forceReject (X0000-005-01).

Totals you state under stated are cross-checked against recomputed values (more than $1.00 off is an error, up to $1.00 a rounding warning). Example 941 input (fake values) is in test/fixtures.ts.

Quick start

Requires Node 22+.

  • npm: claude mcp add efile-mock -- npx -y mcp-efile-mock, or in any MCP client config: {"command": "npx", "args": ["-y", "mcp-efile-mock"]}.

  • MCP bundle: download efile-mcp-mock-0.2.0.mcpb from the latest release and open it in an MCP client that supports MCP bundles.

  • From source: see the next section.

Listed in the official MCP Registry as io.github.b33-steve/efile-mcp-mock.

Run from source

Requires Node 22+.

npm install
npm run build
npm test            # builds, then runs vitest (unit tests + a stdio MCP smoke test)
npm start           # runs the stdio server (waits for an MCP client)

How to try it with Claude Code

  1. Build the server (above), then register it using the absolute path to dist/index.js:

    claude mcp add efile-mock -- node /absolute/path/to/this-repo/dist/index.js
  2. Start claude and ask, for example:

    Use the efile-mock tools. List the supported forms, then validate a Form 941 for Q1 2025 for "Test Co Mock", EIN 00-0000000, with 5 employees, $100,000 of wages, $10,000 of federal income tax withheld, all wages subject to social security and Medicare, $25,300 of deposits on a monthly schedule with monthly liabilities of 8433.33, 8433.33 and 8433.34. Then mock-submit it and show me the acknowledgement.

    Try breaking it on purpose (change a monthly amount, use an EIN that does not start with 00, or submit the same return twice) and read the errors.

  3. Remove it with claude mcp remove efile-mock.

Other MCP clients can launch the same command over stdio.

Package contents and IRS reference files

IRS reference documents (Pubs 4163 and 4164 and the TY2026 forms lists) were used while building the mock. They are not included in this repository; get them from irs.gov. Some rule codes in src/rules.ts cite Pub 4164 and the rest are labeled illustrative.

Layout

src/forms/ per-form zod schema, math and XML; src/header.ts return header and EIN rule; src/registry.ts validate/build; src/mockMef.ts in-memory MeF; src/transmission.ts container and acknowledgement XML shapes; src/rules.ts rule-code provenance; src/server.ts MCP tools; test/ vitest.

Out of scope

Real MeF A2A transport (SOAP/WS-Security), X.509 certificate handling, official business-rule IDs and schema validation (needs IRS Secure Object Repository access), persistence, multi-tenant storage, and any real transmission. Do not use this project to prepare or transmit real returns.

Available Tools

5 tools
build_return_xmlBuild return XMLA
Read-onlyIdempotent

Validate the return and convert it to illustrative MeF-style XML. The XML uses hand-modeled element names in a mock namespace and will not pass the real IRS schema. xsd.status is 'valid' or 'invalid' only if IRS XSDs are installed locally; 'not_available' means the XML was NOT schema-validated. Returns xml: null with the validation result if the input is invalid. Read-only.

Inputs: data (required), formType (required).

get_acknowledgementGet acknowledgementA
Read-onlyIdempotent

Fetch the mock result for a submission ID from mock_submit_return. kind is 'StatusRecord' while status is Processing (not proof of acceptance) and 'Acknowledgement' once status is Accepted or Rejected; rejected results list errors with codes and basis. Use format 'xml' for the illustrative acknowledgement XML shape. In this mock the result is normally final on the first call; a Processing status appears only if the server is configured with polling delays, in which case repeat the call.

Inputs: submissionId (required), format.

list_supported_formsList supported formsA
Read-onlyIdempotent

List the form types this mock can validate, build and submit, with each form's top-level input fields (name and whether required), the optional header block fields, and which forms are planned or not available. Call this first. Read-only; no side effects.

Inputs: no named parameters.

mock_submit_returnMock submit returnA

Submit a return to the in-memory mock MeF (nothing leaves this process, nothing is persisted after exit). Returns a 20-digit submission ID, a message ID and an illustrative transmission container shape (header, manifest, zip entry list). Input that fails shape validation is not submitted; business-rule failures are submitted and come back Rejected. Then call get_acknowledgement with the submission ID. Submitting the same accepted return twice is rejected as a duplicate.

Inputs: data (required), formType (required), forceReject.

validate_returnValidate returnA
Read-onlyIdempotent

Check return JSON without submitting anything: input shape, line math recomputed from the inputs, deposit/liability checks, header and EIN rules. Returns valid, errors and warnings (each with a code, a JSON path, a message and a basis), computed totals, and xsd status. Read-only; stores nothing.

Inputs: data (required), formType (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool maps to a distinct stage of the mock e-file workflow: discovery, validation, XML rendering, submission, and acknowledgement retrieval. Although build_return_xml also validates, its description clearly separates XML conversion from the validation-only purpose of validate_return.

    Naming Consistency4/5

    All names use snake_case and generally follow a verb_noun pattern, such as list_supported_forms, validate_return, build_return_xml, and get_acknowledgement. mock_submit_return adds a qualifier prefix, which is a minor but readable deviation.

    Tool Count5/5

    The five tools are tightly scoped to the mock e-file lifecycle and each serves a clear purpose. There is no redundant tooling, and the set is small enough to stay coherent while covering the necessary workflow.

    Completeness4/5

    The surface covers the core end-to-end flow: discover forms, validate, build XML, submit, and fetch an acknowledgement. Minor operational gaps such as listing prior submissions or resetting mock state are absent, but they are not essential for the stated purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      A sovereign, MIT-licensed MCP server for US tax operations, enabling offline-capable and self-hostable tax workflow management.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Official Paymos MCP server and multi-AI plugin for stablecoin (USDT, USDC, USD1, DAI) and gold-backed XAUT payments across 13 networks: 188 workspace & Sandbox tools over remote Streamable HTTP OAuth 2.1 or local stdio bridge (191 tools + 27 docs).
      15
      1,321 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Local, stateful twins of the Jobber, Housecall Pro, and QuickBooks Online APIs. Its MCP tools let a coding agent reset, rewind, advance time, inject faults, and load scenarios while it builds and tests integrations, with no real accounts.
      14
      76 npm
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an AI assistant to manage tax documents, run the filing interview, work with forms, and prepare a US federal return locally. It supports the workflow through to printing/mailing or entering the return in IRS Free File Fillable Forms.
      AGPL 3.0