Package Exports
- casefile-mcp-server
- casefile-mcp-server/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (casefile-mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Casefile MCP Server
A Model Context Protocol (MCP) server implementation for maritime casefile management. This server allows language models to interact with vessel casefiles, search for vessels, and retrieve casefile data through MongoDB and Typesense integration.
Features
- Vessel Search: Search for vessels by name using Typesense full-text search
- Casefile Management: Retrieve casefile data including indexes and page content
- MongoDB Integration: Store and retrieve casefile data from MongoDB
- IMO Number Lookup: Find vessel IMO numbers by vessel name
- MCP Protocol: Full compatibility with Model Context Protocol for AI agent integration
Installation & Usage
Using npx (recommended)
The easiest way to use this package is through npx:
npx casefile-mcp-server --mongo-uri YOUR_MONGO_URI --typesense-host YOUR_HOST --typesense-port YOUR_PORT --typesense-protocol YOUR_PROTOCOL --typesense-api-key YOUR_TYPESENSE_KEY
Using with Claude Desktop
To use with Claude Desktop:
- Open Claude Desktop
- Enable the Plugins feature
- In a terminal window, run:
npx casefile-mcp-server --mongo-uri YOUR_MONGO_URI --typesense-host YOUR_HOST --typesense-port YOUR_PORT --typesense-protocol YOUR_PROTOCOL --typesense-api-key YOUR_TYPESENSE_KEY
- In Claude Desktop, click Add Plugin and connect to the MCP server
- Ask Claude to search for vessels and retrieve casefile data
Install from GitHub Packages
You can install the package from GitHub Packages with:
# Add this to your .npmrc file
@<username>:registry=https://npm.pkg.github.com
# Then install the package
npm install @<username>/casefile-mcp-server
Global Installation
You can install the package globally using:
npm install -g casefile-mcp-server
Or install directly from the GitHub repository:
npm install -g https://github.com/syia-ai/typescript-mcp-server.git
Then run:
casefile-mcp-server --mongo-uri YOUR_MONGO_URI --typesense-host YOUR_HOST --typesense-port YOUR_PORT --typesense-protocol YOUR_PROTOCOL --typesense-api-key YOUR_TYPESENSE_KEY
Manual Installation
- Clone this repository
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
- Start the server:
node dist/index.js --mongo-uri YOUR_MONGO_URI --typesense-host YOUR_HOST --typesense-port YOUR_PORT --typesense-protocol YOUR_PROTOCOL --typesense-api-key YOUR_TYPESENSE_KEY
Command Line Options
--mongo-uri
(required): Your MongoDB connection URI--typesense-host
(required): Typesense server host--typesense-port
(required): Typesense server port--typesense-protocol
(required): Typesense protocol (http/https)--typesense-api-key
(required): Typesense API key--db-name
(optional): MongoDB database name--debug
,-d
: Enable debug output--non-interactive
,-n
: Run in non-interactive mode (no prompt)--help
,-h
: Show help message
MCP Integration
This server implements the Model Context Protocol, allowing language models to:
- Search for vessels by name
- Retrieve casefile indexes and content
- Access vessel information via IMO numbers
- Query casefile data with filtering options
Tools
The server provides the following tool:
Casefile Data Tool
retrieve_casefile_data
: Comprehensive tool for casefile operations- get_casefiles: List all casefiles for a vessel matching a text query
- get_casefile_index: Retrieve index entries of a specific casefile
- get_casefile_pages: Retrieve full page content from a specific casefile
Tool Parameters
operation
(required): Specifies the retrieval operation (get_casefiles
,get_casefile_index
,get_casefile_pages
)imo
: IMO number of the vessel (required forget_casefiles
)casefile_url
: Direct casefile URL link (required forget_casefile_index
andget_casefile_pages
)query
: Search query to filter casefiles (optional forget_casefiles
)start_date
: Start date for filtering index entries (optional forget_casefile_index
)end_date
: End date for filtering index entries (optional forget_casefile_index
)min_importance
: Filter results with importance score ≥ this value (optional forget_casefiles
)pagination
: Page number for paginated results (optional, default: 1)page_size
: Number of results per page (optional, default: 10)page_numbers
: Specific page numbers to retrieve (optional forget_casefile_index
)
Database Integration
MongoDB
The server connects to MongoDB to store and retrieve casefile data. Ensure your MongoDB instance is accessible and properly configured.
Typesense
Typesense is used for full-text search capabilities to find vessels by name. The server expects a fleet-vessel-lookup
collection with the following fields:
vesselName
: The name of the vesselimo
: IMO number of the vessel
Troubleshooting
If you encounter issues with the server:
Check the log files in your temporary directory:
/tmp/casefile-mcp.log
- Server logs/tmp/casefile-debug.log
- Debug logs
Ensure your MongoDB URI is valid and the database is accessible
Verify your Typesense server is running and accessible with the provided credentials
If using with Claude Desktop and having connection issues, try running in non-interactive mode:
npx casefile-mcp-server --mongo-uri YOUR_MONGO_URI --typesense-host YOUR_HOST --typesense-port YOUR_PORT --typesense-protocol YOUR_PROTOCOL --typesense-api-key YOUR_TYPESENSE_KEY --non-interactive
Development
For development, you can run the server directly using ts-node:
npm run dev -- --mongo-uri YOUR_MONGO_URI --typesense-host YOUR_HOST --typesense-port YOUR_PORT --typesense-protocol YOUR_PROTOCOL --typesense-api-key YOUR_TYPESENSE_KEY
Environment Variables
The server supports the following environment variables:
MONGO_URI
: MongoDB connection stringDB_NAME
: Database name to useTYPESENSE_HOST
: Typesense server hostnameTYPESENSE_PORT
: Typesense server portTYPESENSE_PROTOCOL
: Protocol to use (http/https)TYPESENSE_API_KEY
: Typesense API key for authentication
Logging
The server logs all activity to temporary files:
/tmp/casefile-mcp.log
- Main server logs (Unix/macOS) or equivalent temporary directory on Windows/tmp/casefile-debug.log
- Debug logs for troubleshooting
Version History
v1.0.0
- Current stable version with MongoDB and Typesense integration
- Support for vessel search and casefile retrieval operations
- Full MCP protocol compliance
Note: Version numbers are automatically incremented by our GitHub Actions workflow on each successful merge to the main branch.