# FairMind

The FairMind MCP server for Claude Code checks whether an AI system can ship and runs fairness tests on CSV files. The agent can call it to review a release gate or inspect a local dataset.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 17 repo stars
- Author: adhit-r
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/adhit-r/fairmind/tree/HEAD/apps/mcp
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/fairmind

## What it does

FairMind returns a release decision for an AI system and can test fairness using CSV files on the machine. Its tools expose systems visible to the API key, explain gate results, and map checks to regulatory clauses. It can also save test results as evidence and compare recent decisions with the latest fairness run for drift and impact ratio.

Evaluations can use local files, a connected agent platform, or a live system. Behaviour checks run as background jobs and may take minutes. The server needs `FAIRMIND_API_URL` and `FAIRMIND_API_KEY`, and communicates with FairMind over stdio. Evaluation tools use the key’s first organisation unless `FAIRMIND_ORG_ID` selects another.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `FAIRMIND_API_URL`, `FAIRMIND_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add fairmind -e FAIRMIND_API_URL=<FAIRMIND_API_URL> -e FAIRMIND_API_KEY=<FAIRMIND_API_KEY> -- uvx fairmind-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from fairmind-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add mcp --env FAIRMIND_API_URL=<FAIRMIND_API_URL> --env FAIRMIND_API_KEY=<FAIRMIND_API_KEY> -- uvx fairmind-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from fairmind-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "command": "uvx",
            "args": [
                "fairmind-mcp"
            ],
            "env": {
                "FAIRMIND_API_URL": "<FAIRMIND_API_URL>",
                "FAIRMIND_API_KEY": "<FAIRMIND_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from fairmind-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "fairmind-mcp"
            ],
            "env": {
                "FAIRMIND_API_URL": "<FAIRMIND_API_URL>",
                "FAIRMIND_API_KEY": "<FAIRMIND_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from fairmind-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e FAIRMIND_API_URL=<FAIRMIND_API_URL> -e FAIRMIND_API_KEY=<FAIRMIND_API_KEY> mcp uvx fairmind-mcp
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from fairmind-mcp <command>

## When to use it
- check whether an AI system clears its release gate
- run a fairness test on a local CSV
- compare recent decisions with the latest test results
- inspect a gate against regulatory clauses

## Example prompts
- Check whether the credit-scoring system is cleared for release.
- Run a fairness test on `holdout.csv` by gender and region, using `repaid` as the outcome and `approved` as the prediction.
- Compare recent decisions in the CSV with the latest fairness run.

## Similar
- [ai-ethics-advisor](https://affpapa.org/en/nevibecode/agents/ai-ethics-advisor.md) — subagent · 723 installs
- [ethical-thinking](https://affpapa.org/en/nevibecode/skills/ethical-thinking.md) — skill · ★ 25 repo stars
- [FairMind Project Context](https://affpapa.org/en/nevibecode/mcp/fairmind-project-context.md) — MCP server
- [csv-formula-injection](https://affpapa.org/en/nevibecode/skills/csv-formula-injection.md) — skill · 4000 installs
- [optimizing-defi-yields](https://affpapa.org/en/nevibecode/skills/optimizing-defi-yields.md) — skill · 1 install
- [GoldenCheck](https://affpapa.org/en/nevibecode/mcp/goldencheck.md) — MCP server · 917 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
