
Midnight + Next.js MCP
io.github.FractionEstate由 GitHub 账号 FractionEstate 发布v0.3.1更新于 Oct 25, 2026
Unified MCP server for Midnight blockchain development and Next.js dApps.
概览
本地 MCP 服务器,为 AI 助手提供 Midnight 区块链合约、钱包与网络工具,以及用于构建 dApp 的 Next.js DevTools。
- 可以做什么
- 初始化 Midnight 开发上下文、生成 dApp 项目脚手架、将 Compact 合约编译为 TypeScript 与 ZK 产物、执行静态分析、部署合约并调用已部署合约的电路。创建钱包、读取钱包状态与余额、转账 tDUST 代币。检查 Indexer、Proof Server 与 Node 的网络健康状态,查询区块与交易,检查 Midnight 包版本。搜索、获取、同步并列出 Midnight 文档。使用 Next.js 工具:初始化开发上下文、搜索 Next.js 文档、发现运行中的开发服务器、执行运行时诊断、用 Playwright 评估页面,并参考 Next.js 16 与 Cache Components 升级指南。
- 适用场景
- 适合在 Midnight 网络上配合 Next.js 前端构建去中心化应用时使用,让助手在一个服务器内完成合约编译、分析、部署与调用,管理测试钱包,查看链上状态,并查阅 Midnight 与 Next.js 文档。
- 运行要求
- 通过 stdio 在本地运行,通常用 npx 配合 Node.js,也可全局安装 npm 包或使用 Docker 容器。可选 GITHUB_TOKEN 提高 API 速率限制;LOG_LEVEL 设置日志详细程度;MIDNIGHT_LOCAL 启用带 ChromaDB 的本地模式以进行离线语义搜索。网络端点默认指向 Midnight 测试网,可通过环境变量覆盖。链上查询与文档同步需要网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 Midnight + Next.js MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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:
🌙 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
🚀 Usage
Quick Start with npx
The easiest way to use this MCP server is via npx — no installation required:
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:
VS Code (GitHub Copilot / Claude Extension)
Add to your VS Code settings.json or workspace .vscode/mcp.json:
Or for Claude extension specifically:
Claude Desktop (macOS)
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Claude Desktop (Windows)
Edit %APPDATA%\Claude\claude_desktop_config.json:
Claude Desktop (Linux)
Edit ~/.config/Claude/claude_desktop_config.json:
Cursor IDE
Add to your Cursor MCP configuration (.cursor/mcp.json in your project or global settings):
Windsurf / Codeium
Add to your Windsurf MCP settings:
Continue.dev (VS Code / JetBrains)
Add to ~/.continue/config.json or your project's .continue/config.json:
Zed Editor
Add to your Zed settings (~/.config/zed/settings.json on Linux, ~/Library/Application Support/Zed/settings.json on macOS):
Sourcegraph Cody
Add to your Cody MCP configuration:
JetBrains IDEs (IntelliJ, WebStorm, etc.)
For AI assistants in JetBrains IDEs that support MCP, add to your MCP configuration:
Using Global Installation
If you prefer a global install instead of npx:
Then configure:
Local Development / From Source
Docker
Run the MCP server in a Docker container:
CLI Flags
🏗️ Project Structure
🔧 Configuration
Environment Variables
You can pass environment variables to the MCP server in your configuration:
Available Environment Variables
Network Configurations
📚 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
📖 Documentation
Client-Specific MCP Documentation
- Claude Desktop MCP Guide
- VS Code MCP Extension
- Cursor MCP Docs
- Continue.dev MCP Guide
- Zed 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.
来源:README.md,提交 4a88d65
工具
0版本历史
1- v0.3.1最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。