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

cdi-mcp-server

v1.0.0

Published

CDI (Chemical Distribution Institute) MCP Server for retrieving and processing maritime inspection data with full CDI authentication support

Readme

CDI MCP Server

A Model Context Protocol (MCP) server implementation in TypeScript that provides data retrieval capabilities for CDI (Chemical Distribution Institute) maritime data.

Overview

The CDI Data MCP Server is designed to fetch and process maritime inspection data from CDI and other maritime data sources. It provides a standardized interface for accessing vessel inspection reports, downloading PDF documents, and managing maritime compliance data.

Features

  • API Data Integration: Fetch vessel inspection data from CDI maritime database
  • PDF Document Management: Automatically download and organize inspection reports
  • Vessel Information Retrieval: Access comprehensive vessel details and inspection history
  • Session Management: Secure authentication and session handling for external APIs
  • Data Processing: Parse and structure maritime data for easy consumption
  • MCP Protocol Support: Full compatibility with Model Context Protocol for AI integration

Installation

You can install and run the CDI MCP Server in several ways:

Using npx (Recommended)

npx cdi-mcp-server

Global Installation

npm install -g cdi-mcp-server
cdi-mcp-server

Local Development

  1. Clone the repository:

    git clone https://github.com/syia-ai/cdi-mcp-server.git
    cd cdi-mcp-server
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env file in the project root with:

    # CDI Authentication (replace {doc_name} with actual document names)
    CDI_{DOC_NAME}_USERNAME=your_username
    CDI_{DOC_NAME}_PASSWORD=your_password

Project Structure

cdi-mcp-server/
├── src/
│   ├── index.ts         # Main server entry point
│   ├── tools.ts         # Core CDI data scraping implementation
│   ├── types.ts         # TypeScript type definitions
│   ├── utils.ts         # Utility functions
│   └── test.ts         # Test suite
├── bin/
│   └── cli.js          # CLI entry point
├── dist/               # Compiled JavaScript files
├── .eslintrc          # ESLint configuration
├── .prettierrc        # Prettier configuration
├── .gitignore         # Git ignore rules
├── package.json       # Project dependencies and scripts
├── tsconfig.json      # TypeScript configuration
├── install.js         # Post-install script
└── README.md         # Project documentation

Available Scripts

  • npm start - Start the MCP server
  • npm run dev - Run in development mode with auto-reload
  • npm run build - Build the TypeScript code
  • npm test - Run MCP inspector tests
  • npm run install-global - Install package globally
  • npx cdi-mcp-server - Run directly with npx

MCP Tool Documentation

cdi_data_main

The server provides a tool called cdi_data_main that retrieves CDI inspection data and downloads associated PDF reports.

Input Schema:

{
  "type": "object",
  "properties": {
    "doc_name": {
      "type": "string",
      "description": "The document name identifier for the vessel"
    }
  },
  "required": ["doc_name"]
}

Returns:

  • List of inspection records with metadata
  • Local file paths to downloaded PDF reports
  • Vessel information and inspection details

Available Document Names

The following doc_name values are supported:

| Document Name | Description | Required Environment Variables | |--------------|-------------|------------------------------| | SMEC | Synergy Marine Enterprise Corp | CDI_SMEC_USERNAME, CDI_SMEC_PASSWORD | | SMC | Synergy Marine Corp | CDI_SMC_USERNAME, CDI_SMC_PASSWORD | | SMPL | Synergy Marine Private Limited | CDI_SMPL_USERNAME, CDI_SMPL_PASSWORD | | SDK | Synergy Denmark | CDI_SDK_USERNAME, CDI_SDK_PASSWORD | | SNPL | Synergy Navis Private Limited | CDI_SNPL_USERNAME, CDI_SNPL_PASSWORD | | SOPL | Synergy Oceanic Private Limited | CDI_SOPL_USERNAME, CDI_SOPL_PASSWORD | | SMID | Synergy Marine Indonesia | CDI_SMID_USERNAME, CDI_SMID_PASSWORD |

Development

Code Style

The project uses:

  • TypeScript for type safety
  • ESLint for code linting
  • Prettier for code formatting

Testing

The project includes a test suite that:

  • Validates CDI data retrieval
  • Tests PDF download functionality
  • Verifies data structure integrity
  • Checks authentication flow

Run tests with:

npm test

Error Handling

The server includes comprehensive error handling for:

  • Authentication failures
  • Network connectivity issues
  • Data parsing errors
  • File system operations
  • Session management

Logging

The server uses Winston for logging with:

  • Detailed operation logging
  • Error tracking
  • PDF download status
  • Session management events

File Storage

Downloaded PDF reports are stored in the downloads/ directory with a structured naming convention:

downloads/
└── {vessel_name}_{imo}_{inspection_date}.pdf

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

MIT License - See LICENSE file for details