# Math MCP Server

A Model Context Protocol (MCP) server for mathematical calculations.

## Features

- **Basic Calculations**: Evaluate mathematical expressions
- **Equation Solving**: Solve linear equations
- **Safe Evaluation**: Secure expression parsing

## Installation

### Using npx (Recommended)
```bash
npx math-mcp-server
```

### Using npm
```bash
npm install -g math-mcp-server
math-mcp-server
```

## Usage

The server provides two tools:

### 1. calculate
Evaluate mathematical expressions:
```json
{
  "name": "calculate",
  "arguments": {
    "expression": "2 + 3 * 4"
  }
}
```

### 2. solve_equation
Solve linear equations:
```json
{
  "name": "solve_equation",
  "arguments": {
    "equation": "2x + 5 = 15"
  }
}
```

## MCP Client Configuration

Add to your MCP client configuration:

```json
{
  "mcpServers": {
    "math": {
      "command": "npx",
      "args": ["math-mcp-server"]
    }
  }
}
```

## Development

```bash
git clone <your-repo>
cd math-mcp
npm install
npm run build
npm start
```