infrawise - npm
npm
Search<br>Sign UpSign In
infrawise<br>0.6.0 • Public • Published 4 days ago<br>Readme<br>Code Beta<br>23 Dependencies<br>0 Dependents<br>11 Versions<br>Infrawise
Understand your infrastructure, not just your code.
Infrawise gives AI coding assistants deterministic infrastructure awareness.
It statically analyzes your codebase, cloud infrastructure, and database schemas, then exposes that context through MCP so tools like Claude Code can understand your actual tables, indexes, query patterns, and service relationships instead of guessing from source files alone.
Why this exists
AI coding assistants can read your source files but have no deterministic knowledge of your infrastructure. They do not know which GSIs exist, how tables are partitioned, which functions already trigger scans, or where indexes are missing. So they guess.
Infrawise replaces guessing with infrastructure-aware context.
Without Infrawise , an AI assistant might:
Suggest a .scan() on your Orders table that has 50M rows
Recommend adding a GSI on status that you already have
Write a SELECT * when you need to keep query cost low
Not notice that 5 functions are already hammering the same partition key
With Infrawise , it knows:
Your exact table schemas, partition keys, sort keys, and GSIs
Which functions query which tables and how
Which patterns are already flagged as high severity
The exact CREATE INDEX SQL or GSI config for your tables — not generic advice
What Infrawise is not
Infrawise is not an AI agent framework, an infrastructure provisioning tool, an observability platform, or a cloud management dashboard.
It is a deterministic infrastructure intelligence layer for AI-assisted development.
Installation
npm install -g infrawise
or use without installing:
npx infrawise init
Quick start
1. Initialize in your repo
cd your-project<br>infrawise init
Detects your AWS profile and region, asks a few questions, writes infrawise.yaml. That's the only file it creates in your project.
2. Validate everything is connected
infrawise doctor
3. Run analysis
infrawise analyze
Or skip this step — infrawise dev auto-runs analysis if no cache exists.
Findings (3 total)
1. [HIGH] Full table scan detected on DynamoDB table "Orders"<br>listAllOrders() scans without any filter — reads every item in the table.<br>Recommendation: Replace Scan with Query using a partition key or add a GSI.
2. [MEDIUM] PostgreSQL table "users" has no index on column "email"<br>Filtering on "email" causes sequential scans.<br>Recommendation: CREATE INDEX CONCURRENTLY idx_users_email ON users(email);
3. [MEDIUM] DynamoDB table "Sessions" accessed by 6 distinct code paths<br>High access concentration may create hot partition issues at scale.
Using with AI coding assistants
Step 1: Start the MCP server
infrawise dev
✔ Config loaded infrawise.yaml<br>✔ Cached analysis loaded 42 nodes · 18 edges · 7 finding(s)<br>✔ Server running
┌────────────────────────────────────────────────────┐<br>│ MCP Server │<br>├────────────────────────────────────────────────────┤<br>│ POST http://localhost:3000/mcp │<br>│ GET http://localhost:3000/health │<br>├────────────────────────────────────────────────────┤<br>│ Tools (13 active) │<br>│ get_infra_overview · get_graph_summary │<br>│ ... │<br>└────────────────────────────────────────────────────┘
Watching for file changes... Press Ctrl+C to stop
Step 2: Add to your editor settings
Claude Code — edit .claude/settings.json in your repo (project-level) or ~/.claude/settings.json (global):
"mcpServers": {<br>"infrawise": {<br>"url": "http://localhost:3000/mcp"
To let Claude Code manage the server lifecycle automatically:
"mcpServers": {<br>"infrawise": {<br>"command": "infrawise",<br>"args": ["dev"]
Cursor and Windsurf — add http://localhost:3000/mcp as an MCP server in editor settings.
MCP tools
Tool<br>What it provides
get_infra_overview<br>Complete snapshot — all services, counts, and high-severity findings
get_graph_summary<br>Full infrastructure graph — all nodes, edges, and findings
analyze_function<br>Issues in a specific function — scans, missing indexes, N+1
suggest_gsi<br>Exact GSI config for a DynamoDB table + attribute
postgres_index_suggestions<br>Exact CREATE INDEX SQL for your actual table
suggest_mongo_index<br>Exact createIndex command for a MongoDB collection + field
mysql_index_suggestions<br>Exact ALTER TABLE ADD INDEX SQL for your MySQL table
get_queue_details<br>SQS queues — DLQ status, encryption, message counts
get_topic_details<br>SNS topics — subscription counts and protocols
get_secrets_overview<br>Secrets Manager — names and rotation status (values never included)
get_parameter_overview<br>SSM Parameter Store — names, types, tiers (values never included)
get_lambda_overview<br>Lambda functions — runtime, memory, timeout, env var key names
get_log_errors<br>CloudWatch error patterns and counts (no raw log messages)
CLI reference
Command<br>What it does
infrawise init<br>Detect AWS + repo, generate infrawise.yaml
infrawise auth<br>Select or switch AWS profile
infrawise...