[Integrations](https://spiral.ai/integrations) › [Claude Code](https://spiral.ai/integrations/claude-code) › [Mistral Medium 3](https://spiral.ai/integrations/claude-code/mistral-medium-3)

# How to Use Mistral Medium 3 in Claude Code

Mistral Medium 3 suits code review, STEM explanations, and questions over supplied text. It is the May 2025 model with a 128k context window, so leave room for the answer when providing long material.

|  |  |
| --- | --- |
| Model | Mistral Medium 3 |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.010668 per run at the default inputs. $0.52 per 1M input tokens, $2.60 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Mistral Medium 3 in Claude Code

- Use Mistral Medium 3 to review the current diff for logic errors. For each finding, identify the file, explain a reproducible failure case, and propose the smallest fix.
- Use Mistral Medium 3 to draft tests for the project's input-validation functions. Cover empty values, boundary values, and malformed input; derive expected results from the existing specification.
- Use Mistral Medium 3 to explain the calculation code in this project. Track units through each formula and flag assumptions that the code does not check.
- Use Mistral Medium 3 to compare the README's documented behavior with the implementation. Return a table of discrepancies with file references and supporting excerpts.
- Use Mistral Medium 3 to extract the public functions from the relevant source files into JSON containing name, purpose, inputs, and return value. Use null for undocumented details and temperature 0.2 for focused output.

## How to set up Mistral Medium 3 in Claude Code

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**: This adds Spiral to the current project. Add `--scope user` to use it in every project.

```bash
claude mcp add --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `claude`, type `/mcp`, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.

### Use the Spiral skill

1. **Send Claude Code this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Mistral Medium 3**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "openrouter",
    "model": "mistralai/mistral-medium-3",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: Claude Code finds Mistral Medium 3 on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/claude-code

## Mistral Medium 3 tools and prices

- [Mistral: Mistral Medium 3](https://spiral.ai/tools/openrouter/mistralai/mistral-medium-3) (OpenRouter): Up to $0.011736 per run at the default inputs. $0.572 per 1M input tokens, $2.86 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| stop |  | — |  |
| tools |  | — |  |
| top_p | 0 to 1 | — |  |
| max_tokens | 1 to 104857 | — | The most output tokens to generate. |
| temperature | 0 to 2 | — |  |

## What can you do with Mistral Medium 3 in Claude Code?

Turn project code and requirements into review findings, test drafts, and technical explanations with Mistral Medium 3. Give it the relevant files and request concrete evidence for each proposed change.

### Review a proposed code change

Ask Mistral Medium 3 to inspect a diff for logic errors and missing edge cases. Request a concrete failure example for each finding.

### Draft tests from requirements

Give Mistral Medium 3 a function contract and ask for normal, boundary, and invalid-input tests with expected results.

### Explain a technical calculation

Provide the formula, quantities, and units. Ask Mistral Medium 3 to explain the calculation and identify assumptions that need checking.

### Answer questions from supplied documentation

Give Mistral Medium 3 relevant text and ask it to support each answer with a short source excerpt. Require it to identify unanswered questions.

### Extract records from business text

Ask Mistral Medium 3 to turn support messages or meeting notes into JSON records. Define missing values and include a completed example.

### Prepare multilingual support drafts

Ask Mistral Medium 3 to draft French, German, or Spanish replies from supplied policy text. Provide approved terminology and review the translation before sending.

### Explain results returned by a tool

Pass a completed lookup result to Mistral Medium 3 and ask for a plain-English explanation that preserves the returned values and identifies missing information.

## Overview

- [OpenRouter](https://spiral.ai/providers/openrouter)
- [All Claude Code guides](https://spiral.ai/integrations/claude-code)

## Mistral Medium 3 in other agents

- [Amp](https://spiral.ai/integrations/amp/mistral-medium-3)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/mistral-medium-3)
- [Claude](https://spiral.ai/integrations/claude-desktop/mistral-medium-3)
- [Cline](https://spiral.ai/integrations/cline/mistral-medium-3)
- [Codex](https://spiral.ai/integrations/codex/mistral-medium-3)
- [Cursor](https://spiral.ai/integrations/cursor/mistral-medium-3)
- [Devin](https://spiral.ai/integrations/devin/mistral-medium-3)
- [dots](https://spiral.ai/integrations/dots/mistral-medium-3)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/mistral-medium-3)
- [Gemini](https://spiral.ai/integrations/gemini/mistral-medium-3)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/mistral-medium-3)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/mistral-medium-3)
- [goose](https://spiral.ai/integrations/goose/mistral-medium-3)
- [Grok](https://spiral.ai/integrations/grok/mistral-medium-3)
- [Grok Build](https://spiral.ai/integrations/grok-build/mistral-medium-3)
- [Hermes](https://spiral.ai/integrations/hermes/mistral-medium-3)
- [Instinct](https://spiral.ai/integrations/instinct/mistral-medium-3)
- [Manus](https://spiral.ai/integrations/manus/mistral-medium-3)
- [Muse](https://spiral.ai/integrations/muse/mistral-medium-3)
- [Muse Code](https://spiral.ai/integrations/muse-code/mistral-medium-3)
- [n8n](https://spiral.ai/integrations/n8n/mistral-medium-3)
- [Notion](https://spiral.ai/integrations/notion/mistral-medium-3)
- [OpenClaw](https://spiral.ai/integrations/openclaw/mistral-medium-3)
- [opencode](https://spiral.ai/integrations/opencode/mistral-medium-3)
- [Perplexity](https://spiral.ai/integrations/perplexity/mistral-medium-3)
- [Raycast](https://spiral.ai/integrations/raycast/mistral-medium-3)
- [VS Code](https://spiral.ai/integrations/vscode/mistral-medium-3)
- [Windsurf](https://spiral.ai/integrations/windsurf/mistral-medium-3)
- [Zapier](https://spiral.ai/integrations/zapier/mistral-medium-3)

## More Claude Code guides

- [Mistral Large 4](https://spiral.ai/integrations/claude-code/mistral-large-4)
- [Mistral Medium 3.1](https://spiral.ai/integrations/claude-code/mistral-medium-3-1)
- [Mistral Large 3](https://spiral.ai/integrations/claude-code/mistral-large-3)
- [Mistral Medium 3.5](https://spiral.ai/integrations/claude-code/mistral-medium-3-5)
- [Mistral Large 2407](https://spiral.ai/integrations/claude-code/mistral-large-2407)
- [Mistral NeMo](https://spiral.ai/integrations/claude-code/mistral-nemo)

## Questions about Mistral Medium 3 in Claude Code

**Can Claude Code use Mistral Medium 3?**

Yes. Add Spiral to Claude Code as an MCP server, and Claude Code can find and run Mistral Medium 3 like any built-in tool.

**How much does Mistral Medium 3 cost in Claude Code?**

Up to $0.010668 per run at the default inputs. $0.52 per 1M input tokens, $2.60 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Claude Code plan is separate.

**Do I need an OpenRouter account to use Mistral Medium 3 in Claude Code?**

No. Spiral runs Mistral Medium 3 on its own OpenRouter account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Mistral Medium 3 in Claude Code?**

About two minutes: add the hosted server, then sign in.

**Does Claude Code wait while Mistral Medium 3 runs?**

Mistral Medium 3 runs in the background. Claude Code starts the run, checks on it and gives you the text, json when it's ready.

**What is Mistral Medium 3 good at?**

Mistral identifies coding and STEM as particular strengths. Try it for reviewing a function, explaining a technical calculation, or drafting tests from a specification.

**How much text can Mistral Medium 3 handle?**

Its context window is 128k tokens. Input and output share that budget, so reserve space for the answer instead of filling the window with source material.

**Can I trust an answer because it is valid JSON?**

Check the contents against the source material. Mistral's guidance recommends evaluating generated answers for faithfulness to documents, even when the output has the requested structure.

**How should I prompt Mistral Medium 3 for extraction?**

State what to extract, define how to represent missing information, and include a completed example. For JSON output, explicitly request JSON and describe the required structure.

**Which setting matters most for focused answers?**

Start with a low temperature, such as 0.2, for extraction or code review. Higher values, such as 0.7, make output more random and can suit drafting alternatives.

