# midnight-cast [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/Kanasjnr/midnight-cast  
**GitHub Stars:** 1  
**npm Downloads (last month):** 245  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/midnight-cast

## Description
Read-only tools for live Midnight networks: health, transactions, DUST, errors and example code

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "midnight-cast": {
    "command": "npx",
    "args": ["-y","midnight-cast@latest"],
    "env": {
      "BLOCKFROST_PREPROD_PROJECT_ID": "",
      "BLOCKFROST_MAINNET_PROJECT_ID": "",
      "MN_NETWORK": "",
      "MIDNIGHT_CAST_VERSION": "",
      "MIDNIGHT_CAST_INSTALL_DIR": ""
    }
  }
}
```

**Requires environment variables:** `BLOCKFROST_PREPROD_PROJECT_ID`, `BLOCKFROST_MAINNET_PROJECT_ID`, `MN_NETWORK`, `MIDNIGHT_CAST_VERSION`, `MIDNIGHT_CAST_INSTALL_DIR` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What midnight-cast does

The midnight-cast MCP server provides agents with read-only inspection of Midnight networks. Its coverage includes RPC, indexer, and proof-server health; synchronization and version checks; transaction and contract details; DUST status and events; block headers; raw JSON-RPC queries; and decoding for ledger, pallet, Substrate 1010, JSON-RPC, and tooling errors.

It also searches working code from Midnight’s official examples using a natural-language topic. This is useful when an agent needs a reference implementation for subjects such as DUST sponsorship or shielded token transfers. The project is intended for network investigation and developer diagnostics, not as a wallet, application scaffold, signing client, or proving service.

## How it works

The command-line interface and MCP server use configured Midnight network endpoints and return information without changing chain state. Supported networks are preview, preprod, mainnet, and local. Health checks combine service availability, synchronization signals, and support-matrix comparisons. Transaction inspection can show status, fees, segments, actions, and related DUST event identifiers.

The midnight-cast MCP server is suitable for agents diagnosing a failed transaction, checking whether a local stack matches the live network, or confirming that services are ready before a first transaction. JSON output provides a stable envelope containing success state, data, structured errors, warnings, and suggested follow-up commands. The CLI also supports an explanation command that describes available commands, options, exit codes, and error categories.

## Setup and configuration

Node.js 20 or newer is required, with Node.js 22 recommended. Installation can use npm, npx, or a standalone release binary. The project also installs the `mn` alias, although its documentation and JSON output use the full `midnight-cast` name to avoid conflicts with other tools.

Run `midnight-cast config init` to create the configuration file at `~/.config/midnight-cast/config.toml`. Select a network with `--network` or `MN_NETWORK`. Preview is hosted by Midnight and needs no project ID. Preprod and mainnet require separate Blockfrost project IDs, supplied through `BLOCKFROST_PREPROD_PROJECT_ID` and `BLOCKFROST_MAINNET_PROJECT_ID`.

## Tools and capabilities

The midnight-cast MCP server covers the same read-only areas as the CLI, including:

- Network health, ping, tip, version, and preflight checks
- Block heights, headers, hashes, and raw JSON-RPC calls
- Transaction, contract, DUST status, and DUST event inspection
- Error decoding from numeric codes, raw messages, and supported error formats
- Support-matrix comparisons for node, runtime, indexer, protocol, and proof-server versions
- Searches through Midnight’s official examples and explanations of selected concepts

No wallet keys are used, and the material explicitly states that the project does not sign or prove transactions. Agents should therefore use it alongside, rather than in place of, tools that create, authorize, or submit transactions.

## Limitations and notes

Preprod and mainnet access depends on valid Blockfrost configuration. The project IDs are network-specific and are not printed by the tool. Proof-server checks can be optional in health output. A transaction result may identify failed segments without providing the underlying failure reason when the available indexer data does not include one; decoding the original wallet or node error is then the recommended diagnostic step.

The standalone binary avoids requiring Node.js, but the supplied installation methods still perform platform-specific setup. The project is read-only, so it cannot modify network state or act as a wallet.

_Full upstream README: https://allmcps.com/mcp/midnight-cast/readme_

