Token导航 LogoToken导航TokenDH.com
Mcpo Contrast logo
运维云端未说明官方级别未说明来源级核验

Mcpo Contrast

MCP Server

一个将MCP服务器暴露为OpenAPI兼容HTTP端点的工具,适用于OpenWebUI。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
API集成Docker本地部署云端部署

安装说明

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

作者 / 组织

Contrast-Security-OSS

提供方

Contrast-Security-OSS

最后核验

2026/5/17 20:20

快速接入

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

详细介绍

mcpo码头

MCPO+对比安全集成指南

本指南将引导您使用模型上下文协议(MCP)在mcpo和对比安全之间设置完整的集成。如果您还没有完成环境设置,请查看 Mac开发-安装指南-初学者.md

概述

在本指南结束时,您将拥有:

  • 与Contrast Security集成运行的MCP服务器(mcpo)

先决条件

  • 已安装Docker和Docker Compose
  • 基本熟悉命令行操作
  • 对比安全帐户和API凭据

步骤3:设置具有对比安全性的MCP服务器

3.1创建项目目录

mkdir mcpo-contrast-integration
cd mcpo-contrast-integration

3.2下载MCP对比JAR

从GitHub版本下载mcp对比的最新JAR文件:

# Download the JAR file directly from GitHub releases
curl -L -o mcp-contrast.jar https://github.com/Contrast-Security-OSS/mcp-contrast/releases/download/v0.0.14/mcp-contrast-0.0.14.jar

替代方案:从源代码构建 如果您更喜欢从源代码构建:

# Clone the mcp-contrast repository
git clone https://github.com/Contrast-Security-OSS/mcp-contrast.git

# Navigate to the repository
cd mcp-contrast

# Build the JAR file using Docker
docker build -t mcp-contrast .

# Copy the JAR file to your project directory
cp target/mcp-contrast-*.jar ../mcp-contrast.jar

# Return to your project directory
cd ..

3.3创建Dockerfile

FROM python:3.11-slim

LABEL org.opencontainers.image.title="mcpo"
LABEL org.opencontainers.image.description="Docker image for mcpo (Model Context Protocol OpenAPI Proxy)"
LABEL org.opencontainers.image.source="https://github.com/alephpiece/mcpo-docker"
LABEL org.opencontainers.image.licenses="MIT"

# install npx and OpenJDK JRE 21
RUN apt-get update && apt-get install -y --no-install-recommends \
    curl \
    nodejs \
    npm \
    openjdk-21-jre-headless \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/usr/local/bin" sh

COPY ./mcp-contrast.jar /app/mcp-contrast.jar
COPY ./config.json /app/config.json

WORKDIR /app
EXPOSE 8000

ENTRYPOINT ["uvx", "mcpo"]
CMD ["--config", "/app/config.json"]

3.4创建Docker编写文件

services:
  mcpo:
    build: .
    container_name: mcpo
    image: mcpo-docker
    ports:
      - "8000:8000"
    volumes:
      - ./config.json:/app/config.json
      - ./mcp-contrast.jar:/app/mcp-contrast.jar

3.5创建MCP配置

创建 config.json 使用您的对比度安全凭据:

{
    "mcpServers": {
        "sequential-thinking": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-sequential-thinking"
            ]
        },
        "memory": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-memory"
            ]
        },
        "time": {
            "command": "uvx",
            "args": [
                "mcp-server-time",
                "--local-timezone=America/New_York"
            ]
        },
        "contrast-mcp": {
            "command": "/usr/bin/java", 
            "args": ["-jar","/app/mcp-contrast.jar",
            "--CONTRAST_HOST_NAME=https://your-contrast-server.com",
            "--CONTRAST_API_KEY=your-api-key",
            "--CONTRAST_SERVICE_KEY=your-service-key",
            "--CONTRAST_USERNAME=your-username",
            "--CONTRAST_ORG_ID=your-org-id"]
        }
    }
}

⚠️ 重要:将占位符值替换为实际的对比度安全凭据:

  • your-contrast-server.com -您的对比度安全服务器URL
  • your-api-key -您的对比度API键
  • your-service-key -您的对比度服务密钥
  • your-username -您的对比度用户名
  • your-org-id -您的对比组织ID

3.6添加对比度MCP JAR

如果你按照步骤3.2进行操作,你应该已经有了 mcp-contrast.jar 文件在您的目录中。如果没有,请复制您的 mcp-contrast.jar 文件到此目录。

3.7构建和运行MCP服务器

# Build the container
docker-compose build

# Start the MCP server
docker-compose up -d

# Verify it's running and connected
docker logs mcpo

您应该看到显示与所有MCP服务器成功连接的日志,包括 contrast-mcp.

统一资源定位符: http://localhost:8000/contrast-mcp/openapi.jsonhttp://mcpo:8000/contrast-mcp/openapi.json 无论你在哪里都可以访问你刚刚启动的容器。

目录标签

目录标签

API集成Docker本地部署云端部署Dockerfile模型上下文协议OpenAPIHTTP端点

接入字段

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

未说明

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

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明none部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP