Production Plan Variance MCP Server
Exposes read-only tools for querying production plan variance, issue tracking, plants, and shop floors from a DWH database, mirroring a dashboard's data.
README
Production Plan Variance MCP Server
A small MCP server that exposes the Production Plan Variance & Issue Tracking
dashboard (erp.peopledesk.io/production-management/mes/ProductionPlanVariance)
as five read-only tools, backed directly by the DWH database:
| Tool | Mirrors |
|---|---|
get_variance_summary |
The four tiles: Plan Lines / On Target / Variance Flagged / Issues Missing |
list_plan_variance |
The row grid (plan code, item, plant, qty, difference, reason, status) |
list_variance_reasons |
The "Issue for Difference" reason config + escalation emails, per plant |
list_plants |
Plant filter dropdown |
list_shop_floors |
Shop Floor filter dropdown |
It queries these DWH tables (verified against the live schema):
tblProductionPlanVarianceIssueArc, tblProductionPlanVarianceReasonArc,
tblPlantArc, tblShopFloorArc.
Why this shape
You asked for something anyone can use via a JSON file, without anyone entering database credentials. So the design is:
- One server, hosted by you, holding the DB credentials in its own
environment variables (
.env, never committed, never sent to clients). - Everyone else just drops
mcp-config.jsoninto their MCP client (Claude Desktop, Claude Code, etc.) — it only contains a URL, nothing secret. The server is the only thing that talks to SQL Server. - All queries are fixed, parameterized SELECTs defined in
src/queries.js— there is no free-form SQL tool exposed, so nobody using this MCP server can query outside the dashboard's own data or run writes.
⚠️ Before you deploy: confirm DB permissions
While building this, I verified the schema (tables/columns) using your
mssql-test-server connection, but every actual row-level SELECT against
tblProductionPlanVarianceIssueArc / tblPlantArc etc. failed — schema
introspection worked, data queries didn't. That's almost certainly a
permissions gap on that specific SQL login (mcp_user), not a problem
with these queries. Before going live:
- Create (or reuse) a SQL Server login with
SELECT-only rights on the DWH tables listed above. - Test manually, e.g.:
SELECT TOP 5 * FROM dbo.tblProductionPlanVarianceIssueArc; - Only then point
DB_USER/DB_PASSWORDin.envat that login.
Deploy
Option A — your own server (nginx/Caddy in front)
npm install
cp .env.example .env # fill in DB_SERVER / DB_USER / DB_PASSWORD
npm start # listens on :3300, endpoint POST /mcp
Put it behind HTTPS on a domain reachable by your team, e.g.
https://mcp.yourcompany.com/mcp.
Option B — Vercel (already set up in this repo)
The api/mcp.js + vercel.json files convert the same server into a
Vercel serverless function, exposed at /mcp.
- Push this folder to a GitHub repo (or run from the folder directly).
- Install the CLI once:
npm i -g vercel - From inside
production-variance-mcp/, log into your own Vercel account and deploy:vercel login vercel --prod - In the Vercel dashboard → your project → Settings → Environment
Variables, add
DB_SERVER,DB_PORT,DB_DATABASE,DB_USER,DB_PASSWORD,DB_ENCRYPT,DB_TRUST_CERT(same values as.env.example), then redeploy so the function picks them up. - Your MCP endpoint is now
https://<your-project>.vercel.app/mcp. Put that URL intomcp-config.jsonand hand it out.
Note: SQL Server must be reachable from Vercel's network (i.e. not
firewalled to only your office IP) — check with whoever manages
203.202.241.211 if the connection times out after deploying. Also add
some form of auth in front of /mcp (see note below) before this URL is
public — right now anyone with the link can call these read-only tools.
Distribute
Edit mcp-config.json, replacing YOUR-HOSTED-DOMAIN with your real
domain, then share that one file. Anyone adds it to their MCP client and
immediately has read-only chat access to this dashboard's data — no
install, no credentials, no SQL knowledge required.
Notes / things to double check on your end
- The dashboard's "Machine" column (e.g. "Aromatic Unit Line - 01")
wasn't found on
tblProductionPlanVarianceIssueArcin the schema I pulled — it's likely resolved via a production line/work-center table in your environment.list_plan_variance's query doesn't include it yet; add the appropriate JOIN insrc/queries.jsonce you confirm the source table (candidates:tblProductionLineArc,tblWorkCenterArc). get_variance_summary's "Issues Missing" logic assumes it means "flagged variance with no reason/status recorded yet" — confirm this against the app's actual business logic and adjustQUERY_SUMMARYif different.- Add auth (API key / OAuth) in front of
/mcpbefore exposing it beyond your internal network — this build has none by default.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。