Skip to main content
Glama
LIMU Portal MCP

LIMU Portal MCP

LIMU Portal MCP

Model Context Protocol server for LIMU Portal operational and finance data. It supports the original local stdio/MySQL mode and a Vercel HTTP mode that authenticates with LIMU OAuth and calls LIMU Portal APIs.

Exposed Data

  • Clients, including editable profile records plus cargo, package, shipment, invoice, payment, order-form, lead, KYC, query, and mobile-account summaries.

  • Cargo records, tracking numbers, clients, shipment links, package totals, and cargo logs, with confirmation-gated cargo creation in Vercel HTTP mode.

  • Cargo package groups, package units, and stage-check summaries, with confirmation-gated package creation in Vercel HTTP mode.

  • Shipments, calendars, status updates, cargo totals, and budget summaries.

  • Monthly budgets, detailed budget entries, and controlled purchase scheduling.

  • Shipment customs budgets and shipping budgets, including income rows, expense rows, and budget logs.

  • Requisitions, requisition items, payment vouchers, voucher items, payment proofs, and controlled approval/payment actions.

  • Client profile reports, lead reports, order form reports, import product reports, leave applications, and timesheet reports.

Related MCP server: RiseUp MCP Server

Setup

cd /Applications/XAMPP/xamppfiles/htdocs/limu/mcp
cp .env.example .env
npm install
npm run smoke

Vercel HTTP MCP

The Vercel entrypoint is:

/api/mcp

It requires an OAuth bearer token issued by the LIMU Portal OAuth provider. The remote server validates tokens through:

GET /Api/v1/oauth/userinfo/

Then each tool forwards that same bearer token to the relevant LIMU Portal API endpoint, keeping portal permissions as the source of truth.

The server publishes OAuth Protected Resource Metadata at:

/.well-known/oauth-protected-resource

The portal publishes authorization server metadata and supports dynamic client registration, so Codex can register its temporary local callback automatically. Manual callback registration is not required.

Set this Vercel environment variable:

LIMU_PORTAL_BASE_URL=https://portal.limu.co.mw

Then deploy:

npm run build

Vercel will serve the MCP route over Streamable HTTP through mcp-handler.

Add the deployed server to Codex and authenticate it:

codex mcp add limu_mcp --url https://limu-mcp.vercel.app/api/mcp
codex mcp login limu_mcp

Run npm run smoke:oauth to verify protected-resource metadata and audience checks locally.

Client creation through the portal

limu_create_client calls POST /Api/v1/clients/create.php. Deploy that PHP endpoint and create-engine.php to the portal before deploying the MCP. It requires clients:write and Clients create permission. It defaults to a server-validated dry run; saving requires dryRun: false and confirm: true. Matching phone numbers or email addresses return HTTP 409 without changing the existing client. The endpoint serializes its own create requests; legacy portal writers do not share that lock. No schema migration is required. Run npm run smoke:client-create for registration, authorization forwarding, preview defaults, validation, and duplicate-conflict checks. Run php ../tests/client-create-validation-test.php from this directory to check the PHP input validator. Rollback: remove the MCP tool registration and the two new PHP files; existing client records need no rollback.

Cargo writes through the portal

  • Cargo and package creation require the cargo:write OAuth scope plus the employee's Cargo create permission.

  • Cargo merge and shipment assignment require cargo:write plus Cargo edit permission.

  • Merge and assignment default to dry-run previews. Execution requires an unchanged SHA-256 preview token, explicit confirmation, and a stable idempotency key.

  • Merges accept only Created, unassigned cargo owned by one client. Source cargo records are deleted after their related records are moved into the approved primary cargo.

  • Shipment assignment accepts only Created, unassigned cargo and changes its status to Booked.

  • Use limu_assign_cargo_shipment with cargoId and shipmentId to preview. Save with dryRun: false, confirm: true, the returned previewToken, and a stable idempotencyKey. Retrying that exact request as the same employee returns the saved result, even though the cargo is now Booked; reusing the key for different cargo, shipment, or preview is rejected.

  • Run npm run smoke:assignment for assignment defaults, confirmation guards, authenticated forwarding, retries, and API error propagation. The portal deployment runs PHP assignment validation and retry checks before uploading files.

The remote migration currently covers OAuth-protected health/userinfo, clients, cargo, cargo packages, shipments, monthly budgets, budget reports, purchase schedules, imports-and-orders, import-product, leads, client-profile reports, and a controlled QuickBooks accounting slice. The leads report returns conversion, source, segment, tag, and pipeline analytics while enforcing the viewer's portal report permissions. The client-profile report summarizes clients active in a selected cargo-activity period, including demographics, tiers, and relations-officer coverage. Requisition, payment voucher, and leave tools remain registered with explicit "portal endpoint pending" responses until their matching portal endpoints are added.

Cargo status corrections through the portal

limu_update_cargo_status calls POST /Api/v1/cargo/update-status.php. Deploy that endpoint and status-update-engine.php before the MCP release. It requires an authenticated employee, cargo:write, and Cargo edit permission. It accepts assigned cargo only; Created/Booked are handled by the existing creation and assignment tools.

Provide cargoId, expectedShipmentId, the exact expectedStatus, the requested status (including Collected), and a 3–500 character reason. Calls default to a server-validated preview with no writes. To save, reuse the preview token with dryRun: false, confirm: true, and a stable idempotencyKey. Stale cargo/shipment/owner state returns a conflict. Exact retries by the same employee return the original result; key reuse with different input is rejected.

This is an administrative status correction. It changes only cargo.cargostatus, with a cargo log and the existing MCP audit row in one transaction. It does not create a collection receipt, invent collector details, change finance/dispatch fields, or send notifications. Same-status requests are no-ops. No schema migration is required; the existing audit-table helper is reused only on confirmed calls.

Validation: npm run smoke:cargo-status and php tests/cargo-status-update-test.php in the portal. The Cargo status checks workflow also runs MySQL integration tests for save/retry/no-op behavior, stale previews, unrelated-field isolation, and rollback on log failure. Rollback: remove the MCP registration and the two new PHP files; already saved audit/history rows remain intact.

QuickBooks through the portal

The portal is the sole owner of the QuickBooks OAuth connection and keeps its Intuit tokens in the portal database. The MCP never receives or returns those credentials.

  • Read tools require the quickbooks:read OAuth scope and an Accounts, Customs, or Payment Vouchers view permission.

  • Invoice, bill, customer-payment, and bill-payment tools require quickbooks:write plus Accounts, Customs, or Payment Vouchers management permission.

  • Financial write tools default to dryRun: true; a real post requires both dryRun: false and confirm: true.

  • Every post requires a stable sourceReference and idempotencyKey. The portal records a local audit row and sends a matching QuickBooks requestid to prevent accidental duplicate postings.

  • Direct journal entries, updates, and deletes are deliberately not exposed.

Local Stdio MCP

Use a least-privilege MySQL user. A read-only user is enough for reporting tools, but write tools need narrowly scoped UPDATE access for Clients, monthly_budget_entry, and leave_applications, INSERT/UPDATE/DELETE access for monthly budget schedule splits, UPDATE/INSERT access for leave logs, requisitions, requisition logs, payment vouchers, and budget spend tables, plus DELETE access for eligible requisitions, requisition items/logs, payment vouchers, voucher items, and voucher proof rows. Write tools require confirm: true; use dryRun: true first to preview the exact proposed change. Client auth secrets, token hashes, KYC link tokens, and government ID numbers are intentionally omitted from client tool responses.

Run

cd /Applications/XAMPP/xamppfiles/htdocs/limu/mcp
npm start

Most MCP clients should launch it over stdio. Example client config:

{
  "mcpServers": {
    "limu-portal": {
      "command": "node",
      "args": [
        "/Applications/XAMPP/xamppfiles/htdocs/limu/mcp/src/server.js"
      ],
      "env": {
        "LIMU_DB_HOST": "127.0.0.1",
        "LIMU_DB_PORT": "3306",
        "LIMU_DB_NAME": "limutradee",
        "LIMU_DB_USER": "root",
        "LIMU_DB_PASSWORD": ""
      }
    }
  }
}

Tools

  • limu_health

  • limu_get_clients

  • limu_get_client

  • limu_create_client (Vercel HTTP mode)

  • limu_update_client

  • limu_list_cargo

  • limu_get_cargo

  • limu_update_cargo_status (Vercel HTTP mode)

  • limu_create_cargo

  • limu_merge_cargo

  • limu_assign_cargo_shipment

  • limu_sync_cargo_package_count

  • limu_get_cargo_action_audit

  • limu_list_packages

  • limu_get_package

  • limu_create_package

  • limu_update_package

  • limu_list_cargo_content_categories

  • limu_list_shipments

  • limu_get_shipment

  • limu_get_imports_and_orders_report

  • limu_get_import_product_report

  • limu_list_monthly_budgets

  • limu_get_monthly_budget

  • limu_get_budget_report

  • limu_list_purchase_schedule

  • limu_schedule_budget_purchase

  • limu_list_shipment_budgets

  • limu_get_shipment_budget

  • limu_list_customs_budgets

  • limu_get_customs_budget

  • limu_list_shipping_budgets

  • limu_get_shipping_budget

  • limu_list_requisitions

  • limu_get_requisition

  • limu_review_requisition

  • limu_delete_requisition

  • limu_list_payment_vouchers

  • limu_get_payment_voucher

  • limu_review_payment_voucher

  • limu_delete_payment_voucher

  • limu_mark_payment_voucher_paid

  • limu_list_client_profile_reports

  • limu_get_client_profile_report

  • limu_list_lead_reports

  • limu_get_lead_report

  • limu_list_order_form_reports

  • limu_get_order_form_report

  • limu_list_leave_applications

  • limu_review_leave_application

  • limu_list_timesheet_reports

  • limu_list_warehouse_timesheet_reports

All tools return JSON text payloads and list tools enforce a configurable limit cap.

Available Tools

39 tools
limu_delete_payment_voucherDelete payment voucherA
Destructive

Delete a submitted or declined payment voucher and its items/proof rows. Requires confirm=true for real deletes; use dryRun=true first.

Inputs: actorId (required), voucherId (required), dryRun, reason, +1 more.

limu_delete_requisitionDelete requisitionA
Destructive

Delete a requisition and its requisition items/logs when it has no linked payment vouchers. Requires confirm=true for real deletes; use dryRun=true first.

Inputs: actorId (required), requisitionId (required), dryRun, reason, +1 more.

limu_get_cargoGet cargoA
Read-onlyIdempotent

Get one cargo record with packages, collection details, and recent cargo log events.

Inputs: cargoId (required), logLimit, includeLogs, packageLimit.

limu_get_clientGet clientB
Read-onlyIdempotent

Get one LIMU client with recent associated cargo, shipments, packages, invoices, payments, order forms, leads, KYC, queries, and mobile access summaries.

Inputs: clientId (required), limit, includeKyc, includeCargo, +8 more.

limu_get_client_profile_reportGet client profile reportC
Read-onlyIdempotent

Get one client profile with recent cargo, lead, and order-form report context.

Inputs: clientId (required), limit, includeCargo, includeLeads, +1 more.

limu_get_clientsGet clientsB
Read-onlyIdempotent

List/search LIMU clients with associated cargo, shipment, package, invoice, payment, order, lead, KYC, and mobile-account summary data.

Inputs: name, tier, email, limit, +14 more.

limu_get_customs_budgetGet customs budgetA
Read-onlyIdempotent

Get one read-only customs shipment budget with income rows, expense rows, totals, and logs when present.

Inputs: budgetId, logLimit, shipmentId, includeLogs.

limu_get_lead_reportGet lead reportA
Read-onlyIdempotent

Get one lead with assigned employees and portfolio context.

Inputs: leadId (required).

limu_get_monthly_budgetGet monthly budgetB
Read-onlyIdempotent

Get a monthly budget period summary or one budget entry with schedule splits and linked requisition/payment voucher usage.

Inputs: limit, offset, search, category, +7 more.

limu_get_order_form_reportGet order form reportA
Read-onlyIdempotent

Get one order form with line items, status timeline, and purchase proofs.

Inputs: orderId, orderNumber.

limu_get_packageGet packageA
Read-onlyIdempotent

Get a cargo package by id or code, including units and stage checks.

Inputs: packageId, unitLimit, packageCode, includeUnits.

limu_get_payment_voucherGet payment voucherB
Read-onlyIdempotent

Get one payment voucher with items, proofs, and linked requisition details.

Inputs: voucherId (required).

limu_get_requisitionGet requisitionA
Read-onlyIdempotent

Get one requisition with items, logs, and linked payment vouchers.

Inputs: requisitionId (required), logLimit, includeLogs.

limu_get_shipmentGet shipmentA
Read-onlyIdempotent

Get one shipment with cargo summary, calendar entries, budget summary, and recent updates.

Inputs: shipmentId (required), logLimit, cargoLimit, includeLogs, +1 more.

limu_get_shipment_budgetGet shipment budgetC
Read-onlyIdempotent

Get one customs or shipping shipment budget with income rows, expense rows, totals, and logs when present.

Inputs: budgetId, logLimit, budgetType, shipmentId, +1 more.

limu_get_shipping_budgetGet shipping budgetA
Read-onlyIdempotent

Get one read-only shipping/shipment budget with income rows, expense rows, totals, and logs when present.

Inputs: budgetId, logLimit, shipmentId, includeLogs.

limu_healthLIMU MCP healthA
Read-onlyIdempotent

Check database connectivity and report which LIMU Portal tables are visible.

Inputs: no named parameters.

limu_list_cargoList cargoC
Read-onlyIdempotent

Search LIMU cargo records with client, shipment, and package summary context.

Inputs: limit, offset, search, status, +9 more.

limu_list_client_profile_reportsList client profile reportsC
Read-onlyIdempotent

Report on client profiles with cargo activity, lead counts, and order-form totals.

Inputs: tier, limit, gender, offset, +9 more.

limu_list_customs_budgetsList customs budgetsB
Read-onlyIdempotent

List read-only customs shipment budgets with income, expense, spend, and balance totals.

Inputs: limit, offset, search, budgetId, +1 more.

limu_list_lead_reportsList lead reportsC
Read-onlyIdempotent

Report on client leads with status, permission, district, owner, and volume summaries.

Inputs: limit, leadId, offset, search, +11 more.

limu_list_leave_applicationsList leave applicationsC
Read-onlyIdempotent

List leave applications with employee, leave type, balance, approval stage, and optional approval logs.

Inputs: endTo, limit, stage, offset, +12 more.

limu_list_monthly_budgetsList monthly budgetsB
Read-onlyIdempotent

List monthly budget entries with categories, spend, balance, and schedule summaries.

Inputs: limit, offset, search, category, +4 more.

limu_list_order_form_reportsList order form reportsC
Read-onlyIdempotent

Report on order forms with status, assignee, client, shipment, value, and volume summaries.

Inputs: limit, offset, search, status, +10 more.

limu_list_packagesList packagesC
Read-onlyIdempotent

Search cargo package groups and their unit check progress.

Inputs: limit, offset, search, cargoId, +6 more.

limu_list_payment_vouchersList payment vouchersC
Read-onlyIdempotent

List payment vouchers with requisition, spend, item, and proof summary context.

Inputs: limit, offset, search, status, +5 more.

limu_list_purchase_scheduleList purchase scheduleC
Read-onlyIdempotent

List scheduled budget purchases from monthly budget entries and split schedules.

Inputs: limit, offset, search, category, +5 more.

limu_list_requisitionsList requisitionsA
Read-onlyIdempotent

List finance requisitions with approval stage, items, and voucher spend totals.

Inputs: limit, stage, offset, search, +5 more.

limu_list_shipment_budgetsList shipment budgetsB
Read-onlyIdempotent

List customs and shipping shipment budgets with income, expense, spend, and balance totals.

Inputs: limit, offset, search, budgetId, +2 more.

limu_list_shipmentsList shipmentsC
Read-onlyIdempotent

Search shipments with calendar, cargo, and package totals.

Inputs: mode, limit, offset, search, +7 more.

limu_list_shipping_budgetsList shipping budgetsC
Read-onlyIdempotent

List read-only shipping/shipment budgets with income, expense, spend, and balance totals.

Inputs: limit, offset, search, budgetId, +1 more.

limu_list_timesheet_reportsList timesheet reportsB
Read-onlyIdempotent

Report on employee clock-in/clock-out timesheets with hours, lateness, exceptions, leave, and early/late request summaries.

Inputs: limit, offset, search, status, +4 more.

limu_list_warehouse_timesheet_reportsList warehouse timesheet reportsC
Read-onlyIdempotent

Report on warehouse work timesheets with schedule, shipment, payment, and employee context.

Inputs: limit, offset, search, endDate, +6 more.

limu_mark_payment_voucher_paidMark payment voucher paidA

Mark a management-approved payment voucher as paid, post voucher spend to monthly/shipment budget items, and refresh the requisition status.

Inputs: actorId (required), voucherId (required), dryRun, confirm.

limu_review_leave_applicationReview leave applicationA

Approve or decline a leave application at the admin or management stage. Requires confirm=true for real writes; use dryRun=true to preview.

Inputs: stage (required), actorId (required), decision (required), applicationId (required), +3 more.

limu_review_payment_voucherReview payment voucherA

Approve or decline a submitted payment voucher. Approval moves the voucher to management-approved; finance still marks it paid separately.

Inputs: actorId (required), decision (required), voucherId (required), dryRun, +2 more.

limu_review_requisitionReview requisitionB

Approve or decline a requisition approval stage using the same admin, finance, and management sequencing as the portal.

Inputs: stage (required), actorId (required), decision (required), requisitionId (required), +3 more.

limu_schedule_budget_purchaseSchedule budget purchaseA
Destructive

Set or clear a monthly budget purchase date, or add/update/delete split purchase schedule rows. Requires confirm=true for real writes; use dryRun=true first.

Inputs: action (required), actorId (required), budgetEntryId (required), dryRun, +4 more.

limu_update_clientUpdate clientA

Update editable LIMU client profile fields in the Clients table. Requires confirm=true for real writes; use dryRun=true to preview changes.

Inputs: actorId (required), clientId (required), dob, email, +22 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 39 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, but the three budget-related get/list pairs (customs, shipping, shipment) are very similar and could cause confusion, though descriptions help differentiate.

    Naming Consistency5/5

    All tools follow a consistent 'limu_verb_noun' pattern in snake_case, with the minor exception of 'limu_health' which is still clear and fits the convention.

    Tool Count2/5

    With 39 tools, the set is well beyond the recommended 3-15 range. While the domain is broad, the server would benefit from consolidating similar tools (e.g., unifying budget endpoints).

    Completeness3/5

    The server covers a wide range of query and management operations, but lacks create and update for many core entities (e.g., cargo, shipments), suggesting incomplete lifecycle coverage for autonomous agents.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A versatile MCP server that connects to multiple relational databases (MySQL, PostgreSQL, Oracle, SQL Server, SQLite) and enables secure read-only SQL query execution and metadata access.
      4
      -
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for programmatic read-only access to RiseUp cashflow data, allowing AI assistants to retrieve budget information via natural language.
      7
      1,264 npm
      39
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      MCP server for uControl, enabling read and write operations on schema, assets, and uMap via segregated tools with authentication.
      24
      -