Skip to content

Commit 48718e7

Browse files
committed
feat: add MCP server configuration for enhanced documentation access
1 parent 8605ff0 commit 48718e7

File tree

1 file changed

+78
-3
lines changed

1 file changed

+78
-3
lines changed

CLAUDE.md

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ variable "backup_vault_access_policy" {
335335
# Additional validation to prevent overly permissive policies
336336
validation {
337337
condition = var.backup_vault_access_policy == "" ? true : (
338-
!can(regex("\"Principal\"\s*:\s*\"\*\"", var.backup_vault_access_policy)) &&
339-
!can(regex("\"Action\"\s*:\s*\"\*\"", var.backup_vault_access_policy))
338+
!can(regex("\"Principal\"\\s*:\\s*\"\\*\"", var.backup_vault_access_policy)) &&
339+
!can(regex("\"Action\"\\s*:\\s*\"\\*\"", var.backup_vault_access_policy))
340340
)
341341
error_message = "backup_vault_access_policy cannot have wildcard (*) principals or actions for security."
342342
}
@@ -1040,4 +1040,79 @@ terraform {
10401040
9. **16 Example Configurations** - From simple to enterprise-grade scenarios
10411041
10. **Performance Optimization** - Backup job scheduling and resource optimization
10421042

1043-
*Note: This module focuses on AWS Backup best practices and patterns specific to backup and disaster recovery operations.*
1043+
*Note: This module focuses on AWS Backup best practices and patterns specific to backup and disaster recovery operations.*
1044+
1045+
## MCP Server Configuration
1046+
1047+
### Available MCP Servers
1048+
This project is configured to use the following Model Context Protocol (MCP) servers for enhanced documentation access:
1049+
1050+
#### Terraform MCP Server
1051+
**Purpose**: Access up-to-date Terraform and AWS provider documentation
1052+
**Package**: `@modelcontextprotocol/server-terraform`
1053+
1054+
**Local Configuration** (`.mcp.json`):
1055+
```json
1056+
{
1057+
"mcpServers": {
1058+
"terraform": {
1059+
"command": "npx",
1060+
"args": ["-y", "@modelcontextprotocol/server-terraform@latest"]
1061+
}
1062+
}
1063+
}
1064+
```
1065+
1066+
**Usage Examples**:
1067+
- `Look up aws_backup_vault resource documentation`
1068+
- `Find the latest AWS Backup lifecycle policy examples`
1069+
- `Search for AWS Backup Terraform modules`
1070+
- `Get documentation for aws_backup_plan resource`
1071+
1072+
#### Context7 MCP Server
1073+
**Purpose**: Access general library and framework documentation
1074+
**Package**: `@upstash/context7-mcp`
1075+
1076+
**Local Configuration** (`.mcp.json`):
1077+
```json
1078+
{
1079+
"mcpServers": {
1080+
"context7": {
1081+
"command": "npx",
1082+
"args": ["-y", "@upstash/context7-mcp@latest"]
1083+
}
1084+
}
1085+
}
1086+
```
1087+
1088+
**Usage Examples**:
1089+
- `Look up Go testing patterns for Terratest`
1090+
- `Find AWS CLI backup commands documentation`
1091+
- `Get current Terraform best practices`
1092+
- `Search for GitHub Actions workflow patterns`
1093+
1094+
### GitHub Actions Integration
1095+
The MCP servers are automatically available in GitHub Actions through the claude.yml workflow configuration. Claude can access the same documentation in PRs and issues as available locally.
1096+
1097+
### Usage Tips
1098+
1. **Be Specific**: When requesting documentation, specify the exact resource or concept
1099+
2. **Version Awareness**: Both servers provide current, version-specific documentation
1100+
3. **Combine Sources**: Use Terraform MCP for backup-specific docs, Context7 for general development patterns
1101+
4. **Local vs CI**: Same MCP servers work in both local development and GitHub Actions
1102+
1103+
### Example Workflows
1104+
1105+
**Backup Resource Development**:
1106+
```
1107+
@claude I need to add support for backup vault lock. Can you look up the latest aws_backup_vault_lock_configuration documentation and show me how to implement this feature?
1108+
```
1109+
1110+
**Testing Pattern Research**:
1111+
```
1112+
@claude Look up current Terratest patterns for testing AWS Backup resources and help me add comprehensive tests for vault lock functionality.
1113+
```
1114+
1115+
**Security Enhancement**:
1116+
```
1117+
@claude Research the latest AWS Backup security best practices and help me implement enhanced encryption configurations in this module.
1118+
```

0 commit comments

Comments
 (0)