MCP Overview

Enable AI agents to report payroll data via the Model Context Protocol

πŸ€– AI Agent Protocol (MCP)

The Model Context Protocol (MCP) is Audit1's newest ingestion method, enabling AI agents to discover requirements, validate data, and submit payroll reports programmatically.

πŸ“˜

What is MCP?

MCP is an open standard (JSON-RPC 2.0 over HTTP) designed for AI agent communication. Instead of hand-coding API calls, agents dynamically discover available tools, required fields, and validation rules β€” then submit data through a single endpoint.


How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Your AI Agent  β”‚  POST   β”‚   Audit1 MCP     β”‚  HTTP   β”‚   Audit1         β”‚
β”‚   (LLM, Script,  β”‚ ──────► β”‚   Server         β”‚ ──────► β”‚   Platform       β”‚
β”‚    Automation)   β”‚  /mcp   β”‚                  β”‚         β”‚  (Processing &   β”‚
β”‚                  β”‚ ◄────── β”‚  JSON-RPC 2.0    β”‚ ◄────── β”‚   Reporting)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Connect β€” Agent sends initialize to establish an MCP session
  2. Discover β€” Agent calls tools/list to learn available tools
  3. Explore β€” Agent calls get_expected_fields and list_employer_policies to learn requirements
  4. Validate β€” Agent calls validate_payroll_submission to pre-check data
  5. Submit β€” Agent calls submit_payroll_data to submit for real
  6. Monitor β€” Agent calls get_submission_status and get_validation_errors to track results

MCP vs REST API

πŸ€– MCPπŸ”— REST API
ProtocolJSON-RPC 2.0 (single endpoint)REST (multiple endpoints)
AuthenticationBearer token (mcp_...)Client ID + Secret headers
Primary audienceAI agents & LLMsDevelopers & applications
Tool discoveryBuilt-in (tools/list)Read documentation
Field discoveryBuilt-in (get_expected_fields)Read documentation
Pre-validationBuilt-in (validate_payroll_submission)Submit and check errors
Sandbox modeAgent-level (sandbox: true)Key prefix (audit1_test_*)
EndpointPOST /mcpMultiple REST routes
πŸ“˜

Which should I use? If you're building an AI agent or LLM-powered automation, use MCP. If you're building a traditional application integration, use the REST API.


Agent Types

TypeScopeUse Case
ProviderAll employers linked to a payroll companyA payroll company's agent reporting for multiple clients (e.g., ADP agent reporting for 100+ employers)
EmployerSingle employer onlyA bookkeeper's agent reporting payroll for one company
SandboxSame as above, but dry_run forcedDevelopment, testing, and onboarding β€” no data enters the real pipeline

Typical Agent Workflow

Step 1: initialize                    β†’ Handshake, confirm protocol version
Step 2: tools/list                    β†’ Discover 6 available tools
Step 3: list_employer_policies        β†’ Find active policies to report against
Step 4: get_expected_fields           β†’ Learn required fields, class codes, states
Step 5: validate_payroll_submission   β†’ Pre-validate rows (always dry-run)
Step 6: Fix any validation errors
Step 7: submit_payroll_data           β†’ Submit for real (dry_run: false)
Step 8: get_submission_status         β†’ Check Phase 1/2/3 results
Step 9: get_validation_errors         β†’ If RED rows, get details + suggestions

Available Tools

ToolDescriptionDetails
list_employer_policiesDiscover active policies for an employerReference
get_expected_fieldsRequired/optional fields per policyReference
validate_payroll_submissionPre-validate rows (always dry-run)Reference
submit_payroll_dataSubmit payroll rows for processingReference
get_submission_statusCheck Phase 1/2/3 processing resultsReference
get_validation_errorsGet RED row details with suggestionsReference

Next Steps

GuideWhat you'll learn
πŸ”MCP AuthenticationAPI keys, agent scoping, sandbox mode
πŸ“–MCP Tools ReferenceAll 6 tools with schemas, examples, and error codes
πŸ”—REST APITraditional API alternative

πŸ“§ Need Help?

Email [email protected] with:

  • Your agent name and API key prefix (first 12 characters)
  • The tool call that failed
  • The full JSON-RPC error response