midnight-nextjs-mcp
Provides tools for Next.js development including documentation search, runtime diagnostic tools, browser automation, Next.js 16 upgrade guidance, and cache components migration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@midnight-nextjs-mcpwhat's my Midnight wallet balance?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Midnight + Next.js Development MCP Server
A Model Context Protocol (MCP) server combining Midnight Network blockchain development tools with Next.js DevTools for building decentralized applications.
Compatible with all MCP-enabled AI assistants: Claude, GitHub Copilot, Cursor, Windsurf, Codeium, Continue.dev, Zed, Sourcegraph Cody, and more.
π€ Supported AI Assistants
This MCP server works with any AI assistant that supports the Model Context Protocol:
AI Assistant | Platform | Configuration |
Claude | Desktop App, VS Code | Native MCP support |
GitHub Copilot | VS Code, JetBrains | MCP extension |
Cursor | IDE | Built-in MCP support |
Windsurf | IDE | Built-in MCP support |
Codeium | VS Code, JetBrains | MCP integration |
Continue.dev | VS Code, JetBrains | MCP config file |
Zed | IDE | MCP support |
Sourcegraph Cody | VS Code | MCP extension |
Related MCP server: Next.js MCP Server
π Features
Midnight Network Tools
Contract Development
midnight_init- Initialize development contextmidnight_compile_contract- Compile Compact contracts to TypeScript/ZK artifactsmidnight_analyze_contract- Static analysis for contractsmidnight_deploy_contract- Deploy contracts to the networkmidnight_call_contract- Execute circuit calls on deployed contractsmidnight_scaffold_project- Create new dApp projects from templates
Wallet & Tokens
midnight_create_wallet- Generate new wallet with seed phrasemidnight_wallet_state- Get detailed wallet state and balancesmidnight_transfer_tokens- Transfer tDUST tokensmidnight_get_balance- Query token balances
Network & Queries
midnight_network_status- Check network health (Indexer, Proof Server, Node)midnight_get_block- Query blockchain blocksmidnight_get_transaction- Query transaction detailsmidnight_check_versions- Check for Midnight package updates
Documentation
midnight_search_docs- Search Midnight documentationmidnight-fetch-docs- Fetch specific documentation pagesmidnight-sync-docs- Sync documentation from official repomidnight-docs-status- Check documentation sync statusmidnight-list-docs- List available documentation sources
Next.js DevTools
init- Initialize Next.js development contextnextjs_docs- Search Next.js documentationnextjs_index- Discover running dev serversnextjs_call- Execute runtime diagnostic toolsbrowser_eval- Browser automation with Playwrightupgrade_nextjs_16- Next.js 16 upgrade guideenable_cache_components- Cache Components migration
π¦ Installation
# Clone the repository
git clone https://github.com/your-username/midnight-nextjs-mcp.git
cd midnight-nextjs-mcp
# Install dependencies
pnpm install
# Build
pnpm buildπ Usage
Quick Start with npx
The easiest way to use this MCP server is via npx β no installation required:
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}Configuration Examples
The MCP configuration format is standardized across most AI assistants. Below are platform-specific examples:
Universal MCP Configuration
Most MCP clients use this standard JSON format. Add to your client's MCP configuration file:
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}VS Code (GitHub Copilot / Claude Extension)
Add to your VS Code settings.json or workspace .vscode/mcp.json:
{
"mcp.servers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}Or for Claude extension specifically:
{
"claude.mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}Claude Desktop (macOS)
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}Claude Desktop (Windows)
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}Claude Desktop (Linux)
Edit ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}Cursor IDE
Add to your Cursor MCP configuration (.cursor/mcp.json in your project or global settings):
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}Windsurf / Codeium
Add to your Windsurf MCP settings:
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}Continue.dev (VS Code / JetBrains)
Add to ~/.continue/config.json or your project's .continue/config.json:
{
"experimental": {
"modelContextProtocolServers": [
{
"name": "midnight-nextjs-mcp",
"transport": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
]
}
}Zed Editor
Add to your Zed settings (~/.config/zed/settings.json on Linux, ~/Library/Application Support/Zed/settings.json on macOS):
{
"context_servers": {
"midnight-nextjs-mcp": {
"command": {
"path": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}
}Sourcegraph Cody
Add to your Cody MCP configuration:
{
"cody.experimental.mcp.servers": {
"midnight-nextjs-mcp": {
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}JetBrains IDEs (IntelliJ, WebStorm, etc.)
For AI assistants in JetBrains IDEs that support MCP, add to your MCP configuration:
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"]
}
}
}Using Global Installation
If you prefer a global install instead of npx:
npm install -g midnight-nextjs-mcpThen configure:
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "midnight-nextjs-mcp"
}
}
}Local Development / From Source
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "node",
"args": ["/path/to/midnight-nextjs-mcp/dist/index.js"]
}
}
}Docker
Run the MCP server in a Docker container:
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "fractionestate/midnight-nextjs-mcp:latest"]
}
}
}CLI Flags
# Enable both tool categories (default)
npx midnight-nextjs-mcp@latest
# Disable Midnight tools (Next.js only)
npx midnight-nextjs-mcp@latest --no-midnight
# Disable Next.js tools (Midnight only)
npx midnight-nextjs-mcp@latest --no-nextjs
# Check package versions on startup
npx midnight-nextjs-mcp@latest --check-versions
# Set version polling interval (default 24 hours)
npx midnight-nextjs-mcp@latest --poll-interval=12ποΈ Project Structure
midnight-nextjs-mcp/
βββ src/
β βββ index.ts # Server entry point
β βββ tools/
β β βββ index.ts # Unified tool registry
β β βββ midnight/ # Midnight Network tools
β β β βββ init.ts
β β β βββ network-status.ts
β β β βββ get-balance.ts
β β β βββ get-block.ts
β β β βββ get-transaction.ts
β β β βββ search-docs.ts
β β β βββ scaffold-project.ts
β β β βββ compile-contract.ts
β β β βββ analyze-contract.ts
β β βββ nextjs/ # Next.js DevTools
β β βββ init.ts
β β βββ nextjs-docs.ts
β β βββ nextjs_index.ts
β β βββ nextjs_call.ts
β β βββ browser-eval.ts
β β βββ upgrade-nextjs-16.ts
β β βββ enable-cache-components.ts
β βββ providers/ # Midnight API providers
β β βββ index.ts
β β βββ indexer.ts # GraphQL indexer client
β β βββ proof-server.ts # Proof generation client
β β βββ node.ts # Node RPC client
β βββ resources/ # MCP resources
β β βββ (midnight-compact)/ # Compact language docs
β β βββ (midnight-sdk)/ # SDK documentation
β β βββ (cache-components)/ # Next.js cache docs
β β βββ ...
β βββ prompts/ # MCP prompts
β β βββ create-midnight-contract.ts
β β βββ upgrade-nextjs-16.ts
β β βββ enable-cache-components.ts
β βββ types/ # TypeScript definitions
β βββ midnight.ts
β βββ mcp.ts
βββ package.json
βββ README.mdπ§ Configuration
Environment Variables
You can pass environment variables to the MCP server in your configuration:
{
"mcpServers": {
"midnight-nextjs-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "midnight-nextjs-mcp@latest"],
"env": {
"MIDNIGHT_NETWORK": "testnet",
"MIDNIGHT_INDEXER_URL": "https://indexer.testnet.midnight.network/graphql"
}
}
}
}Available Environment Variables
# Midnight Network (optional, defaults to testnet)
MIDNIGHT_NETWORK=testnet
MIDNIGHT_INDEXER_URL=https://indexer.testnet.midnight.network/graphql
MIDNIGHT_PROOF_SERVER_URL=https://proof-server.testnet.midnight.network
MIDNIGHT_NODE_URL=https://rpc.testnet.midnight.networkNetwork Configurations
Network | Indexer | Proof Server |
Testnet | indexer.testnet.midnight.network | proof-server.testnet.midnight.network |
Devnet | localhost:8080 | localhost:6300 |
π Resources
The server exposes documentation resources:
Midnight Resources
midnight://compact/overview- Compact language introductionmidnight://compact/reference- Complete syntax referencemidnight://sdk/overview- Midnight.js SDK guide
Next.js Resources
nextjs-docs://llms-index- Documentation indexcache-components://overview- Cache Components guide
π§ͺ Development
# Watch mode
pnpm dev
# Type check
pnpm typecheck
# Run tests
pnpm test
# Build
pnpm buildπ Documentation
Client-Specific MCP Documentation
π€ Contributing
Contributions welcome! Please read the contributing guidelines first.
π License
MIT License - see LICENSE for details.
Built with β€οΈ for the Midnight and Next.js communities.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA powerful toolkit that enables seamless interaction with EVM-compatible networks through natural language processing and AI assistance, allowing users to manage wallets, launch tokens, and interact with blockchain networks.Last updated42MIT
- Alicense-qualityDmaintenanceEnables AI assistants to automate Next.js development including project scaffolding, React component generation, API route creation, and full-stack application workflows with TypeScript and Tailwind CSS support.Last updatedMIT
- Flicense-qualityDmaintenanceProvides real-time debugging, code quality monitoring, and performance insights for React/Next.js applications with features including Chrome DevTools integration, breakpoint management, complexity analysis, and live error streaming.Last updated271

Next.js DevTools MCPofficial
AlicenseAqualityAmaintenanceProvides specialized development tools and utilities for Next.js, allowing AI agents to perform runtime diagnostics and access official documentation. It enables automated context initialization and real-time interaction with Next.js development servers to query application state.Last updated479,342798MIT
Related MCP Connectors
Visual DeFi workflow automation on Base + Ethereum mainnet.
Provide AI agents and automation tools with contextual access to blockchain data including balanceβ¦
Crypto intelligence MCP for market data, DeFi, wallets, security, DEX, NFTs, and Solana.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DaJo-Code/midnight-nextjs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server