# Midnight + Next.js MCP

> Midnight + Next.js MCP is an open-source MCP server. Unified MCP server for Midnight blockchain development and Next.js dApps. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/fractionestate/midnight-nextjs-mcp
- **MCP Registry name:** io.github.FractionEstate/midnight-nextjs-mcp
- **Listing updated:** 2026-11-13

## About

Unified MCP server for Midnight blockchain development and Next.js dApps.

## Install

### Claude Code (Terminal)

```sh
claude mcp add midnight-nextjs-mcp --env GITHUB_TOKEN='<GITHUB_TOKEN>' -- npx -y midnight-nextjs-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "midnight-nextjs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "midnight-nextjs-mcp"
      ],
      "env": {
        "GITHUB_TOKEN": "<GITHUB_TOKEN>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "midnight-nextjs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "midnight-nextjs-mcp"
      ],
      "env": {
        "GITHUB_TOKEN": "<GITHUB_TOKEN>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "midnight-nextjs-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "midnight-nextjs-mcp"
      ],
      "env": {
        "GITHUB_TOKEN": "<GITHUB_TOKEN>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "midnight-nextjs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "midnight-nextjs-mcp"
      ],
      "env": {
        "GITHUB_TOKEN": "<GITHUB_TOKEN>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "midnight-nextjs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "midnight-nextjs-mcp"
      ],
      "env": {
        "GITHUB_TOKEN": "<GITHUB_TOKEN>"
      }
    }
  }
}
```

## FAQ

### Is Midnight + Next.js MCP free?

Yes. Midnight + Next.js MCP is open source, so you can use and self-host it for free.

### How do I add Midnight + Next.js MCP to Claude Code?

Run this command in your terminal: claude mcp add midnight-nextjs-mcp --env GITHUB_TOKEN='<GITHUB_TOKEN>' -- npx -y midnight-nextjs-mcp

---
Source: https://ai-powered.com/mcp/midnight-next-js-mcp
