BIP Monitor MCP Server

BIP Monitor MCP Server

Monitors Next.js development servers with intelligent error categorization, smart diagnostics, and performance tracking.

Category
访问服务器

README

BIP Monitor MCP Server

A Model Context Protocol (MCP) server for monitoring Next.js development servers with intelligent error categorization, smart diagnostics, and performance tracking.

Features

  • 🔍 Intelligent Error Categorization: Automatically categorizes errors into syntax, runtime, build, dependency, and port issues
  • 💡 Smart Fix Suggestions: Provides actionable fix suggestions for each error category
  • 📊 Performance Tracking: Monitors compile times and build performance metrics
  • 💾 Persistent Logging: Errors persist across sessions in ~/.bip-monitor/
  • 🔄 Real-time Monitoring: Live dev server monitoring with stdout/stderr capture
  • 📡 MCP Resources: Access errors and status through standardized MCP resources
  • 🛠️ MCP Tools: Control dev server and query errors programmatically

Installation

For Claude Code CLI

If your project has a .mcp.json file, add the server configuration:

{
  "mcpServers": {
    "bip-monitor": {
      "command": "npx",
      "args": ["-y", "bip-monitor-mcp"]
    }
  }
}

Or install locally in your project:

npm install bip-monitor-mcp

Then configure in .mcp.json:

{
  "mcpServers": {
    "bip-monitor": {
      "command": "node",
      "args": ["node_modules/bip-monitor-mcp/index.js"]
    }
  }
}

For Claude Desktop

Add to your Claude Desktop configuration:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "bip-monitor": {
      "command": "npx",
      "args": ["-y", "bip-monitor-mcp"]
    }
  }
}

Restart Claude Desktop to load the server.

MCP Resources

The server exposes the following resources:

bip://errors/recent

Returns the last 50 errors with categorization and summary statistics.

{
  "count": 10,
  "errors": [...],
  "summary": {
    "syntax": 3,
    "runtime": 2,
    "build": 1,
    "dependency": 0,
    "port": 0
  }
}

bip://app/status

Returns current dev server status including uptime and error count.

{
  "status": "running",
  "pid": 12345,
  "startTime": 1699564800000,
  "errorCount": 10,
  "lastError": {...},
  "uptime": 300000
}

bip://logs/full

Returns last 100 lines from stdout/stderr logs. For more control, use the get_logs tool.

bip://performance/metrics

Returns performance metrics including compile times.

{
  "lastCompileTime": 142,
  "avgCompileTime": 156,
  "compileTimes": [150, 142, 160, ...]
}

MCP Tools

start_dev_server

Start and monitor the Next.js dev server.

Parameters:

  • cwd (string, required): Working directory for the app

Example:

{
  "name": "start_dev_server",
  "arguments": {
    "cwd": "/path/to/your/nextjs/app"
  }
}

get_errors

Get recent errors with optional filtering.

Parameters:

  • limit (number, default: 10): Number of errors to return
  • category (string, default: "all"): Filter by category (syntax|runtime|build|dependency|port|all)

get_status

Get current dev server status.

clear_errors

Clear the error log.

stop_dev_server

Stop the running dev server.

get_logs

Get application logs with flexible options.

Parameters:

  • lines (number, default: 100, max: 2000): Number of lines to return from end of log
  • filter (string, optional): Only return lines containing this text (case-insensitive)

Examples:

"Get the last 500 lines of logs"
"Get logs filtered by 'error' keyword"
"Get 1000 lines containing 'compile'"

Error Categories

Category Triggers Suggestion
port EADDRINUSE, port already in use lsof -ti:3000 | xargs kill -9
syntax TypeScript/JSX syntax errors Points to exact file:line
dependency Module not found errors pnpm install or npm install
build Next.js build failures rm -rf .next && pnpm dev
runtime Runtime exceptions Check stack trace

Log Files

All logs are stored in ~/.bip-monitor/:

  • errors.jsonl: Last 100 errors in JSON Lines format
  • app.log: Complete stdout/stderr from dev server (access via get_logs tool)
  • performance.json: Compile time metrics and performance data

Note: Use the get_logs tool to retrieve logs with custom line limits (up to 2000 lines) and optional text filtering.

Usage Examples

With Claude Code CLI

Read bip://errors/recent

With Claude API

const resource = await client.readResource('bip://errors/recent');
console.log(resource.contents[0].text);

Querying Errors

Use get_errors tool with limit=5 and category="syntax"

Starting Dev Server

Use start_dev_server with cwd="/Users/you/dev/my-nextjs-app"

Getting Logs

Use get_logs with lines=500
Use get_logs with lines=1000 and filter="error"
Use get_logs with filter="compile"

Development

Building from Source

git clone https://github.com/The-Bip-App/bip-monitor-mcp.git
cd bip-monitor-mcp
npm install

Running Locally

node index.js

The server communicates via stdio using the MCP protocol.

Requirements

  • Node.js >= 18.0.0
  • Next.js project with pnpm dev or npm dev script

License

MIT

Contributing

Contributions welcome! Please open an issue or PR.

Support

For issues, questions, or feature requests, please open an issue on GitHub.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选