
maxima mcp
An MCP server for interfacing with the Maxima Computer Algebra System (CAS) using the D language.
Repository Info
About This Server
An MCP server for interfacing with the Maxima Computer Algebra System (CAS) using the D language.
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Maxima MCP Server
An MCP server for interfacing with the Maxima Computer Algebra System (CAS) using the D language.
Overview
This project implements an MCP server that provides a stateless interface to Maxima through batch mode execution. Each command runs in isolation with proper resource management and timeout handling. The server uses the D-MCP server library for MCP protocol implementation.
Features
- Stateless batch mode execution
- Configurable execution timeout
- Complete output capture (stdout/stderr)
- Automatic resource cleanup
- Temporary file-based execution
- Process isolation per command
- Quiet mode operation
- UUID-based temporary file management
Requirements
- D compiler (DMD, LDC, or GDC)
- DUB package manager
- Maxima CAS installed and available in the PATH
- D-MCP server library (located at ../d-mcp-server)
Building
dub build
Running
./bin/maxima-mcp
Usage
Once the server is running, you can use MCP clients to connect and use the provided tool:
run_maxima_code: Execute Maxima code in batch mode- Parameters:
code: The Maxima code to execute
- Returns:
result: Complete output from Maxima execution
- Parameters:
Batch Mode Operation
The server executes each command in isolation:
- Creates temporary file with unique UUID
- Launches new Maxima process in quiet mode
- Uses --batch flag for file execution
- Enforces configurable timeout (default: 30 seconds)
- Captures complete stdout/stderr output
- Ensures cleanup of temporary files and processes
Error Handling
- Timeout enforcement with configurable duration
- Process management with proper cleanup
- Temporary file cleanup using scope(exit)
- Complete output capture for error diagnosis
- Process termination handling
- Non-blocking output collection
Project Structure
source/app.d: Main application and MCP tool registrationsource/maxima/client.d: Maxima batch mode client implementationmemory-bank/: Project documentation
License
MIT
Quick Start
Clone the repository
git clone https://github.com/gtnoble/maxima-mcpInstall dependencies
cd maxima-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.