# Query Sage X3 sales, stock, and revenue with OpenRouter Claude and MCP

> Quick overview This workflow lets users ask natural-language sales, stock, and revenue questions about Sage X3, using an OpenRouter-hosted Claude model to select from predefined Sage X3 SQL tools, and optionally exposing the same tools through a Bearer-authenticated MCP endpoint for MCP clients. How it works 1. Receives a user question through the n8n chat interface. 2. Uses a Claude model via OpenRouter plus conversation memory to interpret the request and keep context for follow-up questions. 3. Resolves customer and item names into Sage X3 codes when needed by querying Sage X3 reference data. 4. Queries Sage X3 for stock levels, stock movements, sales order history, or revenue aggregates/details using parameterized SQL tools. 5. Formats a concise answer based only on the returned Sage X3 data, including currency and time horizon when relevant. 6. Exposes the same Sage X3 query and order-creation tools as an MCP server endpoint protected by Bearer authentication. Setup 1. Install the

- **Domain**: `n8n-workflow-18168.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/18168
- Page (HTML): https://agenstry.com/agents/n8n-workflow-18168.n8n.io
- Documentation: https://n8n.io/workflows/18168
