mcp -rust
Rust MCP Local Server
claude mcp add --transport stdio lotharschulz-mcp-server-rust node [your local path]/mcpserver/build/index.js
How to use
This MCP server wraps a simple Rust function and exposes it to an MCP client via a Node.js entry point. The project integrates Rust-compiled logic (via wasm) with a JavaScript/TypeScript wrapper, allowing you to call the Rust function through the MCP protocol. In Claude Desktop, you point a local build output (the index.js file) to the MCP server entry, enabling Claude to request the function and receive results. The typical flow is to build the Rust wasm bindings, install dependencies, and run the node-based server that serves the WASM-backed function to your MCP client.
To use the tools, configure Claude Desktop to load the local mcpserver build index.js as shown in the configuration example. When you start Claude Desktop with this MCP server enabled, you will see the MCP server function icon in the frontend and can grant permission to use the function. The Rust function implemented in this repository is exposed through the MCP client, so you can invoke it by sending an MCP request to the server and reading back the computed result (e.g., factorial or other test functions implemented in the Rust code). The development workflow emphasizes building the WASM bindings, installing dependencies, and then running the Node server that serves the function to clients.
If you are testing locally, you can run the provided npm scripts to build and verify the Rust/WASM integration, then test calls against the server. The README mentions commands to release the wasm bindings, run tests, and verify imports, which are part of validating that the MCP server correctly exposes the Rust function to clients.
How to install
Prerequisites:
- Node.js and npm installed on your system
- Rust toolchain installed (rustc, cargo)
- Optional: wasm-pack if you are building WebAssembly bindings separately
Step-by-step installation:
- Install dependencies
npm install
- Build the Rust WASM bindings for release (produces the wasm and JS glue)
npm run build:wasm:release
- Build the JavaScript/TypeScript wrapper and prepare the package (as described in the release steps)
npm install
- (Optional) Run tests for the Rust code to ensure correctness
npm run test:rust
- Start or configure your MCP server entry point (see README for exact path to index.js used by Claude Desktop)
Notes:
- The configuration example shows a Node.js based server at a local path: [your local path]/mcpserver/build/index.js
- Ensure the build output path matches what your mcp_config references
- For Claude Desktop, ensure the configuration file is placed in the correct user data/location per your OS (as shown in the README)
Additional notes
Tips and common issues:
- If the Rust import fails, run npm run build:wasm:release to rebuild the wasm binding that the factorial import depends on.
- Ensure the path in the mcp_config matches the actual location of your built index.js file used by the MCP server.
- The Claude Desktop configuration uses a simple JSON with an mcpServers entry; adjust the server name if you have multiple MCP servers.
- Rust testing can be run via npm run test:rust or via cargo test in src/lib/rust-functions-lib, depending on your workspace setup.
- If you see permission prompts in Claude Desktop, grant access to the mcp server function to enable integration.
Related MCP Servers
context7
Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
MiniMax -JS
Official MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!
akyn-sdk
Turn any data source into an MCP server in 5 minutes. Build AI-agents-ready knowledge bases.
ultrafast
High-performance, ergonomic Model Context Protocol (MCP) implementation in Rust