{
  "markdown": "# Midnight + Next.js Development MCP Server\n\nA Model Context Protocol (MCP) server combining Midnight Network blockchain development tools with Next.js DevTools for building decentralized applications.\n\n> **Compatible with all MCP-enabled AI assistants:** Claude, GitHub Copilot, Cursor, Windsurf, Codeium, Continue.dev, Zed, Sourcegraph Cody, and more.\n\n## 🤖 Supported AI Assistants\n\nThis MCP server works with any AI assistant that supports the Model Context Protocol:\n\n| AI Assistant | Platform | Configuration |\n|--------------|----------|---------------|\n| **Claude** | Desktop App, VS Code | Native MCP support |\n| **GitHub Copilot** | VS Code, JetBrains | MCP extension |\n| **Cursor** | IDE | Built-in MCP support |\n| **Windsurf** | IDE | Built-in MCP support |\n| **Codeium** | VS Code, JetBrains | MCP integration |\n| **Continue.dev** | VS Code, JetBrains | MCP config file |\n| **Zed** | IDE | MCP support |\n| **Sourcegraph Cody** | VS Code | MCP extension |\n\n## 🌙 Features\n\n### Midnight Network Tools\n\n#### Contract Development\n- **`midnight_init`** - Initialize development context\n- **`midnight_compile_contract`** - Compile Compact contracts to TypeScript/ZK artifacts\n- **`midnight_analyze_contract`** - Static analysis for contracts\n- **`midnight_deploy_contract`** - Deploy contracts to the network\n- **`midnight_call_contract`** - Execute circuit calls on deployed contracts\n- **`midnight_scaffold_project`** - Create new dApp projects from templates\n\n#### Wallet & Tokens\n- **`midnight_create_wallet`** - Generate new wallet with seed phrase\n- **`midnight_wallet_state`** - Get detailed wallet state and balances\n- **`midnight_transfer_tokens`** - Transfer tDUST tokens\n- **`midnight_get_balance`** - Query token balances\n\n#### Network & Queries\n- **`midnight_network_status`** - Check network health (Indexer, Proof Server, Node)\n- **`midnight_get_block`** - Query blockchain blocks\n- **`midnight_get_transaction`** - Query transaction details\n- **`midnight_check_versions`** - Check for Midnight package updates\n\n#### Documentation\n- **`midnight_search_docs`** - Search Midnight documentation\n- **`midnight-fetch-docs`** - Fetch specific documentation pages\n- **`midnight-sync-docs`** - Sync documentation from official repo\n- **`midnight-docs-status`** - Check documentation sync status\n- **`midnight-list-docs`** - List available documentation sources\n\n### Next.js DevTools\n- **`init`** - Initialize Next.js development context\n- **`nextjs_docs`** - Search Next.js documentation\n- **`nextjs_index`** - Discover running dev servers\n- **`nextjs_call`** - Execute runtime diagnostic tools\n- **`browser_eval`** - Browser automation with Playwright\n- **`upgrade_nextjs_16`** - Next.js 16 upgrade guide\n- **`enable_cache_components`** - Cache Components migration\n\n## 📦 Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/your-username/midnight-nextjs-mcp.git\ncd midnight-nextjs-mcp\n\n# Install dependencies\npnpm install\n\n# Build\npnpm build\n```\n\n## 🚀 Usage\n\n### Quick Start with npx\n\nThe easiest way to use this MCP server is via npx — no installation required:\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\n### Configuration Examples\n\nThe MCP configuration format is standardized across most AI assistants. Below are platform-specific examples:\n\n---\n\n#### Universal MCP Configuration\n\nMost MCP clients use this standard JSON format. Add to your client's MCP configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\n---\n\n#### VS Code (GitHub Copilot / Claude Extension)\n\nAdd to your VS Code `settings.json` or workspace `.vscode/mcp.json`:\n\n```json\n{\n  \"mcp.servers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\nOr for Claude extension specifically:\n\n```json\n{\n  \"claude.mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\n#### Claude Desktop (macOS)\n\nEdit `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\n#### Claude Desktop (Windows)\n\nEdit `%APPDATA%\\Claude\\claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\n#### Claude Desktop (Linux)\n\nEdit `~/.config/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\n#### Cursor IDE\n\nAdd to your Cursor MCP configuration (`.cursor/mcp.json` in your project or global settings):\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\n#### Windsurf / Codeium\n\nAdd to your Windsurf MCP settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\n---\n\n#### Continue.dev (VS Code / JetBrains)\n\nAdd to `~/.continue/config.json` or your project's `.continue/config.json`:\n\n```json\n{\n  \"experimental\": {\n    \"modelContextProtocolServers\": [\n      {\n        \"name\": \"midnight-nextjs-mcp\",\n        \"transport\": {\n          \"type\": \"stdio\",\n          \"command\": \"npx\",\n          \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n        }\n      }\n    ]\n  }\n}\n```\n\n---\n\n#### Zed Editor\n\nAdd to your Zed settings (`~/.config/zed/settings.json` on Linux, `~/Library/Application Support/Zed/settings.json` on macOS):\n\n```json\n{\n  \"context_servers\": {\n    \"midnight-nextjs-mcp\": {\n      \"command\": {\n        \"path\": \"npx\",\n        \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n      }\n    }\n  }\n}\n```\n\n---\n\n#### Sourcegraph Cody\n\nAdd to your Cody MCP configuration:\n\n```json\n{\n  \"cody.experimental.mcp.servers\": {\n    \"midnight-nextjs-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\n---\n\n#### JetBrains IDEs (IntelliJ, WebStorm, etc.)\n\nFor AI assistants in JetBrains IDEs that support MCP, add to your MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"]\n    }\n  }\n}\n```\n\n---\n\n#### Using Global Installation\n\nIf you prefer a global install instead of npx:\n\n```bash\nnpm install -g midnight-nextjs-mcp\n```\n\nThen configure:\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"midnight-nextjs-mcp\"\n    }\n  }\n}\n```\n\n#### Local Development / From Source\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"node\",\n      \"args\": [\"/path/to/midnight-nextjs-mcp/dist/index.js\"]\n    }\n  }\n}\n```\n\n---\n\n#### Docker\n\nRun the MCP server in a Docker container:\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"-i\", \"--rm\", \"fractionestate/midnight-nextjs-mcp:latest\"]\n    }\n  }\n}\n```\n\n### CLI Flags\n\n```bash\n# Enable both tool categories (default)\nnpx midnight-nextjs-mcp@latest\n\n# Disable Midnight tools (Next.js only)\nnpx midnight-nextjs-mcp@latest --no-midnight\n\n# Disable Next.js tools (Midnight only)\nnpx midnight-nextjs-mcp@latest --no-nextjs\n\n# Check package versions on startup\nnpx midnight-nextjs-mcp@latest --check-versions\n\n# Set version polling interval (default 24 hours)\nnpx midnight-nextjs-mcp@latest --poll-interval=12\n```\n\n## 🏗️ Project Structure\n\n```\nmidnight-nextjs-mcp/\n├── src/\n│   ├── index.ts                    # Server entry point\n│   ├── tools/\n│   │   ├── index.ts                # Unified tool registry\n│   │   ├── midnight/               # Midnight Network tools\n│   │   │   ├── init.ts\n│   │   │   ├── network-status.ts\n│   │   │   ├── get-balance.ts\n│   │   │   ├── get-block.ts\n│   │   │   ├── get-transaction.ts\n│   │   │   ├── search-docs.ts\n│   │   │   ├── scaffold-project.ts\n│   │   │   ├── compile-contract.ts\n│   │   │   └── analyze-contract.ts\n│   │   └── nextjs/                 # Next.js DevTools\n│   │       ├── init.ts\n│   │       ├── nextjs-docs.ts\n│   │       ├── nextjs_index.ts\n│   │       ├── nextjs_call.ts\n│   │       ├── browser-eval.ts\n│   │       ├── upgrade-nextjs-16.ts\n│   │       └── enable-cache-components.ts\n│   ├── providers/                  # Midnight API providers\n│   │   ├── index.ts\n│   │   ├── indexer.ts              # GraphQL indexer client\n│   │   ├── proof-server.ts         # Proof generation client\n│   │   └── node.ts                 # Node RPC client\n│   ├── resources/                  # MCP resources\n│   │   ├── (midnight-compact)/     # Compact language docs\n│   │   ├── (midnight-sdk)/         # SDK documentation\n│   │   ├── (cache-components)/     # Next.js cache docs\n│   │   └── ...\n│   ├── prompts/                    # MCP prompts\n│   │   ├── create-midnight-contract.ts\n│   │   ├── upgrade-nextjs-16.ts\n│   │   └── enable-cache-components.ts\n│   └── types/                      # TypeScript definitions\n│       ├── midnight.ts\n│       └── mcp.ts\n├── package.json\n└── README.md\n```\n\n## 🔧 Configuration\n\n### Environment Variables\n\nYou can pass environment variables to the MCP server in your configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"midnight-nextjs-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"midnight-nextjs-mcp@latest\"],\n      \"env\": {\n        \"MIDNIGHT_NETWORK\": \"testnet\",\n        \"MIDNIGHT_INDEXER_URL\": \"https://indexer.testnet.midnight.network/graphql\"\n      }\n    }\n  }\n}\n```\n\n#### Available Environment Variables\n\n```bash\n# Midnight Network (optional, defaults to testnet)\nMIDNIGHT_NETWORK=testnet\nMIDNIGHT_INDEXER_URL=https://indexer.testnet.midnight.network/graphql\nMIDNIGHT_PROOF_SERVER_URL=https://proof-server.testnet.midnight.network\nMIDNIGHT_NODE_URL=https://rpc.testnet.midnight.network\n```\n\n### Network Configurations\n\n| Network | Indexer | Proof Server |\n|---------|---------|--------------|\n| Testnet | indexer.testnet.midnight.network | proof-server.testnet.midnight.network |\n| Devnet | localhost:8080 | localhost:6300 |\n\n## 📚 Resources\n\nThe server exposes documentation resources:\n\n### Midnight Resources\n- `midnight://compact/overview` - Compact language introduction\n- `midnight://compact/reference` - Complete syntax reference\n- `midnight://sdk/overview` - Midnight.js SDK guide\n\n### Next.js Resources\n- `nextjs-docs://llms-index` - Documentation index\n- `cache-components://overview` - Cache Components guide\n\n## 🧪 Development\n\n```bash\n# Watch mode\npnpm dev\n\n# Type check\npnpm typecheck\n\n# Run tests\npnpm test\n\n# Build\npnpm build\n```\n\n## 📖 Documentation\n\n- [Midnight Network Docs](https://docs.midnight.network)\n- [Next.js Docs](https://nextjs.org/docs)\n- [MCP Specification](https://modelcontextprotocol.io)\n- [MCP Server Registry](https://github.com/modelcontextprotocol/servers)\n\n### Client-Specific MCP Documentation\n\n- [Claude Desktop MCP Guide](https://docs.anthropic.com/en/docs/claude-mcp)\n- [VS Code MCP Extension](https://marketplace.visualstudio.com/items?itemName=anthropic.claude-mcp)\n- [Cursor MCP Docs](https://docs.cursor.com/context/model-context-protocol)\n- [Continue.dev MCP Guide](https://docs.continue.dev/customization/context-providers#mcp-servers)\n- [Zed MCP Documentation](https://zed.dev/docs/assistant/context-servers)\n\n## 🤝 Contributing\n\nContributions welcome! Please read the contributing guidelines first.\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n---\n\nBuilt with ❤️ for the Midnight and Next.js communities.\n",
  "bytes": 12130,
  "sha": "8994bfca554cd890fabc7c89c8b1165d8f538d43febedb36f1540f63f106af59",
  "repo_slug": "fractionestate/midnight-nextjs-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_fractionestate_midnight_nextjs_2f60e3df/readme"
}