# How to build an MCP server for Made2Manage

> Source: https://netray.co/integrations/made2manage-mcp-server
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Integrations

## Short answer

An MCP server for Made2Manage is a small service that exposes a handful of read-only tools, such as order status, job lookup, open POs and stock by part, backed by parameterised SQL Server queries. Any MCP client, including Claude and ChatGPT-compatible tools, can then use them without knowing your schema.

## System

Made2Manage

## Capability

mcp-server

## Intro

The Model Context Protocol gives AI clients a standard way to call tools and read resources. For Made2Manage, which has no built-in MCP support, that means you write the server yourself or commission it. The payoff is that one well-built server serves every client and every future model.

The real work is not the protocol. It is deciding which questions deserve a tool, how each tool maps to your SQL Server schema, and how to keep permissions tight on a system that was designed long before AI.

This page is a design guide for that server: tool list, authentication, transport, permissions and audit.

## Use Cases

### Order and job lookup tools

**Description:** get_sales_order, get_job and job_operations return exactly what a CSR or planner would see, in compact JSON.

### Inventory and availability

**Description:** stock_by_part and available_to_promise answer 'do we have it' with on-hand, allocated and incoming quantities.

### Purchasing visibility

**Description:** open_po_by_part and po_status expose promise dates and receipts so buyers and agents can reason about lateness.

### BOM and where-used

**Description:** bom_explode and where_used help engineers and agents answer impact questions about a part change.

### Resource for definitions

**Description:** Publish a resource that explains your status codes and local terminology so models stop guessing.

## System Surface

- SQL Server is the likely backing store for current installs; older FoxPro-based installs need a different data access path and probably an export or replication step.
- Use a read-only database user, preferably against a replica, with access limited to views you create for the server.
- Create SQL views that encode your business logic (what 'open' means, which statuses to exclude) so tools do not reimplement it.
- Check whether Aptean offers a supported API for your version; if so, a tool can wrap that instead of SQL for better rule enforcement.
- Part numbers, job numbers and sales order numbers have local formatting rules, such as padding. Normalise inputs in the tool.

## How It Works

### List the top 15 questions

**Detail:** Interview planners, buyers and CSRs. Each repeated question becomes a tool candidate; one-offs do not.

### Create database views

**Detail:** Build one view per tool with explicit columns, row limits and no sensitive fields. Grant the server account access to views only.

### Pick an SDK and write the tools

**Detail:** Use an official MCP SDK in TypeScript or Python. Define typed inputs, short descriptions and consistent output shapes with units and as-of time.

### Choose the transport

**Detail:** Use stdio for a local desktop client on one machine, and streamable HTTP for a shared server behind your gateway. Remote use needs real authentication.

### Add authorisation

**Detail:** Map the caller to a role and filter tool lists by role. A buyer should not see cost rates or payroll-adjacent data.

### Audit and test

**Detail:** Log each call, parameters and row counts. Use an MCP inspector and a regression list of questions with known answers.

## Example Flows

### Availability question

**Trigger:** Client asks: can we ship 200 of part X by Friday?

**Steps:**

- Model calls stock_by_part and receives on-hand and allocations.
- It calls open_po_by_part for incoming quantity.
- It answers with the numbers and states assumptions.

**Result:** A sourced answer rather than a guess.

### Engineering change impact

**Trigger:** Engineer asks what is affected if a component changes.

**Steps:**

- Call where_used for the component.
- Call open_jobs_by_part for each parent.
- Summarise jobs and open orders at risk.

**Result:** A quick impact list before the change is approved.

## On Prem

The server itself should run on your network, near the SQL Server replica, so no database port is ever exposed. Pair it with a local MCP-capable client and an open-weight model served by vLLM or Ollama, and the entire loop stays inside the building. For hosted clients such as Claude or ChatGPT, publish the server through an authenticated gateway or VPN rather than opening the ERP network. On older Windows servers, run the MCP service on a separate small VM so you never install runtimes on the machine hosting the ERP.

## Security

- Never expose raw SQL execution as a tool.
- Use a read-only account limited to purpose-built views.
- Require token or mTLS authentication for any remote transport, and rotate secrets.
- Filter tools and fields by caller role; log every invocation.
- Treat tool output as untrusted text when it reaches the model, since stored notes can contain injected instructions.

## Options

### Build it yourself with an MCP SDK

**Fit:** In-house developer comfortable with SQL Server and TypeScript or Python.

**Effort:** 2 to 4 weeks for a solid read-only server.

### Vendor-supported integration wrapped in MCP

**Fit:** Your Made2Manage version includes an official API that enforces business rules.

**Effort:** Depends on API scope; often a few weeks.

### Partner build such as Netray

**Fit:** You want tested tools, roles and audit without learning MCP internals.

**Effort:** A short scoped project, then add tools as needs appear.

## Pitfalls

- Exposing dozens of overlapping tools; keep the list short and distinct.
- Returning free-text notes that include prompt-injection text from outside parties.
- Forgetting pagination and limits, leading to enormous responses.
- Mismatched number formats or unit-of-measure confusion in outputs.
- Running the MCP server on the ERP host itself, tying it to legacy OS constraints.

## Faq

### What is an MCP server for an ERP?

**Answer:** It is a service that offers a standard set of tools and resources to AI clients. For Made2Manage, each tool wraps a vetted query, like open POs by part. Any MCP client can call them, so you build the integration once instead of per model.

### Which tools should we build first?

**Answer:** Start with read-only lookups: sales order status, job status, stock by part, open POs and BOM explode. These cover most daily questions, carry little risk and let you validate accuracy before anyone discusses write access.

### stdio or HTTP transport?

**Answer:** Use stdio when the client and server run on the same machine for one user. Use HTTP when several people or a hosted client need access, with proper authentication and TLS. Most shared deployments end up on HTTP behind a gateway.

### Can the server write to Made2Manage?

**Answer:** It can, but we advise against it early. Writes should go through supported application paths so costing and inventory rules apply. A safer pattern is a tool that creates a request for approval rather than updating tables directly.

### Does it work with both Claude and ChatGPT?

**Answer:** MCP is an open protocol and many clients support it, but client support and remote connection features differ and keep changing. Build to the standard, test with each client you plan to use, and expect small differences in setup.

## Search terms

made2manage mcp server, mcp server for made2manage, made2manage model context protocol, build mcp server erp sql server, made2manage ai tools api, made2manage mcp claude, made2manage read only ai access, mcp for on-prem erp

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
