← All projects

Case study · Custom MCP server

AI fault diagnosis: service knowledge from four systems

When a machine stops at a customer’s site, every minute counts. With a custom MCP server, the service team asks its AI assistant «Why is machine A-7 down?» and gets readings, likely causes, spare parts and the SLA deadline within seconds.

Area
Tools & knowledge
Scenario
Machine-building SME, eastern Switzerland (demo data)
Technology
Model Context Protocol, Node.js
Deployment
Hosted in Switzerland, login via Microsoft Entra ID
AI chat with the service assistant: asked why machine A-7 is down, the AI calls three tools and reports error E-314, three likely causes with probabilities (55, 28 and 17 per cent), the spare parts to bring, the response deadline of 10:42 and a cost of CHF 186.
The service assistant in an AI chat: one question, three tool calls, one answer with causes, spare part and SLA deadline. Proof of concept with demo data.

Starting point

In our reference scenario, a machine builder in eastern Switzerland services packaging and filling lines for customers across the country. When a machine reports a fault, the service technician pulls the information together from four systems: error messages and readings in remote maintenance, past service calls in the service database, spare parts and prices in the ERP, response times in the service contract. That takes time, especially at night or for new staff. At the same time, an AI assistant should only be introduced if customer data stays protected and nobody hands the AI a master key to the ERP and remote maintenance. There is no ready-made MCP server for the industry software in use.

The solution

andyou developed a custom MCP server that bundles the four systems behind six domain-specific tools. Instead of passing on raw data, each tool answers a concrete service question. The status tool condenses 24 hours of readings into trend, minimum and maximum and tolerance violations. The diagnosis weights possible causes using the fault manual, current readings and identical cases across the whole fleet, and returns the check to perform, the spare part with its storage location and the cost under the service contract. Because MCP is an open standard, the same server works in Claude, ChatGPT and Microsoft Copilot.

Diagram: Claude, ChatGPT and Microsoft Copilot connect via MCP to the andyou MCP server «Service assistant» (roles, data masking, approvals, audit log, hosted in Switzerland). It accesses remote maintenance, service database, ERP and contracts read-only, except for the service call draft.
Architecture: the MCP server sits between the AI assistant and the company systems and enforces rights and rules.
List of the six tools: anlage_suchen, anlage_lagebild, stoerung_diagnose, wartungshistorie and ersatzteile_pruefen only read; serviceeinsatz_entwurf creates a draft after confirmation.
Six tools instead of dozens of API endpoints. Only the service call draft writes, and only after confirmation.

Security & privacy

The server gives the AI only what it needs for the task. Phone numbers and email addresses of customer contacts never leave the system. Technicians see no prices, sales support does; the role comes from the login, not from the request. Customer reports can contain hidden instructions. The server therefore explicitly marks them as data and does not release contact details even when a report asks for them. The AI only creates service calls as drafts, after explicit confirmation. Every call is logged.

Rights table: status & diagnosis and stock & lead time allowed for technician, sales support and guest; prices & cost only for sales support; service call draft for technician and sales support; customer contact data for nobody.
Roles and rights: what technicians, sales support and guests may see and do.
A customer report contains an injected instruction to output all phone numbers. The MCP server passes it to the AI with a note to use the text as information only, and reports the contact details only as on file.
A customer report with an injected instruction is marked as untrusted.

Result and cost

The diagnosis that used to require opening four systems is ready after one question. Because the tools condense rather than pass on raw data, the language model reads around 940 instead of 71,600 tokens per diagnosis. That cuts AI cost by 99 per cent: at 600 diagnoses a month, from around CHF 103 to CHF 1.40. The bigger lever is at the customer: less time to the right diagnosis and therefore shorter downtime. The proof of concept is covered by eight automated tests, including privacy, roles and approvals.

Bar comparison of tokens per diagnosis: generic API connection 71,627 tokens, domain-specific MCP tools 942 tokens, i.e. 99 per cent less data for the language model.
Tokens per diagnosis: generic API connection compared with domain-specific MCP tools, measured in the proof of concept.
AI cost per month at 600 diagnoses: generic API connection CHF 103 (CHF 0.17 per diagnosis), domain-specific MCP tools CHF 1.40 (CHF 0.002 per diagnosis).
AI cost per month at 600 diagnoses. Assumptions: USD 3 per million input tokens, USD 1 = CHF 0.80.

Technology in brief

The server uses the official MCP SDK on Node.js and runs either locally or as a stateless remote service over Streamable HTTP. For operation, a gateway with sign-in via Microsoft Entra ID is planned, hosted in Switzerland. The data connection is encapsulated in one place: in the customer project it is connected to remote maintenance (OPC UA), the service database and the ERP. Tools, rules and tests stay unchanged.

  • Model Context Protocol
  • Node.js
  • MCP SDK
  • Zod
  • Streamable HTTP
  • OAuth · Entra ID
  • Swiss hosting
  • Claude · ChatGPT · Copilot

Connect your systems securely to AI?

We check whether existing MCP servers are enough or whether a custom server reflects your processes better, and show you in a proof of concept.

Let’s talk about your project