{"slug": "the-right-way-to-start-claude-code-on-an-aws-project", "title": "The Right Way to Start Claude Code on an AWS Project", "summary": "Infrawise, an open-source tool, simplifies adding MCP servers to AWS projects by collapsing the setup process into a single command. It statically analyzes codebases, AWS infrastructure, and database schemas, then exposes context to AI coding assistants via MCP, eliminating manual configuration and debugging. The tool caches analysis for 24 hours and watches for file changes to keep context fresh.", "body_md": "You know the drill for adding an MCP server to a project: dig the exact command string out of the docs, hand-write a `.mcp.json`\n\nwith an absolute path you'll typo once, restart the editor, and discover no tools showed up because the server expected a config file you haven't created yet. Plenty of MCP servers lose their would-be users somewhere inside that loop.\n\n[Infrawise](https://github.com/Sidd27/infrawise) collapses the whole loop into one command. It's an open-source tool ([npm](https://www.npmjs.com/package/infrawise)) that statically analyzes your codebase, AWS infrastructure, and database schemas, then exposes that context to AI coding assistants over MCP — so Claude Code knows your actual partition keys, GSIs, and indexes instead of guessing from source files. This post is about the part that usually kills tools like this before they deliver any value: setup.\n\n```\nnpm install -g infrawise   # or skip install and use npx\ncd your-project\ninfrawise start --claude\n```\n\n`start`\n\ndoes four things, in order:\n\n**1. Probes your environment.** If there's no `infrawise.yaml`\n\nin the project, it generates one. It reads `AWS_PROFILE`\n\nif set; otherwise it looks at your configured AWS profiles — one profile means zero questions, several means one prompt asking which to use. That's the entire interview. (If you want the full guided wizard instead, `infrawise start --interactive`\n\nruns it.)\n\n**2. Runs the analysis.** It scans your AWS services, database schemas, and codebase, builds a graph of services, tables, indexes, and query patterns, and runs rule-based analyzers over it. No LLM is involved in this step — extraction and analysis are deterministic, so the same infrastructure always produces the same graph.\n\n**3. Writes .mcp.json to your project root.** This is the file you'd otherwise write by hand:\n\n```\n{\n  \"mcpServers\": {\n    \"infrawise\": {\n      \"command\": \"infrawise\",\n      \"args\": [\n        \"serve\",\n        \"--stdio\",\n        \"--config\",\n        \"/absolute/path/to/infrawise.yaml\"\n      ]\n    }\n  }\n}\n```\n\n**4. Opens Claude Code.** Claude Code reads `.mcp.json`\n\nautomatically and starts the session with all 21 infrawise tools available — schema lookups, per-function analysis, GSI suggestions, queue and topic details, the lot.\n\nIf the `claude`\n\nCLI isn't installed, `start`\n\ntells you exactly that and where to get it, instead of failing silently.\n\n`infrawise`\n\nagain\nThis is the part that matters more than the first run. `.mcp.json`\n\ndoesn't point at a long-running server you have to remember to start. It tells the editor how to spawn one: every time you launch Claude Code in that project, the editor itself runs `infrawise serve --stdio`\n\nas a child process. There is no port to keep free, no background daemon to babysit, no \"is the server running?\" debugging session.\n\nSo the second-day workflow is:\n\n```\nclaude\n```\n\nThat's it. No infrawise command anywhere.\n\nTwo mechanisms keep the context from going stale underneath you:\n\n**A 24-hour analysis cache.** The analysis from `start`\n\nis cached. When the editor spawns the server and the cache is fresh, the session begins instantly with the existing graph. Once the cache is older than 24 hours, the next session start refreshes it. The freshness is also visible to the assistant itself: `get_infra_overview`\n\nreturns an `analyzedAt`\n\ntimestamp, an `ageSeconds`\n\nvalue, and a `stale`\n\nflag, so Claude can tell you — or decide on its own — when the picture it has is old. (This came out of a reader question on an earlier post about deterministic analysis; it shipped as a proper feature.)\n\n**A file watcher inside the session.** While the server is running, it watches the repository for file changes and re-runs code analysis on save. Write a new function that calls `DynamoDB.scan()`\n\nmid-session, and the code graph reflects it — you don't need to restart anything for the assistant to see what you just wrote.\n\nInfrastructure changes are the one thing that won't propagate automatically mid-session — if you just added a table or changed a GSI in AWS, run `infrawise analyze`\n\nto force a full re-scan rather than waiting out the cache. And if the config itself has drifted from reality (new AWS account, different profile), `infrawise start --rediscover`\n\ndeletes `infrawise.yaml`\n\nand the `.infrawise/`\n\ncache directory and rebuilds both from scratch.\n\nThe `--claude`\n\nflag is one of three editor targets, and none of them changes what gets analyzed — only where the MCP config lands:\n\n`infrawise start --cursor`\n\nwrites `.cursor/mcp.json`\n\nand opens Cursor.`infrawise start --vscode`\n\nwrites into `.vscode/mcp.json`\n\nand opens VS Code. This one `infrawise start`\n\nwith no flag writes `.mcp.json`\n\n, prints the launch command for each editor, and exits — for any other MCP-capable editor, point it at `infrawise serve --stdio --config /path/to/infrawise.yaml`\n\n.And for the teammates who don't use an AI editor at all, the same analysis runs as a CI gate:\n\n```\ninfrawise check --fail-on high\n```\n\n`check`\n\nruns a fresh analysis and exits non-zero when any finding reaches the threshold severity (`high`\n\nis the default; `medium`\n\nand `low`\n\ntighten it). A full-table scan on a production DynamoDB table fails the build whether or not anyone on the team has ever opened Claude Code.\n\nThe payoff for the setup being this short is that the context is there before you need it. Without it, an AI assistant reading only your source files will happily suggest a `.scan()`\n\non a table with 50 million rows, or recommend adding a GSI you already have. With the MCP tools connected, it can call `get_table_schema`\n\nfor the exact columns and keys, `analyze_function`\n\nfor a Lambda's real trigger event shape, or `suggest_gsi`\n\nfor a ready-to-use index definition matched to your table's billing mode — before writing the query, not after you've reviewed it.\n\nI've written about those analysis capabilities in earlier posts; the point of this one is narrower. A context tool only works if it's actually connected, and \"actually connected\" has to cost less than the problem it solves. Pasting a schema into a prompt costs thirty seconds, every session, forever. `infrawise start --claude`\n\ncosts one command, once.\n\nThe gap between \"this MCP server exists\" and \"this MCP server is running in my editor\" is where most infrastructure context tools die. Infrawise's answer is to make the editor own the server lifecycle: one `start`\n\ncommand probes, analyzes, writes the editor config, and launches; from then on the editor spawns `infrawise serve --stdio`\n\nitself, a 24-hour cache keeps session starts instant, and a file watcher keeps the code graph current while you work.\n\nTry it on a real project — the first `start`\n\non an actual AWS account is where it gets interesting: [GitHub](https://github.com/Sidd27/infrawise) · [npm](https://www.npmjs.com/package/infrawise)\n\n`infrawise start --claude`\n\nis the entire setup: probe environment, generate `infrawise.yaml`\n\n, analyze, write `.mcp.json`\n\n, open Claude Code with 21 MCP tools.`infrawise serve --stdio`\n\nfrom `.mcp.json`\n\non its own. No daemon, no port, no second command.`get_infra_overview`\n\n.`infrawise analyze`\n\n, and `--rediscover`\n\nrebuilds config from scratch.`--cursor`\n\nand `--vscode`\n\ntarget other editors (the VS Code writer merges with existing MCP servers), and `infrawise check --fail-on high`\n\ngates CI with the same analysis.", "url": "https://wpnews.pro/news/the-right-way-to-start-claude-code-on-an-aws-project", "canonical_source": "https://dev.to/siddharth_pandey_27/the-right-way-to-start-claude-code-on-an-aws-project-ipf", "published_at": "2026-07-14 09:40:36+00:00", "updated_at": "2026-07-14 10:00:38.763639+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-infrastructure", "artificial-intelligence"], "entities": ["Infrawise", "Claude Code", "AWS", "MCP"], "alternates": {"html": "https://wpnews.pro/news/the-right-way-to-start-claude-code-on-an-aws-project", "markdown": "https://wpnews.pro/news/the-right-way-to-start-claude-code-on-an-aws-project.md", "text": "https://wpnews.pro/news/the-right-way-to-start-claude-code-on-an-aws-project.txt", "jsonld": "https://wpnews.pro/news/the-right-way-to-start-claude-code-on-an-aws-project.jsonld"}}