engineer-mcp

engineer-mcp

MCP server for mechanical engineering calculations, giving coding agents verified answers for beams, bolts, shafts, bearings, stress, sections, and units with formulas and citations.

Category
访问服务器

README

Engineer MCP

CI License: MIT TypeScript Node

Engineer MCP is a Model Context Protocol server for mechanical-engineering calculations. It gives coding agents verified answers for beams, bolts, springs, shafts, bearings, stress, sections, and units. Every result shows the formula, the method, and the source.

What it provides

Use Engineer MCP inside an AI coding agent. The agent calls a tool and receives a complete engineering answer. The answer includes numbers, units, assumptions, and citations.

The release covers these domains:

  • Beam bending stress and deflection.
  • Bolt tensile design to ISO 898.
  • Helical compression spring design.
  • Shaft torsion and first critical speed.
  • Bearing rating life to ISO 281.
  • von Mises equivalent stress.
  • Cross-section properties.
  • Dimension-safe unit conversion.
  • Material property lookup.

How results stay trustworthy

Each result carries its provenance. The envelope lists the method, the formula, and the notes. It also lists the cited standards and texts.

Units are checked at every step. The unit layer knows the dimension of every unit. It rejects a conversion between incompatible quantities. For example, it rejects a torque-to-energy conversion.

Safety factors appear only when you provide a yield strength. The tool never hides an assumption. Warnings surface when a method uses an approximation.

Tools

Tool What it does
beam_bending Bending stress, deflection, and safety factor.
section_properties Area, inertia, and section modulus of a shape.
bolt_strength Stress area, preload, and capacity of a bolt.
spring_design Spring rate, shear stress, and safety factor of a compression spring.
shaft_analysis Torsion stress, twist, and critical speed.
bearing_life ISO 281 rating life in revolutions and hours.
von_mises Equivalent stress and yield safety factor.
unit_convert Conversion between compatible units.
material_lookup Curated mechanical properties of materials.

See docs/mcp-tools.md for the full reference.

Architecture

Engineer MCP keeps the math separate from the server. Pure engine functions take SI numbers and return plain objects. The server layer adds unit conversion, material lookup, and provenance. The database seeds from JSON files on first start.

flowchart LR
  Agent[AI coding agent] -->|MCP over stdio| Server[MCP server]
  Server --> Tools[Tools layer]
  Tools --> Engines[Calculation engines]
  Tools --> Units[Unit layer]
  Tools --> Db[SQLite data]
  Engines --> Provenance[Method and references]

Key directories:

Path Role
src/engine/ Pure calculation functions.
src/units/ Dimension-safe unit conversion.
src/db/ SQLite schema and seeding.
src/handlers.ts Tool orchestration and result envelopes.
data/ Material, fastener, and reference data.

Quick start

  1. Install Node.js 22.13 or newer.
  2. Clone or copy this repository to your machine.
  3. Run npm install to install dependencies.
  4. Run npm run build to compile the server.
  5. Run npm run demo to see the demo output.

The demo prints results for every tool. It runs against an in-memory database. It needs no API keys and no network access.

Run as an MCP server

Run the server over standard input and output.

node dist/index.js

Add it to your MCP client configuration. See examples/mcp-config.example.json for a template. Set ENGINEER_MCP_DB or pass --db <path> to choose the database file. The default database file is engineer-mcp.sqlite in the working directory.

Sample output

A call to beam_bending with a 20 kN point load on a 3 m S355 I-beam:

Maximum bending moment                  15 kN·m
Maximum bending stress               25.36 MPa
Maximum deflection                  0.6039 mm
Bending safety factor                    14

Method: Euler-Bernoulli beam theory
Formula: simply supported, point: M = FL/4, delta = FL^3/(48EI)
References:
  - Roark's Formulas for Stress and Strain (Eighth edition, 2011)
  - Mechanics of Materials (Euler-Bernoulli beam theory)

A call to spring_design for a steel spring under 2 kN with squared and ground ends:

Spring index                              5
Wahl factor                            1.31
Total coils                               6
Solid height                             48 mm
Spring rate                           158.6 N/mm
Deflection at load                    12.61 mm
Working length                        77.39 mm
Maximum shear stress                  521.4 MPa
Spring safety factor                  1.342

Method: Helical compression spring design
Formula: C = D/d, K_w = (4C-1)/(4C-4) + 0.615/C, tau = K_w 8FD/(pi d^3), k = G d^4/(8 D^3 Na), delta = F/k, Ls = d Nt
References:
  - Shigley's Mechanical Engineering Design (Tenth edition, 2015)
  - Machinery's Handbook (Thirty-first edition)

A call to unit_convert with a torque-to-energy request fails safely:

Error: Category mismatch: N·m is torque, J is energy.
Use a unit of the same quantity.

Development

Command Purpose
npm run typecheck Run the TypeScript compiler.
npm test Run the deterministic test suite.
npm run build Emit dist/ from src/.
npm run demo Run the end-to-end demo.
npm run dev Start the server from source.

Test status

The test suite is deterministic and offline. It covers the engines, the unit layer, the database, and the tools.

  • 98 tests across 10 files.
  • All tests pass on Node 22 and Node 24.
  • The CI workflow runs typecheck, tests, build, demo, and a package check.

Run npm test to reproduce the results.

Limitations

  • The beam theory applies to small elastic deflections.
  • The material table covers common engineering grades only.
  • The bolt tables cover coarse metric threads from M5 to M36.
  • The bearing factors are typical values for deep-groove ball bearings.
  • The critical speed is a first-mode approximation.
  • The spring design covers static round-wire springs only. It does not estimate fatigue life for cyclic loads.
  • The built-in SQLite module of Node.js is still experimental.

Check the cited sources for exact values.

Roadmap

The server grows in independent releases. Each release stays useful on its own.

Complete

  • Helical compression spring design. The spring_design tool reports the spring rate, the shear stress, and the safety factor.

Remaining

  • Add fatigue analysis for cyclic loads.
  • Add press-fit and interference-fit calculators.
  • Add more unit categories, including viscosity and thermal conductivity.
  • Add HTTP transport.
  • Add a catalog of ISO and DIN standard sections.

See docs/integration.md for the EngineerKit plan.

EngineerKit

Engineer MCP is part of the EngineerKit family. The family shares conventions for calculations, units, and provenance. Other EngineerKit servers can import @engineerkit/engineer-mcp/engine and @engineerkit/engineer-mcp/units. Read the boundary rules in docs/integration.md.

License

MIT. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选