A premium, modular Model Context Protocol (MCP) server for the Mochi website uptime and monitoring suite.
Equip your AI assistants in Cursor and Antigravity IDE with real-time website checks, intervals, active latency, and uptime reports.
Install • Run • IDE Integration • Features • Tools • Architecture • Developer Guide
bun install -g mochi-mcp-kitmochi-mcp loginIf you prefer to configure your workspace manually, simply update your settings:
Important
Cursor Configuration Open there settings/config folder
Add this snippet inside the "mcpServers" object in either of the files:
{
"mcpServers": {
"mochi": {
"command": "npx",
"args": [
"-y",
"mochi-mcp-kit"
],
"env": {
"MOCHI_API_KEY": "mochi_pat_xxxxxxxx", // create from mochi.elitedev.space
"DOTENV_CONFIG_QUIET": "true", // (optional) add in antigravity
"DOTENVX_LOG": "error" // (optional) add in antigravity
}
}
}
}- 🛡️ Robust TypeScript & ESM: Built from the ground up on modern TypeScript ESM standards, compiled via
tsupinto optimized, minified production builds. - 🎨 Designer CLI Wizard: A stunning setup experience powered by
@clack/prompts,gradient-string,oraspinners, andboxen. - 🤖 Multi-IDE Auto-Configurator: Auto-detects platform paths (Windows, macOS, Linux) and injects configurations directly into both Cursor and Antigravity IDE configuration stores.
- 🔑 Smart Configuration Fallbacks: Leverages
confsecure stores while maintaining seamless fallback checks across environment variables and legacy.mochircconfigurations.
graph TD
A[User Terminal / IDE Boot] --> B[src/index.ts Entrypoint]
B -->|'login' Argument| C[src/cli/login.ts Wizard]
B -->|Default Stdio Boot| D[src/mcp/server.ts Server]
C -->|Validate Key & Store| E[src/config.ts Storage Manager]
C -->|Auto-Inject Settings| F[(mcp_config.json stores)]
D -->|Read Token / URL| E
D -->|Expose Tools & Handlers| G[src/mcp/tools.ts Actions]
G -->|Axios HTTPS Requests| H[Mochi Backend API]
H -->|Return Monitor States| G
G -->|Format Beautiful Markdown Table| D
Initialize the package configurations and link your IDEs instantly:
pnpm run dev loginYou'll be greeted with a colorful double-bordered title box and guided step-by-step:
- API Key Entry: Paste your Mochi Access Token (format verified in real-time).
- Live Token Verification: A sleek animated spinner verifies your credentials directly against the Mochi API.
- Automatic IDE Linking: Choose whether to configure Cursor, Antigravity IDE, both, or skip.
The system resolves your credentials dynamically according to the following strict priority:
┌────────────────────────────────────────────────────────┐
│ 1. Env Variables (MOCHI_API_KEY / MOCHI_API_URL) │
└───────────────────────────┬────────────────────────────┘
▼
┌────────────────────────────────────────────────────────┐
│ 2. Secure 'conf' Store (Saved during setup) │
└───────────────────────────┬────────────────────────────┘
▼
┌────────────────────────────────────────────────────────┐
│ 3. Legacy ~/.mochirc File Configs │
└───────────────────────────┬────────────────────────────┘
▼
┌────────────────────────────────────────────────────────┐
│ 4. Legacy ~/.config/mochi/config.json File Configs │
└────────────────────────────────────────────────────────┘
Queries and lists all active and configured website monitors directly linked to your Mochi account.
No parameters required.
| Monitor ID | Target URL | Cron Schedule | Current Status | Total Checks | Avg Latency | Uptime | Downtime |
|---|---|---|---|---|---|---|---|
d0f41ab9... |
https://mywebsite.com |
*/5 * * * * |
ACTIVE | 12,840 |
102ms |
240.5 hrs |
0.0 hrs |
f3922c01... |
https://api.mywebsite.com |
*/10 * * * * |
ACTIVE | 6,420 |
84ms |
120.2 hrs |
0.1 hrs |
src/
├── index.ts # Lightweight entry router (CLI login or MCP standard boot)
├── config.ts # Configuration manager (handles Typed conf store & fallbacks)
├── cli/
│ └── login.ts # High-fidelity setup wizard (clack prompts, ora spinner, multi-IDE setup)
└── mcp/
├── server.ts # Bootstraps the MCP Server over StdioServerTransport
└── tools.ts # Handles tool definitions, Axios API calls, and markdown tables
pnpm installpnpm run devBundles and minifies TypeScript using tsup:
pnpm run buildMade with ♥ for the Mochi Ecosystem.