@aws/nx-plugin-mcp 1.0.0-rc.90 → 1.0.0-rc.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/aws-nx-mcp.js +2161 -1045
- package/docs/get_started/tutorials/dungeon-game/1.mdx +12 -8
- package/docs/get_started/tutorials/dungeon-game/overview.mdx +1 -1
- package/docs/guides/docker-bundling.mdx +11 -10
- package/docs/guides/py-agent.mdx +20 -8
- package/docs/guides/py-mcp-server.mdx +11 -3
- package/docs/guides/react-website-auth.mdx +1 -1
- package/docs/guides/ts-agent.mdx +23 -9
- package/docs/guides/ts-mcp-server.mdx +13 -3
- package/docs/snippets/agent/bedrock-deployment.mdx +36 -11
- package/docs/snippets/agentcore-hosting.mdx +9 -0
- package/docs/snippets/api/cors-configuration-cdk-note.mdx +2 -2
- package/docs/snippets/api/cors-configuration-terraform-note.mdx +1 -1
- package/docs/snippets/mcp/bedrock-deployment.mdx +26 -9
- package/docs/snippets/mcp/shared-constructs.mdx +4 -0
- package/docs/snippets/rdb/deploying.mdx +9 -1
- package/package.json +1 -1
- package/src/py/agent/schema.json +2 -2
- package/src/py/mcp-server/schema.json +2 -2
- package/src/ts/agent/schema.json +2 -2
- package/src/ts/mcp-server/schema.json +2 -2
|
@@ -6,7 +6,7 @@ import Infrastructure from '@components/infrastructure.astro';
|
|
|
6
6
|
|
|
7
7
|
### Infrastructure as Code
|
|
8
8
|
|
|
9
|
-
If you selected `agentcore` for `infra`, the relevant CDK or Terraform infrastructure is generated which you can use to deploy your MCP server to [Amazon Bedrock AgentCore Runtime](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agents-tools-runtime.html).
|
|
9
|
+
If you selected `agentcore` or `agentcore-ecr` for `infra`, the relevant CDK or Terraform infrastructure is generated which you can use to deploy your MCP server to [Amazon Bedrock AgentCore Runtime](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agents-tools-runtime.html).
|
|
10
10
|
|
|
11
11
|
<Infrastructure>
|
|
12
12
|
<Fragment slot="cdk">
|
|
@@ -32,26 +32,43 @@ This construct uses the [`aws-cdk-lib/aws-bedrockagentcore` module](https://docs
|
|
|
32
32
|
<Fragment slot="terraform">
|
|
33
33
|
A Terraform module is generated for you, named based on the `name` you chose when running the generator, or `<ProjectName>-mcp-server` by default.
|
|
34
34
|
|
|
35
|
-
Pass the shared <Link path="/guides/runtime-config#writing-configuration">`runtime_config_appconfig`</Link> module's outputs into the MCP server module:
|
|
35
|
+
Pass the shared <Link path="/guides/runtime-config#writing-configuration">`runtime_config_appconfig`</Link> module's outputs into the MCP server module, along with the shared artefact store its packaging uses. Under the default `agentcore` packaging the server's code is staged in the shared asset bucket, so instantiate the `core/asset-bucket` module once per deployment, as the Lambda and API modules already do:
|
|
36
36
|
|
|
37
37
|
```terraform
|
|
38
|
+
module "asset_bucket" {
|
|
39
|
+
source = "../../common/terraform/src/core/asset-bucket"
|
|
40
|
+
}
|
|
41
|
+
|
|
38
42
|
module "my_project_mcp_server" {
|
|
39
43
|
source = "../../common/terraform/src/app/mcp-servers/my-project-mcp-server"
|
|
40
44
|
|
|
41
45
|
appconfig_application_id = module.runtime_config_appconfig.application_id
|
|
42
46
|
appconfig_application_arn = module.runtime_config_appconfig.application_arn
|
|
47
|
+
|
|
48
|
+
asset_bucket_name = module.asset_bucket.bucket_name
|
|
49
|
+
asset_bucket_arn = module.asset_bucket.bucket_arn
|
|
43
50
|
}
|
|
44
51
|
```
|
|
45
|
-
</Fragment>
|
|
46
|
-
</Infrastructure>
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
[Docker](https://www.docker.com/) is required to build and deploy your MCP server. Make sure you have installed and launched Docker to avoid errors such as:
|
|
53
|
+
Under `agentcore-ecr` the server's image is published to the shared asset registry instead, so pass `core/asset-ecr`'s outputs rather than the bucket's. One registry serves every container in the workspace, so no MCP server needs a repository of its own:
|
|
50
54
|
|
|
55
|
+
```terraform
|
|
56
|
+
module "asset_ecr" {
|
|
57
|
+
source = "../../common/terraform/src/core/asset-ecr"
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
module "my_project_mcp_server" {
|
|
61
|
+
source = "../../common/terraform/src/app/mcp-servers/my-project-mcp-server"
|
|
62
|
+
|
|
63
|
+
appconfig_application_id = module.runtime_config_appconfig.application_id
|
|
64
|
+
appconfig_application_arn = module.runtime_config_appconfig.application_arn
|
|
65
|
+
|
|
66
|
+
asset_ecr_repository_url = module.asset_ecr.repository_url
|
|
67
|
+
asset_ecr_repository_arn = module.asset_ecr.repository_arn
|
|
68
|
+
}
|
|
51
69
|
```
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
:::
|
|
70
|
+
</Fragment>
|
|
71
|
+
</Infrastructure>
|
|
55
72
|
|
|
56
73
|
### Authentication
|
|
57
74
|
|
|
@@ -26,6 +26,10 @@ For deploying your MCP Server, the following files are generated:
|
|
|
26
26
|
- core
|
|
27
27
|
- agent-core
|
|
28
28
|
- runtime.tf Generic module for deploying to Bedrock AgentCore Runtime
|
|
29
|
+
- agent-core-code (when `infra` is `agentcore`)
|
|
30
|
+
- runtime.tf Packages your MCP Server's code and delegates to `agent-core`
|
|
31
|
+
- agent-core-container (when `infra` is `agentcore-ecr`)
|
|
32
|
+
- runtime.tf Builds and publishes your MCP Server's image and delegates to `agent-core`
|
|
29
33
|
</FileTree>
|
|
30
34
|
</Fragment>
|
|
31
35
|
</Infrastructure>
|
|
@@ -37,7 +37,13 @@ The generated infrastructure creates two database users:
|
|
|
37
37
|
<Fragment slot="terraform">
|
|
38
38
|
The Terraform module is created in `common/terraform`. Example usage:
|
|
39
39
|
|
|
40
|
+
The migration Lambda is deployed as a container image, published to the shared asset registry. Instantiate the `core/asset-ecr` module once per deployment and pass its `repository_url` into every database module:
|
|
41
|
+
|
|
40
42
|
```hcl title="packages/infra/src/main.tf"
|
|
43
|
+
module "asset_ecr" {
|
|
44
|
+
source = "../../common/terraform/src/core/asset-ecr"
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
module "my_database" {
|
|
42
48
|
source = "../../common/terraform/src/app/dbs/my-database"
|
|
43
49
|
|
|
@@ -46,11 +52,13 @@ module "my_database" {
|
|
|
46
52
|
database_subnet_ids = aws_subnet.database[*].id
|
|
47
53
|
lambda_subnet_ids = aws_subnet.private[*].id
|
|
48
54
|
|
|
55
|
+
asset_ecr_repository_url = module.asset_ecr.repository_url
|
|
56
|
+
|
|
49
57
|
tags = local.common_tags
|
|
50
58
|
}
|
|
51
59
|
```
|
|
52
60
|
|
|
53
|
-
This provisions an Aurora cluster with RDS Proxy, admin credentials, create-db-user Lambda, runtime config registration, migration Lambda
|
|
61
|
+
This provisions an Aurora cluster with RDS Proxy, admin credentials, create-db-user Lambda, runtime config registration, and migration Lambda.
|
|
54
62
|
|
|
55
63
|
The database module registers its connection details under the `database` <Link path="guides/runtime-config">runtime configuration</Link> namespace, which the shared runtime configuration AppConfig application exposes by default.
|
|
56
64
|
|
package/package.json
CHANGED
package/src/py/agent/schema.json
CHANGED
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
},
|
|
56
56
|
"infra": {
|
|
57
57
|
"type": "string",
|
|
58
|
-
"description": "The type of infrastructure to host your Agent.",
|
|
58
|
+
"description": "The type of infrastructure to host your Agent. agentcore deploys your code as a zip to an AgentCore managed runtime for the fastest build and deploy cycle. agentcore-ecr builds and hosts a container image instead, for OS-level control or an established container pipeline.",
|
|
59
59
|
"x-prompt": "How would you like to host your Agent server?",
|
|
60
|
-
"enum": ["agentcore", "none"],
|
|
60
|
+
"enum": ["agentcore", "agentcore-ecr", "none"],
|
|
61
61
|
"default": "agentcore",
|
|
62
62
|
"x-priority": "important"
|
|
63
63
|
},
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
},
|
|
40
40
|
"infra": {
|
|
41
41
|
"type": "string",
|
|
42
|
-
"description": "The type of infrastructure to host your MCP server. Select none for no hosting.",
|
|
42
|
+
"description": "The type of infrastructure to host your MCP server. agentcore deploys your code as a zip to an AgentCore managed runtime for the fastest build and deploy cycle. agentcore-ecr builds and hosts a container image instead, for OS-level control or an established container pipeline. Select none for no hosting.",
|
|
43
43
|
"x-prompt": "How would you like to host your MCP server?",
|
|
44
|
-
"enum": ["agentcore", "none"],
|
|
44
|
+
"enum": ["agentcore", "agentcore-ecr", "none"],
|
|
45
45
|
"default": "agentcore",
|
|
46
46
|
"x-priority": "important"
|
|
47
47
|
},
|
package/src/ts/agent/schema.json
CHANGED
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
},
|
|
56
56
|
"infra": {
|
|
57
57
|
"type": "string",
|
|
58
|
-
"description": "The type of infrastructure to host your Agent.",
|
|
58
|
+
"description": "The type of infrastructure to host your Agent. agentcore deploys your code as a zip to an AgentCore managed runtime for the fastest build and deploy cycle. agentcore-ecr builds and hosts a container image instead, for OS-level control or an established container pipeline.",
|
|
59
59
|
"x-prompt": "How would you like to host your Agent server?",
|
|
60
|
-
"enum": ["agentcore", "none"],
|
|
60
|
+
"enum": ["agentcore", "agentcore-ecr", "none"],
|
|
61
61
|
"default": "agentcore",
|
|
62
62
|
"x-priority": "important"
|
|
63
63
|
},
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
},
|
|
40
40
|
"infra": {
|
|
41
41
|
"type": "string",
|
|
42
|
-
"description": "The type of infrastructure to host your MCP server. Select none for no hosting.",
|
|
42
|
+
"description": "The type of infrastructure to host your MCP server. agentcore deploys your code as a zip to an AgentCore managed runtime for the fastest build and deploy cycle. agentcore-ecr builds and hosts a container image instead, for OS-level control or an established container pipeline. Select none for no hosting.",
|
|
43
43
|
"x-prompt": "How would you like to host your MCP server?",
|
|
44
|
-
"enum": ["agentcore", "none"],
|
|
44
|
+
"enum": ["agentcore", "agentcore-ecr", "none"],
|
|
45
45
|
"default": "agentcore",
|
|
46
46
|
"x-priority": "important"
|
|
47
47
|
},
|