npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aig-risk-profiler-mcp

v1.2.4

Published

MCP server for generating Management Liability Coverage (MLC) risk analysis reports from Chinese company annual report PDFs

Readme

aig-risk-profiler-mcp

A Model Context Protocol (MCP) server for generating Management Liability Coverage (MLC) risk analysis reports from Chinese company annual report PDFs.

Features

  • analyze_company: Upload a company annual report PDF and start analysis
  • check_task_status: Check the status and progress of an analysis task
  • get_report: Retrieve the completed analysis as a PDF download URL or markdown content

Prerequisites

  • Node.js >= 18.0.0
  • The MLC Agent backend must be running (see backend setup instructions)

Installation

From npm

npm install -g aig-risk-profiler-mcp

Usage with Claude Desktop

Add the following to your Claude Desktop configuration file:

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

Using npx (recommended)

{
  "mcpServers": {
    "aig-risk-profiler": {
      "command": "npx",
      "args": ["-y", "aig-risk-profiler-mcp"],
      "env": {
        "BACKEND_URL": "https://aig-risk-profiler.ragents.net"
      }
    }
  }
}

Using global install

{
  "mcpServers": {
    "aig-risk-profiler": {
      "command": "aig-risk-profiler-mcp",
      "env": {
        "BACKEND_URL": "http://localhost:8101"
      }
    }
  }
}

Using local build

{
  "mcpServers": {
    "aig-risk-profiler": {
      "command": "node",
      "args": ["/path/to/mcp-server/dist/index.js"],
      "env": {
        "BACKEND_URL": "http://localhost:8101"
      }
    }
  }
}

Environment Variables

| Variable | Description | Default | |----------|-------------|---------| | BACKEND_URL | URL of the MLC Agent backend API | http://localhost:8101 |

Tools

analyze_company

Upload a Chinese company annual report PDF and start MLC analysis.

Input:

  • pdf_path (required): Local file path to the company annual report PDF

Output:

  • task_id: ID to track the analysis task
  • status: Current status of the task
  • message: Human-readable message

Example:

User: 分析这个年报 /Users/me/Documents/紫光股份2023年报.pdf
AI: [calls analyze_company] 分析已开始,任务ID是 123

check_task_status

Check the status and progress of an analysis task. Use this to monitor if a task is still running, completed, or failed.

Input:

  • task_id (required): The task ID returned by analyze_company

Output:

  • task_id: The task ID
  • status: "pending", "running", "completed", or "failed"
  • progress: Human-readable progress message
  • current_step: Name of the currently running step (if any)
  • completed_steps: Number of completed steps
  • total_steps: Total number of steps
  • company_name: Name of the company being analyzed
  • error: Error message if the task failed

Example:

User: 任务 123 完成了吗?
AI: [calls check_task_status] 正在运行:研究新闻和监管文件(7/10 步骤已完成)

get_report

Retrieve the MLC analysis report for a completed task.

Input:

  • task_id (required): The task ID returned by analyze_company
  • format (optional): Report format - "pdf" (default) or "markdown"

Output:

  • status: "completed" or "not_completed"
  • format: The report format ("pdf" or "markdown")
  • download_url: URL to download the PDF (for pdf format)
  • content: The markdown content (for markdown format)
  • company_name: Name of the analyzed company
  • message: Human-readable message

Example:

User: 给我报告
AI: [calls get_report] PDF报告已生成:http://localhost:8101/api/tasks/123/report/download

Typical Workflow

Analysis takes approximately 20 minutes. The workflow is designed to be asynchronous:

  1. Start Analysis: Use analyze_company to upload a PDF and start the analysis
  2. Check Progress: Use check_task_status periodically to monitor progress
  3. Get Report: Once completed, use get_report to get the PDF download URL
User: 分析 /path/to/annual_report.pdf
AI: [calls analyze_company] 分析已开始,任务ID是 123,预计需要20分钟

User: 好了吗?
AI: [calls check_task_status] 正在运行:研究新闻和监管文件(7/10 步骤已完成)

User: 现在呢?
AI: [calls check_task_status] 已完成!

User: 给我报告
AI: [calls get_report] PDF报告下载链接:http://localhost:8101/api/tasks/123/report/download

Development

# Install dependencies
pnpm install

# Run in development mode
pnpm dev

# Type check
pnpm typecheck

# Build for production
pnpm build

# Run production build
pnpm start

PDF Reports

PDF reports are generated by the backend and include:

  • Company overview
  • Financial analysis
  • Governance structure
  • Shareholder information
  • News and regulatory findings
  • Risk assessment
  • Works cited / data sources

The PDF is professionally styled with:

  • Clear typography and hierarchy
  • Table formatting
  • Risk indicators
  • Print-optimized layout

Troubleshooting

Backend connection refused

Make sure the MLC Agent backend is running:

cd backend
docker compose up -d
# or
uv run uvicorn mlc_agent.main:app --port 8101

Task timeout

Analysis can take several minutes for large PDFs. Use check_task_status to monitor progress. If a task takes too long, check the backend logs.

Changelog

v1.1.0

  • Added check_task_status tool for monitoring task progress
  • Moved PDF generation from MCP to backend
  • Simplified get_report tool - now returns download URL instead of generating PDF locally
  • Removed wait_for_completion parameter from get_report
  • Removed md-to-pdf dependency
  • Removed OUTPUT_DIR environment variable

v1.0.0

  • Initial release
  • analyze_company tool for uploading PDFs
  • get_report tool with local PDF generation

License

MIT