Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
30554dc
feat: Add Terminal49 MCP Server - Sprint 1 Foundations
claude Oct 22, 2025
7ce6bd5
feat: Add TypeScript MCP Server for Vercel deployment
claude Oct 22, 2025
25d6002
feat: Add TypeScript MCP Server - Experimental Branch
dodeja Oct 22, 2025
12d5947
feat: Enhanced Terminal49 MCP Server - Working Production Version
dodeja Oct 22, 2025
e2a99e8
fix: Remove shipping_line from shipment includes to avoid API 500 error
dodeja Oct 22, 2025
9a73bce
feat: Upgrade to MCP SDK v1.20.1 with McpServer API (Phase 1 Complete)
dodeja Oct 22, 2025
974ac15
feat: Add 3 workflow prompts with Zod schemas (Phase 2.1 Complete)
dodeja Oct 22, 2025
d2a5eaa
docs: Update README and CHANGELOG to match actual implementation (Pha…
dodeja Oct 22, 2025
0a7084e
docs: Add comprehensive execution summary
dodeja Oct 22, 2025
e435793
fix: Add structuredContent to all tool handlers for MCP protocol comp…
dodeja Oct 22, 2025
5ccda53
docs: Update EXECUTION_SUMMARY.md with Phase 4 testing results
dodeja Oct 22, 2025
43f99a6
refactor: Remove Ruby MCP implementation - TypeScript only
dodeja Oct 22, 2025
d0673f1
feat: Add SSE transport support and custom domain configuration
dodeja Oct 22, 2025
4835170
docs: Add comprehensive Vercel preview deployment setup guide
dodeja Oct 22, 2025
c5d1252
docs: Add Vercel setup checklist for production & preview deployments
dodeja Oct 22, 2025
918317b
fix: Remove env secret reference from vercel.json
dodeja Oct 22, 2025
973c5d5
fix: Remove runtime field from vercel.json functions config
dodeja Oct 22, 2025
4f87c5e
chore: Clean up repository and improve security
dodeja Oct 22, 2025
5d7bda8
chore: Remove remaining test files with hardcoded secrets
dodeja Oct 22, 2025
28fc7b0
fix: Add root package.json and TypeScript config for Vercel build
dodeja Oct 22, 2025
addcb67
fix: Make milestone-glossary a static listable resource
dodeja Oct 22, 2025
e03b558
chore: Add root package-lock.json for dependency locking
dodeja Oct 22, 2025
5d6c5f2
docs: Add OAuth 2.1 implementation plan for MCP authorization
dodeja Oct 23, 2025
46f8a82
feat: Reorganize MCP package structure and fix build issues
dodeja Nov 23, 2025
ba388b5
fix: Migrate SDK ESLint config to v9 flat config format
dodeja Nov 23, 2025
b066d62
docs: Add Vale configuration for documentation linting
dodeja Nov 23, 2025
4b580a7
fix: Update Vale configuration format
dodeja Nov 23, 2025
92c67b6
fix: Correct Vale vocabulary directory structure
dodeja Nov 23, 2025
85a6b0b
fix: Ensure Vocab line is present in .vale.ini
dodeja Nov 23, 2025
d857b06
fix: Remove Vocab line from .vale.ini to resolve Mintlify CI error
dodeja Nov 23, 2025
98f8009
docs: Fix spelling error and improve Vale code block detection
dodeja Nov 23, 2025
47e64b1
docs: Clean up Vale comment attempts in MCP docs
dodeja Nov 23, 2025
c49c196
Add MCP docs, mapped SDK outputs, CI, and lint fixes
dodeja Nov 23, 2025
eade679
Fix Mint v2 navigation and base config
dodeja Nov 23, 2025
c3ae571
Point MCP docs to mcp.terminal49.com
dodeja Nov 24, 2025
6f80957
Remove local dev guidance from MCP docs
dodeja Nov 24, 2025
fb77e77
Use /mcp path for MCP docs
dodeja Nov 24, 2025
5c5bdc7
Add public folder for Vercel build
dodeja Nov 24, 2025
58064ee
Fix MCP build deps for Vercel
dodeja Nov 24, 2025
2885c36
Update @vercel/node for build
dodeja Nov 24, 2025
76b8d1d
Bump MCP/SDK tooling deps
dodeja Nov 24, 2025
f9cfd73
Add .tool-versions with Node 22.15.0
dodeja Nov 24, 2025
dbefe28
Trim SDK deps (dotenv dev-only, drop undici-types)
dodeja Nov 24, 2025
129e8ff
Make lint pass for MCP and SDK
dodeja Nov 24, 2025
2ed83c6
Align tsconfig module with NodeNext
dodeja Nov 24, 2025
699d5ce
Update MCP docs with capabilities list and fixes
dodeja Nov 26, 2025
31a0a0f
Improve MCP docs with 5-minute quickstart and detailed references
dodeja Nov 27, 2025
f3e18e8
chore: move non-mcp docs to docs-refresh
dodeja Dec 23, 2025
ffec3e5
chore: move non-mcp items to separate branches
dodeja Dec 23, 2025
4032740
chore: Auto-generate Postman collection from openapi.json [skip ci]
github-actions[bot] Dec 23, 2025
fee7fc3
feat(mcp): add list tools and typed tracking requests
dodeja Jan 11, 2026
8baff99
fix(sdk): correct auth header and regenerate types
dodeja Jan 11, 2026
131c5ff
test(sdk): make smoke tests load .env.local
dodeja Jan 11, 2026
90cb0a9
docs: add MCP server overview README
dodeja Jan 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Terminal49 MCP Server - Environment Variables
# Copy this file to .env.local and fill in your credentials

# Terminal49 API Token
# Get your token from: https://app.terminal49.com/settings/api
T49_API_TOKEN=your_api_token_here

# Terminal49 API Base URL (optional)
# Default: https://api.terminal49.com/v2
T49_API_BASE_URL=https://api.terminal49.com/v2
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: [ main, master, feature/** ]
pull_request:
branches: [ main, master, feature/** ]

jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install root deps
run: npm install
- name: Build SDK
run: npm run build --workspace @terminal49/sdk
- name: Test SDK
run: npm test --workspace @terminal49/sdk
- name: Lint SDK
run: npm run lint --workspace @terminal49/sdk
- name: Build MCP
run: npm run build --workspace @terminal49/mcp
- name: Test MCP
run: npm test --workspace @terminal49/mcp
env:
# Optional: set API token for integration tests if added later
T49_API_TOKEN: ${{ secrets.T49_API_TOKEN || '' }}
- name: Docs lint (optional)
run: echo "No docs lint configured" || true
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
.DS_Store

.vercel
node_modules

# Environment variables
.env.local
.env.development.local
.env
*.env
!.env.sample
!.env.example

.tool-versions.local

# LLM context files (development only)
*-llms-full.txt
mcp-protocol-*.txt

# Test files
mcp-ts/test-*.js
mcp-ts/test-*.sh

.pytest_cache

# Claude Code configuration
.claude/

# Build output
dist/
packages/*/dist/
sdks/*/dist/
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodejs 22.15.0
bun latest
219 changes: 219 additions & 0 deletions MCP_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
# Terminal49 MCP Server

> Model Context Protocol server for Terminal49's Container Tracking API

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/Terminal49/API)

---

## πŸš€ Quick Start

### Use with Claude Desktop

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
"mcpServers": {
"terminal49": {
"command": "npx",
"args": ["-y", "@terminal49/mcp"],
"env": {
"T49_API_TOKEN": "your_token_here"
}
}
}
}
```

**Get your API token:** https://app.terminal49.com/developers/api-keys

### Deploy to Vercel

1. Click "Deploy" button above
2. Add environment variable: `T49_API_TOKEN=your_token_here`
3. Your MCP server will be at: `https://your-deployment.vercel.app/api/mcp`

---

## πŸ“¦ What You Can Do

### πŸ” Track Containers
```
Track container TCLU1234567 on Maersk
```

### πŸ“Š Check Demurrage Risk
```
Check demurrage for container MSCU9876543
```

### 🚒 Analyze Journey Delays
```
Analyze delays for booking MAEU12345678
```

### πŸ”Ž Search Shipments
```
Search for bill of lading 123456789
```

---

## πŸ› οΈ Available Tools (10)

| Tool | Description |
|------|-------------|
| `search_container` | Find containers by number, BL, booking, or reference |
| `track_container` | Start tracking a container with carrier code |
| `get_container` | Get detailed container information |
| `get_shipment_details` | Get complete shipment routing and containers |
| `get_container_transport_events` | Get full event timeline |
| `get_container_route` | Get vessel routing with ETAs |
| `get_supported_shipping_lines` | List 40+ supported carriers |
| `list_containers` | Browse all tracked containers |
| `list_shipments` | Browse all shipments |
| `list_tracking_requests` | Browse tracking requests |

### 🎯 Workflow Prompts (3)

Pre-built workflows for common tasks:
- **track-shipment** - Quick container tracking
- **check-demurrage** - Demurrage/detention analysis
- **analyze-delays** - Journey delay identification

---

## πŸ“š Documentation

**Full docs:** [`packages/mcp/README.md`](packages/mcp/README.md)

**Topics:**
- Installation & Setup
- Tool Reference
- Local Development
- API Examples
- Deployment Guide

---

## πŸ—οΈ What's Inside

```
/
β”œβ”€β”€ api/mcp.ts # Vercel HTTP endpoint
β”œβ”€β”€ packages/mcp/ # MCP server package
β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ tools/ # 10 MCP tools
β”‚ β”‚ β”œβ”€β”€ prompts/ # 3 workflow prompts
β”‚ β”‚ └── resources/ # Dynamic resources
β”‚ └── README.md # Full documentation
└── sdks/typescript-sdk/ # Terminal49 API client
└── src/client.ts
```

**Stack:**
- [Model Context Protocol SDK](https://modelcontextprotocol.io) v1.22.0
- TypeScript
- Vercel Serverless Functions
- Terminal49 JSON:API

---

## πŸ”§ Development

### Prerequisites
- Node.js 18+
- Terminal49 API token

### Local Setup

```bash
# Install dependencies
npm install

# Run MCP server locally (stdio)
cd packages/mcp
npm run dev

# Run tests
npm test

# Build
npm run build
```

### Testing with MCP Inspector

```bash
npx @modelcontextprotocol/inspector packages/mcp/dist/index.js
```

---

## πŸ“– API Coverage

**Supported Endpoints:**
- βœ… Container Search
- βœ… Container Tracking
- βœ… Shipment Details
- βœ… Transport Events
- βœ… Container Routes
- βœ… Shipping Lines
- βœ… Tracking Requests

**Features:**
- Type-safe OpenAPI client
- JSON:API deserialization
- Automatic retries
- Token authentication
- Flexible data loading

---

## 🚒 Deployment

### Vercel (Production)

**Automatic:**
Push to `main` branch β†’ auto-deploys

**Manual:**
```bash
vercel deploy --prod
```

**Environment Variables:**
- `T49_API_TOKEN` - Your Terminal49 API token (required)
- `T49_API_BASE_URL` - Optional (defaults to https://api.terminal49.com)

### Claude Desktop (Local)

See [Quick Start](#quick-start) above.

---

## πŸ“ License

MIT

---

## πŸ”— Links

- [Terminal49 API Docs](https://docs.terminal49.com)
- [Model Context Protocol](https://modelcontextprotocol.io)
- [Get API Token](https://app.terminal49.com/developers/api-keys)
- [Full MCP Documentation](packages/mcp/README.md)

---

## πŸ†˜ Support

- **Issues:** [GitHub Issues](https://github.com/Terminal49/API/issues)
- **Email:** support@terminal49.com
- **Slack:** [Terminal49 Community](https://terminal49.com/slack)

---

**Built with πŸ‘ by Terminal49**
Loading
Loading