Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ If you installed from source, change `command` and `args` to point to your local
| Variable Name | Description | Default Value |
| ------------- | ----------- | ------------- |
| `LOCALSTACK_AUTH_TOKEN` (**required**) | The LocalStack Auth Token to use for the MCP server | None |
| `MAIN_CONTAINER_NAME` | The name of the LocalStack container to use for the MCP server | `localstack-main` |
| `MAIN_CONTAINER_NAME` | The name of the LocalStack container to use for the MCP server | `localstack-aws` |
| `MCP_ANALYTICS_DISABLED` | Disable MCP analytics when set to `1` | `0` |

## Contributing
Expand Down
10 changes: 5 additions & 5 deletions src/lib/docker/docker.client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("DockerApiClient", () => {

test("findLocalStackContainer returns id when found", async () => {
const mocks = getDockerMocks();
mocks.listContainers.mockResolvedValueOnce([{ Id: "abc123", Names: ["/localstack-main"] }]);
mocks.listContainers.mockResolvedValueOnce([{ Id: "abc123", Names: ["/localstack-aws"] }]);

const client = new DockerApiClient();
await expect(client.findLocalStackContainer()).resolves.toBe("abc123");
Expand All @@ -84,7 +84,7 @@ describe("DockerApiClient", () => {

const mocks = getDockerMocks();
mocks.listContainers.mockResolvedValueOnce([
{ Id: "not-this", Names: ["/localstack-main"] },
{ Id: "not-this", Names: ["/localstack-aws"] },
{ Id: "xyz999", Names: ["/my-custom-localstack"] },
]);

Expand All @@ -98,13 +98,13 @@ describe("DockerApiClient", () => {

const client = new DockerApiClient();
await expect(client.findLocalStackContainer()).rejects.toThrow(
/Could not find a running LocalStack container named "localstack-main"/i
/Could not find a running LocalStack container named "localstack-aws"/i
);
});

test("executeInContainer returns stdout on success", async () => {
const mocks = getDockerMocks();
mocks.listContainers.mockResolvedValueOnce([{ Id: "abc123", Names: ["/localstack-main"] }]);
mocks.listContainers.mockResolvedValueOnce([{ Id: "abc123", Names: ["/localstack-aws"] }]);

// prepare exec.inspect to return 0
mocks.execInspect.mockResolvedValueOnce({ ExitCode: 0 });
Expand Down Expand Up @@ -136,7 +136,7 @@ describe("DockerApiClient", () => {

test("executeInContainer returns stderr on failure", async () => {
const mocks = getDockerMocks();
mocks.listContainers.mockResolvedValueOnce([{ Id: "abc123", Names: ["/localstack-main"] }]);
mocks.listContainers.mockResolvedValueOnce([{ Id: "abc123", Names: ["/localstack-aws"] }]);
mocks.execInspect.mockResolvedValueOnce({ ExitCode: 2 });

const client = new DockerApiClient();
Expand Down
2 changes: 1 addition & 1 deletion src/lib/docker/docker.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class DockerApiClient {
const configuredName = (
process.env.MAIN_CONTAINER_NAME ||
process.env.LOCALSTACK_MAIN_CONTAINER_NAME ||
"localstack-main"
"localstack-aws"
).trim();

const byConfiguredName = (running || []).find((c) =>
Expand Down