USDA NFC Personnel Processing Monitor
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
USDA NFC Personnel Processing Monitor
A read-only MCP server and web dashboard that parses USDA NFC fixed-width flat-file personnel processing return records, classifies each record by source system, surfaces SINQ error codes for analysis, and presents the results through both an MCP tool (for LLM clients) and a Starlette/Jinja2 HTML dashboard (for human reviewers).
What this project does
The NFC return file contains one fixed-width record (200 characters) per personnel transaction. Each record may carry a SINQ error code indicating why the transaction was rejected or held. This tool:
Parses the fixed-width
.DATfile without modifying it.Classifies each record as EmpowHR, Employee Personal Page, or Unknown based on indicator fields.
Looks up each SINQ error code against an approved reference description table.
Exposes a read-only MCP tool (
find_processing_errors) that LLM clients can call to get a structured summary.Serves a filterable, paginated HTML dashboard at
GET /dashboardwith:Summary cards (total records, SINQ error count, source breakdown).
Hierarchical SINQ error breakdown grouped by error code → DOCU_TYPE with approved reference descriptions.
A results table with an
approved_descriptioncolumn.CSV download (
GET /dashboard/download) respecting all active filters.A natural-language Ask box backed by watsonx.ai (with a local fallback for common questions when watsonx is not configured).
This project is strictly read-only. No write, update, delete, or resubmit paths exist anywhere in the codebase.
Related MCP server: servicenow-mcp
Dashboard preview
┌─────────────────────────────────────────────────────────────────────────────┐
│ USDA NFC Personnel Processing Monitor [Download CSV] │
├──────────────┬──────────────┬──────────────┬──────────────┬─────────────────┤
│ Total Records│ Parse Errors │ SINQ Errors │ EmpowHR │ Emp. Personal │
│ 1,432 │ 3 │ 891 │ 1,021 │ 408 │
├─────────────────────────────────────────────────────────────────────────────┤
│ Ask a question about the data... [Ask] │
│ > "what is the most common SINQ error?" │
│ ◀ The most common SINQ error is code 008 with 312 record(s) — │
│ NATURE OF ACTION CODE IS INVALID FOR THIS TRANSACTION TYPE │
├─────────────────────────────────────────────────────────────────────────────┤
│ SINQ ERROR BREAKDOWN [Show all 14 errors ▼] │
│ │
│ ▸ ERROR 008 ── total 312 │
│ DOCU_TYPE 060 │ 198 records │ NATURE OF ACTION CODE IS INVALID... │
│ DOCU_TYPE 032 │ 72 records │ NATURE OF ACTION CODE IS INVALID... │
│ DOCU_TYPE 100 │ 42 records │ No approved reference available │
│ │
│ ▸ ERROR 507 ── total 204 │
│ DOCU_TYPE 060 │ 204 records │ POSITION SUPERVISORY CODE MUST BE 2 OR 4 │
│ │
│ ▸ ERROR 021 ── total 187 │
│ DOCU_TYPE 060 │ 187 records │ EMPLOYEE NOT IN PAY STATUS │
│ · · · (10 of 14 shown) │
├─────────────────────────────────────────────────────────────────────────────┤
│ FILTER Sub-agency [ ] Company [ ] DOCU_TYPE [ ] Source [ ▼] │
│ SINQ error [ ] Has SINQ error [any ▼] [Apply] [Clear] │
│ Showing 50 of 891 filtered records │
├──────┬─────────────┬─────────┬──────────┬──────────────────┬───────────────┤
│ Line │ Sub-Agency │ Company │ DOCU_TYPE│ Source │ SINQ Error │
│ │ │ │ │ │ Description │
├──────┼─────────────┼─────────┼──────────┼──────────────────┼───────────────┤
│ 1 │ AG │ 01 │ 060 │ EmpowHR │ 008 │
│ │ │ │ │ │ NATURE OF ... │
│ 2 │ AG │ 01 │ 060 │ EmpowHR │ 507 │
│ │ │ │ │ │ POSITION S... │
│ 4 │ AG │ 02 │ 032 │ Emp. Personal Pg │ 021 │
│ │ │ │ │ │ EMPLOYEE N... │
│ ... │ │ │ │ │ │
│ │ [◀ Prev] │ │ │ Page 1 of 18 │ [Next ▶] │
└──────┴─────────────┴─────────┴──────────┴──────────────────┴───────────────┘Note for contributors: To add a real screenshot, run the dashboard, take a full-page capture (Chrome: F12 → device toolbar → Capture full size screenshot), save it as
docs/images/dashboard.png, and replace this block with.
Repository structure
mcp-hackathon-template/
├── README.md # This file
├── QUICKSTART.md # Setup and first-run guide
├── SECURITY.md # Vulnerability disclosure + data-privacy notes
├── main.py # Local entry point (uv run python main.py)
├── pyproject.toml # Package + dependencies (uv)
├── requirements.txt # Mirror of runtime deps (for buildpack hosts)
├── .env.example # Copy to .env — fill in DAT_FILE_PATH
├── reference-data/
│ └── sinq_error_reference.txt # 75-char fixed-width approved error descriptions
├── src/
│ └── example_server/
│ ├── app.py # FastMCP entry point, picks transport
│ ├── config.py # Settings from env vars / .env
│ ├── parser.py # Fixed-width DAT parser → ParsedRecord / ParseError
│ ├── query.py # RecordFilter, ProcessingMonitor, load_monitor
│ ├── reference.py # Reference-file parser, ReferenceTable, lookup()
│ ├── dashboard.py # HTTP routes: /dashboard, /dashboard/download, /ask
│ ├── ask.py # build_context(), answer_locally(), ask_watsonx()
│ ├── models.py # Pydantic models (PaginationParams)
│ ├── utils.py # paginate() helper
│ ├── routes.py # /health, /version routes
│ ├── tools/
│ │ ├── __init__.py # register_tools() aggregator
│ │ └── find_processing_errors.py # Read-only MCP tool
│ └── templates/
│ ├── dashboard.html # Main dashboard page
│ └── record_detail.html # Individual record drill-down page
├── tests/ # 384 tests — all synthetic data, no real DAT files
│ ├── test_parser.py
│ ├── test_query.py
│ ├── test_reference.py
│ ├── test_dashboard.py
│ ├── test_find_processing_errors.py
│ ├── test_ask.py
│ └── test_server.py
└── docs/
├── PROJECT_LOG.md # Detailed milestone-by-milestone implementation log
├── TEAM_RUNBOOK.md # Beginner setup and usage guide
└── EVALUATION_REPORT.md # Findings from AI_HACK_TEST_TWO.DAT evaluationGetting started
See QUICKSTART.md for the full step-by-step guide. The short version:
cp .env.example .env
# Edit .env — set DAT_FILE_PATH to your .DAT file and REFERENCE_FILE_PATH
# to reference-data/sinq_error_reference.txt
uv sync
MCP_TRANSPORT=streamable-http uv run example-server
# Open http://localhost:8000/dashboardTransaction file layout
Each valid record is exactly 200 characters after stripping line endings.
Field | 1-based positions | Python slice |
| 10–11 |
|
| 16–17 |
|
| 18–20 |
|
| 45–51 |
|
| 52–54 |
|
| 55–103 |
|
| 186–193 |
|
Source classification — EmpowHR takes precedence:
Condition | Source |
|
|
|
|
Neither |
|
Running checks
uv run ruff check . # lint — must be clean before any PR
uv run pytest tests/ -v # 384 tests, all synthetic dataSecurity and data handling
.DATtransaction files are gitignored — never commit them. Place them insample-data/(also gitignored) or pointDAT_FILE_PATHat any local path outside the repository.SINQ_MESSAGE, raw 200-character lines,gwebess_raw, andpowrdocs_raware stripped before any template rendering, MCP output, or CSV serialisation.The CSV download is capped at 10,000 rows and protected against Excel formula injection.
See SECURITY.md for the full vulnerability disclosure policy and data-handling notes.
Evaluation report
See docs/EVALUATION_REPORT.md for a full analysis of the test data file: parse quality, source classification findings, SINQ error breakdown with approved descriptions, reference lookup coverage, feature validation checklist, test suite summary, and remediation recommendations.
License
MIT.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
One governed MCP endpoint for 40+ business systems. Read-only, source-cited answers.
Read-only MCP access to authorized Vocci sessions, notes, files, and memory search.
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
Related MCP Servers
- AlicenseAqualityBmaintenanceA read-only MCP server that exposes SQL database access to LLMs, supporting multiple database types, compact columnar results, pagination, and file export.712 npmMIT
- AlicenseAqualityDmaintenanceA read-only MCP server that enables AI assistants to query ServiceNow instances—incidents, changes, users, CMDB—with malformed query linting and injection protection.7MIT
- FlicenseNot gradedqualityDmaintenanceEnables natural language querying of a customer and orders database through read-only MCP tools for finding customers, listing orders, and generating revenue summaries.-
- AlicenseAqualityDmaintenanceProvides read-only SQL Server access via MCP tools and a chat interface for natural-language database queries.4ISC