Skip to main content
Glama
cfollette18

namakan-mcp-erp

by cfollette18
README.md
# namakan-mcp-erp

Internal MCP server: one ERP tool surface, including plants with **no API**. Namakan agents call `erp_get_po` whether the backend is NetSuite, Epicor, or a folder of CSV exports.

The dock supervisor asks Namakan if PO-1001 is open. They do not install an IDE plugin. `integration-engineer` already has this server.

## How agents connect

```yaml
mcp_servers:
  namakan-mcp-erp:
    command: uvx
    args:
      - --from
      - git+https://github.com/cfollette18/namakan-mcp-erp.git
      - namakan-mcp-erp
      - serve
    env:
      NAMAKAN_ERP_BACKEND: mock
    trust: full
```

Nightly CSV drops (per engagement, not in this repo):

```yaml
env:
  NAMAKAN_ERP_BACKEND: csv
  NAMAKAN_ERP_CSV_ROOT: /data/erp-export
```

Expected files: `vendors.csv`, `purchase_orders.csv`, `inventory.csv`. Packaged samples ship if the root is omitted.

## Architecture

![integration-engineer to MCP to ERP tools to CSV, Epicor, or NetSuite](docs/architecture.svg)

## Full AI workflow

![Find vendor, get PO, list inventory, then a blocked create](docs/workflow.svg)

1. `president-coo` assigns the ERP card to `integration-engineer`.
2. Agent calls `erp_run_workflow` (vendor → PO → inventory → blocked create).
3. `ciso` must approve any write. CSV backends refuse writes even then.

Demo without an agent process:

```bash
namakan-mcp-erp workflow
```

Expected: four JSON steps. Last step `"error": "writes_disabled"`.

## Tools

| Tool | Access | Arguments |
|---|---|---|
| `erp_find_vendor` | read | `query` |
| `erp_get_po` | read | `po_number` |
| `erp_list_pos` | read | — |
| `erp_list_inventory` | read | `sku?` |
| `erp_create_po` | write (off) | `vendor_id`, `lines?` |
| `erp_run_workflow` | read + blocked write | `use_case?`, `query?` |

## Potential use cases

![Nightly CSV export, receiving lookup, create PO later](docs/usecases.svg)

| Use case | Which agent | Why it matters |
|---|---|---|
| Nightly CSV export | `integration-engineer` | Competitors assume REST. North Metro plants often have a folder. |
| Receiving lookup | `integration-engineer` | Same tool on mock, CSV, or NetSuite. |
| Create PO later | `ciso` gates the write | Dry-run first. CSV adapters still refuse. |

`use_case`: `receiving-lookup` (default), `nightly-csv`, `create-po-later`.

## Tests

```bash
pip install -e ".[dev]"
pytest
```

## License

MIT. Copyright (c) 2026 Namakan AI Engineering.