SolidWorks API MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SolidWorks API MCP Serverlook up the ISldWorks.OpenDoc6 method"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SolidWorks API MCP Server
TypeScript MCP server that gives an AI assistant search and lookup access to the SolidWorks API documentation corpus in this repository: about 14,000 documented interfaces, methods, properties, enums and programming-guide examples.
Features
Relevance-ranked search over the whole corpus. Understands API names (
SelectByID2,IModelDocExtension.SelectByID2), descriptions (how do I create an extrusion feature) and word variants. See Search.Exact lookup of interface members, enum values, related members and examples, with case-insensitive names.
Helpful failures: a miss returns "did you mean" suggestions and, for members, the interfaces that actually declare them.
Discovery tools to list docsets and interface/enum names.
Compact responses: search hits omit noisy keyword lists unless asked (
verbose), and everylimitis capped so one call can't flood the client's context.Stdio transport (
stdin/stdout), MCP protocol versions2025-06-18,2025-03-26and2024-11-05negotiated automatically (JSON-RPC batches accepted for the older versions).
Related MCP server: Fluent MCP Server
Runtime and Tooling
Runtime: Bun + TypeScript
Tests: Vitest; type checking:
tscBun-only JavaScript tooling:
bun install,bun run <script>,bunx <tool>
Quick Start
bun install
bun run startData Root
By default the server reads from <repo>/solidworks-api. Override with SW_API_DATA_ROOT:
$env:SW_API_DATA_ROOT = "C:\path\to\solidworks-api"
bun run startThe server exits with an error if the data root does not exist.
Client Configuration
Claude Desktop (claude_desktop_config.json), Windows example:
{
"mcpServers": {
"solidworks-api": {
"command": "bun",
"args": ["run", "C:\\path\\to\\solidworks-api-mcp\\server\\solidworks_mcp_server.ts"]
}
}
}Claude Code:
claude mcp add solidworks-api -- bun run C:\path\to\solidworks-api-mcp\server\solidworks_mcp_server.tsRestart the client after changing its configuration.
Tools
All tools are read-only. Names are case-insensitive. Bad arguments are reported as tool errors (isError) that name the offending field.
Tool | Purpose |
| Ranked search by keywords, description or API name. Filters: |
| Full documentation page for |
| Names of all members of an interface. |
| Members, values and descriptions of an enum such as |
| "See also" members for an interface member ( |
| Example code for a member, or a search of the programming-guide examples ( |
| Available docsets ( |
| Interface or enum names in a docset, with an optional substring filter ( |
Failed lookups return { "error": "Not found", "message": ..., "suggestions": [...] }, plus declared_on when the member exists on other interfaces. Unknown docsets return { "error": "Unknown docset", "available": [...] }; a search that comes back empty because of one carries a note saying so. Document paths in results are relative to the data root.
Search
Ranking is a field-weighted BM25 over identifier-aware terms (server/search.ts):
Identifiers are split on case and digit boundaries (
SelectByID2becomesselect,id,2) and also kept whole, so exact API names outrank their fragments.Filler words are ignored, words are lightly stemmed, and longer words and a few domain synonyms (
extrusion/extrude,document/doc,save/export, ...) match at reduced weight.An identifier also matches its numbered versions (
FeatureExtrusionfindsFeatureExtrusion3), and stopwords next to a word are tried as part of an identifier, sosave asfindsSaveAs3.Members whose documentation marks them obsolete (about a fifth of the corpus) rank below current ones.
A one-word query that is a member name ranks exact matches first (current before obsolete); one that names a concept (
sketch) ranks its interface (ISketch) first.
The index is built in memory from _search_index.json right after the client's initialized notification, so the first query does not pay for it.
Development
bun run test # vitest
bun run typecheck # tsc --noEmitRanking is regression-tested against the real corpus in tests/search.test.ts; tests/protocol.test.ts also drives the server over stdio.
Project Structure
solidworks-api-mcp/
|- server/
| |- solidworks_mcp_server.ts JSON-RPC/MCP protocol, entry point
| |- tools.ts tool definitions and handlers
| |- schema.ts tool argument validation
| |- search.ts ranking engine
| |- store.ts data store (indexes, paths, search)
| |- catalog.ts docset/interface/member/enum name resolution
| |- suggest.ts "did you mean" suggestions
| |- outbox.ts ordered, backpressure-safe stdout writer
| |- util.ts shared helpers
| `- types.ts
|- solidworks-api/ documentation corpus (markdown + JSON)
|- tests/
|- bin/solidworks-mcp
`- package.jsonThis server cannot be deployed
Maintenance
Related MCP Connectors
Search and query nTop's knowledge base and engineering guides from AI applications.
Provides tools for searching Google Workspace documentation and much more.
Read-only search over the Vocenya AI receptionist API docs and endpoints, with code samples.
Get up-to-date, version-specific documentation and code examples from official sources directly in…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI tools to search and explore API documentation from Apidog projects or OpenAPI/Swagger specifications, providing endpoint details, schemas, and project statistics through natural language queries.1,260 npm1ISC
- AlicenseAqualityAmaintenanceEnables natural language interaction with ServiceNow Fluent SDK commands, API specifications, and development resources for AI-assisted environments.17239 npm31MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI (e.g., Claude) to control SolidWorks via natural language, automating part creation, sketching, and feature operations through the Model Context Protocol.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching official ANSYS SpaceClaim API documentation and generating SCDM Python code candidates from natural language modeling intents.3MIT