Home

Docker MCP Gateway

qianmoQqianmoQ· 更新于 2026-10-13· 阅读 3 分钟· 0 次阅读

登录后可跨设备保存划线和私人笔记登录

Docker MCP Gateway

Testcontainers module for Docker MCP Gateway.

DockerMcpGatewayContainer's usage examples

You can start a Docker MCP Gateway container instance from any Java application by using:

Create a DockerMcpGatewayContainer

DockerMcpGatewayContainer gateway = new DockerMcpGatewayContainer("docker/mcp-gateway:latest")
    .withServer("curl", "curl")
    .withServer("brave", "brave_local_search", "brave_web_search")
    .withServer("github-official", Collections.singletonList("add_issue_comment"))
    .withSecret("brave.api_key", "test_key")
    .withSecrets(Collections.singletonMap("github.personal_access_token", "test_token"))

Adding this module to your project dependencies

Docker MCP Gateway support is part of the core Testcontainers library.

Add the following dependency to your pom.xml/build.gradle file:

GradleMaven

testImplementation "org.testcontainers:testcontainers:2.0.5"
<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>testcontainers</artifactId>
    <version>2.0.5</version>
    <scope>test</scope>
</dependency>

评论

登录后参与评论

正在加载评论…