Token导航 LogoToken导航TokenDH.com
Lloyds List MCP logo
AI代理stdio官方级别未说明来源级核验

Lloyds List MCP

MCP Server

一个模型上下文协议(MCP)服务器,使LLMs能够访问Lloyd's List的海事情报数据,提供MCP工具和可选的HTTP API。

工具数

6

提示词数

0

GitHub Stars

1

资源数

0
数据访问PythonCursorCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ongjh000-lab

提供方

ongjh000-lab

最后核验

2026/5/17 20:22

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python -m venv venv

详细介绍

劳氏船级社MCP服务器

一种模型上下文协议(MCP)服务器,使LLM能够访问劳氏船级社的海事情报数据。提供用于CursorIDE集成的MCP工具和用于web应用程序的可选HTTP API。

特性

公共访问(无身份验证)

  • 按关键字搜索所有劳埃德船级社RSS提要中的文章
  • 按行业(集装箱、干散货等)或主题(脱碳、红海风险等)浏览最新文章
  • 自动从RSS源中提取图像
  • 按类别列出可用提要

智能支付墙检测

  • 自动检测免费与付费文章
  • 仅在需要时请求身份验证
  • 基于会话的身份验证,以避免重复登录

双接口

  • MCP协议: 通过stdio与Cursor IDE直接集成
  • HTTP API: 用于web应用程序的可选基于FastAPI的REST端点
  • OpenAPI文档位于 /docs
  • 部署到托管平台(Render、Railway、Fly.io、Google Cloud Run)

快速开始

先决条件

  • Python 3.10+
  • (可选)Redis用于生产会话存储

安装

  1. 克隆存储库:
git clone https://github.com/yourusername/lloyds-list-mcp.git
cd lloyds-list-mcp
  1. 创建虚拟环境:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. 安装依赖项:
pip install -r requirements.txt
  1. 安装Playwright浏览器:
playwright install chromium
  1. 配置环境(可选):
cp config/.env.example .env
# Edit .env to customize settings

本地运行

选项1:用uvicorn跑步

uvicorn src.lloyds_list_mcp.api:app --host 0.0.0.0 --port 8000 --reload

选项2:使用Docker Compose(包括Redis)运行

docker-compose up

服务器将在 http://localhost:8000

API文件,网址: http://localhost:8000/docs

API终点

公共端点(无身份验证)

搜索文章

POST /api/search
Content-Type: application/json

{
  "query": "container shipping rates",
  "sector": "Containers",
  "limit": 10
}

答复:

{
  "status": "success",
  "count": 5,
  "results": [
    {
      "title": "Container rates surge in Q1 2026",
      "url": "https://lloydslist.com/...",
      "date": "2026-01-20",
      "summary": "Container shipping rates increased 15%...",
      "image_url": "https://lloydslist.com/images/article.jpg",
      "tags": ["Containers", "Markets"],
      "author": "John Doe"
    }
  ]
}

获取最新文章

POST /api/latest
Content-Type: application/json

{
  "feed_type": "sectors",
  "feed_name": "Containers",
  "limit": 10
}

列出可用源

GET /api/feeds

答复:

{
  "status": "success",
  "feeds": {
    "sectors": ["Containers", "Dry Bulk", "Tankers & Gas", ...],
    "topics": ["Decarbonisation", "Red Sea Risk", "Sanctions", ...],
    "regulars": ["Daily Briefing", "The View", "Podcasts & Video", ...]
  }
}

经过身份验证的端点(用于付费内容)

获取文章内容(通过付费墙检测)

POST /api/article
Content-Type: application/json

{
  "article_url": "https://lloydslist.com/LL1156104/...",
  "user_session": null  // Optional - only needed if paywalled
}

如果可以阅读,请回复:

{
  "status": "success",
  "paywall": false,
  "content": {
    "title": "Article title",
    "full_text": "Complete article text...",
    "images": [...],
    "author": "Author name",
    "date": "2026-01-20",
    "tags": ["Containers"]
  }
}

如果付费墙+无会话,则响应:

{
  "status": "authentication_required",
  "paywall": true,
  "message": "This article requires a Lloyd's List subscription",
  "url": "https://lloydslist.com/..."
}

认证用户

POST /api/auth/login
Content-Type: application/json

{
  "username": "your.email@example.com",
  "password": "your-password"
}

答复:

{
  "status": "success",
  "message": "Authentication successful",
  "session_token": "abc123...",
  "expires_in": 86400
}

总结文章

POST /api/summarize
Content-Type: application/json

{
  "article_urls": ["https://lloydslist.com/LL1156104/..."],
  "summary_length": "brief",  // "brief", "detailed", or "full"
  "user_session": null  // Optional - required for detailed/full if paywalled
}

建筑

flowchart TD
    WebApp[AI Web App] -->|HTTP/REST API| MCPServer[MCP Server - Hosted]
    MCPServer -->|Public RSS Parsing| feedparser[feedparser]
    MCPServer -->|Staged Auth Check| AuthManager[Auth Manager]
    
    subgraph PublicTier[Tier 1: Public - No Auth]
        feedparser -->|Titles/Summaries| MCPServer
    end
    
    subgraph AuthTier[Tier 2: Authenticated - On Demand]
        AuthManager -->|Valid Session?| SessionStore[Session Store]
        SessionStore -->|No| WebApp
        WebApp -->|User Login UI| User[End User]
        User -->|Credentials| LloydsAuth[Lloyd's List Auth]
        LloydsAuth -->|Session Token| SessionStore
        SessionStore -->|Yes| ContentFetcher[Article Fetcher]
        ContentFetcher -->|Full Text| MCPServer
    end
    
    MCPServer -->|Results| WebApp

部署

部署以渲染(免费层)

  1. 在以下位置创建渲染帐户https://render.com
  1. 创建新的Web服务:

- 连接您的GitHub存储库 - 环境:Docker - 在根目录下使用Dockerfile

  1. 添加环境变量:
   SESSION_STORE=memory
   SESSION_SECRET_KEY=your-random-secret-key
   LOG_LEVEL=INFO
  1. 部署

您的API将在 https://your-app.onrender.com

替代平台

  • 铁路: 从GitHub一键部署
  • Fly.io: flyctl deploy 命令行界面
  • 谷歌云运行: 通过gcloud部署容器

配置

环境变量(可选-提供默认值):

# Server
HOST=0.0.0.0
PORT=8000
LOG_LEVEL=INFO

# Cache
CACHE_DIR=.cache
FEED_CACHE_TTL=300

# Session Management
SESSION_STORE=memory  # or 'redis'
REDIS_URL=redis://localhost:6379/0
SESSION_TTL=86400  # 24 hours
SESSION_SECRET_KEY=your-secret-key

# Deployment
ENVIRONMENT=production

发展

运行测试

pytest

代码质量

# Format code
black src/

# Lint
ruff src/

# Type check
mypy src/

安全

  • 服务器上未存储凭据
  • 静态加密会话
  • 从未记录密码
  • 会话自动过期
  • 分阶段身份验证(仅在需要时)

MCP工具(用于直接MCP使用)

如果直接通过MCP协议使用服务器:

  • search_articles(query, sector?, category?, limit?) -搜索公共RSS源
  • get_latest_articles(feed_type, feed_name, limit?) -获取最新文章
  • list_available_feeds() -列出所有订阅源
  • get_article_content(article_url, user_session?) -获取完整文章(支持付费墙)
  • authenticate_user(username, password) -创建经过身份验证的会话
  • summarize_articles(article_urls, summary_length, user_session?) -生成摘要

技术栈

  • MCP-SDK: mcp使用(Python)
  • Web框架: 快速API
  • RSS解析: 馈送分析器
  • 身份验证: 剧作家(浏览器自动化)
  • HTML解析: 美丽的Soup4
  • HTTP客户端: httpx
  • 会话存储: Redis(生产)或内存(开发)

许可证

Apache许可证2.0-请参阅 许可证 了解详情。

贡献

欢迎投稿!请看 代理商.md 发展指南。

支持

对于问题或疑问:

  • 打开GitHub问题
  • 查看API文档,网址: /docs
  • 审查 代理商.md 了解实施细节

目录标签

目录标签

数据访问PythonCursor海事情报本地部署MCP协议HTTPAPI智能付费墙检测

支持客户端

Cursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

6

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP