NetGraph
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
NetGraph
MCP server for AWS VPC network path analysis and security auditing
NetGraph enables AI assistants to analyze AWS VPC network connectivity by modeling infrastructure as a graph. Ask questions like "Can my web server reach the database on port 5432?" and get deterministic answers with full path analysis.
Why NetGraph?
Without NetGraph, debugging AWS network connectivity requires:
Manually tracing Security Groups, NACLs, and route tables
Checking stateful vs stateless rule semantics
Verifying return path routing for NACLs
Cross-referencing multiple AWS console pages
With NetGraph, your AI assistant can:
Analyze complete network paths in seconds
Identify exactly where traffic is blocked
Find resources exposed to the public internet
Discover resources by name or tags when you don't have IDs
Related MCP server: emfirge
Quick Start
Installation
pip install aws-vpc-analyzerOr install from source:
git clone https://github.com/ayushgoel24/mcp-netgraph.git
cd mcp-netgraph
pip install -e .For detailed setup instructions, see the Installation Guide.
Configure Your MCP Client
Add NetGraph to your MCP client configuration. Replace your-profile with your AWS CLI profile name.
Config file location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"netgraph": {
"command": "aws-vpc-analyzer",
"env": {
"AWS_PROFILE": "your-profile",
"AWS_REGION": "us-east-1"
}
}
}
}Alternative using uvx (no pip install required):
{
"mcpServers": {
"netgraph": {
"command": "uvx",
"args": ["aws-vpc-analyzer"],
"env": {
"AWS_PROFILE": "your-profile",
"AWS_REGION": "us-east-1"
}
}
}
}Restart Claude Desktop after saving.
Config file location:
Global:
~/.claude.jsonProject-specific:
.mcp.jsonin your project root
Add this configuration:
{
"mcpServers": {
"netgraph": {
"command": "aws-vpc-analyzer",
"env": {
"AWS_PROFILE": "your-profile",
"AWS_REGION": "us-east-1"
}
}
}
}Restart Claude Code or start a new session.
Open Settings → MCP and add:
{
"mcpServers": {
"netgraph": {
"command": "aws-vpc-analyzer",
"env": {
"AWS_PROFILE": "your-profile",
"AWS_REGION": "us-east-1"
}
}
}
}Restart Cursor after saving.
For detailed setup instructions including troubleshooting, see the Installation Guide.
AWS Credentials
NetGraph uses your standard AWS credentials. Ensure you have:
AWS CLI configured with a profile, or
Environment variables set (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY), orIAM role attached (for EC2/Lambda environments)
Required IAM permissions: See AWS Permissions | Full IAM Policy
Tools
analyze_path
Analyze network reachability between a source and destination with hop-by-hop evaluation of Security Groups, NACLs, and route tables.
Can instance i-0abc123 reach 10.0.2.50 on port 443?Parameters:
Parameter | Type | Required | Description |
| string | Yes | EC2 instance ID ( |
| string | Yes | IPv4 or IPv6 destination address |
| integer | Yes | Destination port (1-65535) |
| string | No |
|
| boolean | No | Bypass cache and fetch fresh data (default: |
Returns: Path status (REACHABLE, BLOCKED, or UNKNOWN), hop-by-hop details, and blocking reason if blocked.
find_public_exposure
Scan a VPC to find resources exposed to the public internet on a specific port.
Show me all resources in vpc-12345678 exposed to SSH on port 22Parameters:
Parameter | Type | Required | Description |
| string | Yes | VPC ID to scan ( |
| integer | Yes | Port to check for exposure (1-65535) |
| string | No |
|
| boolean | No | Bypass cache (default: |
Returns: List of exposed resources with exposure paths, allowing Security Group rules, and remediation guidance.
find_resources
Discover AWS resources by name pattern or tags. Useful when you know a resource by name but need its ID.
Find all production web servers in vpc-12345678Parameters:
Parameter | Type | Required | Description |
| string | Yes | VPC ID to search ( |
| object | No | Tag key-value filters (e.g., |
| array | No | Filter by type: |
| string | No | Glob pattern for Name tag (e.g., |
| integer | No | Maximum results to return (default: 50, max: 50) |
Returns: Matching resources with IDs, names, IPs, subnets, and tags.
list_vpcs
List and search VPCs in your account. Use this when you need a VPC ID but only know the name or tags.
What VPCs do I have? I'm looking for the production one.Parameters:
Parameter | Type | Required | Description |
| string | No | Glob pattern for VPC Name tag (e.g., |
| object | No | Tag key-value filters (e.g., |
| string | No | Filter by CIDR block (e.g., |
Returns: List of VPCs with IDs, names, CIDRs, state, and tags.
refresh_topology
Pre-warm the cache by fetching all resources in specified VPCs. Optional optimization for faster subsequent queries.
Pre-load the topology for vpc-12345678Parameters:
Parameter | Type | Required | Description |
| array | Yes | List of VPC IDs to pre-warm ( |
Returns: Node/edge counts, resources by type, and duration.
get_cache_stats
Get cache performance statistics.
Returns: Cache hits, misses, hit rate, TTL, and entry counts.
Configuration
Configure NetGraph via environment variables:
Variable | Default | Description |
|
| AWS region to query |
| (none) | AWS CLI profile to use |
|
| Cache TTL in seconds |
| (none) | IAM role ARN for cross-account access |
|
| Log level: |
Example Prompts
Connectivity debugging:
Can my web server i-0abc123 reach the database at 10.0.3.50 on port 5432?
Security audit:
Find all resources in vpc-prod12345 exposed to the internet on SSH port 22
Resource discovery:
Find all instances tagged Environment=production in vpc-12345678
VPC lookup:
List my VPCs - I need to find the one named "production"
Pre-deployment validation:
Verify that i-gateway123 can reach 10.0.2.100 on port 8080
See docs/examples.md for more detailed examples.
How It Works
NetGraph models your VPC as a directed graph:
Nodes: EC2 instances, ENIs, subnets, Internet Gateways, NAT Gateways, VPC Peering connections
Edges: Routing relationships with CIDR destinations and prefix lengths
When you ask about connectivity, NetGraph:
Resolves the source to its ENI and subnet
Evaluates Security Group egress rules (stateful - only checks outbound)
Evaluates NACL outbound rules (stateless - must also check return path)
Traverses the route table using Longest Prefix Match (LPM)
Follows the path through gateways until reaching the destination
Evaluates destination NACL inbound and Security Group ingress rules
Verifies return path routing to prevent asymmetric routing failures
AWS Permissions
NetGraph requires read-only EC2 permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribeSubnets",
"ec2:DescribeSecurityGroups",
"ec2:DescribeNetworkAcls",
"ec2:DescribeRouteTables",
"ec2:DescribeInternetGateways",
"ec2:DescribeNatGateways",
"ec2:DescribeVpcs",
"ec2:DescribeVpcPeeringConnections",
"ec2:DescribeTransitGateways",
"ec2:DescribeTransitGatewayAttachments",
"ec2:GetManagedPrefixListEntries"
],
"Resource": "*"
}
]
}For cross-account analysis, also add:
sts:AssumeRolepermissionTrust relationship on target account roles
Set
NETGRAPH_ROLE_ARNenvironment variable
Documentation
Installation Guide - Detailed setup instructions
IAM Policy - Copy-paste IAM policies
Examples - Detailed usage examples
Changelog - Release notes and version history
License
MIT
Contributing
Contributions welcome! Please read our Contributing Guide for details on our development process and how to submit pull requests.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
IaC attack-path auditor: finds internet-to-crown-jewel chains in Terraform/CFN/K8s.
Unified API to query AWS, GCP, Azure and generate Terraform/CLI execution kits for AI agents.
AWS cloud security scanners for AI agents — S3, IAM, EC2, EKS, RDS, CloudTrail, CloudWatch Logs
AI SRE for AWS teams: your agent reads security, cost and reliability findings, read-only by default
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables automated review and analysis of network security controls (AWS Security Groups, Network ACLs) using natural language queries. Supports NSC configuration reviews, network segmentation testing, and identifying security gaps through conversational LLM interaction.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI to scan AWS accounts, analyze attack paths, and verify security fixes on a read-only graph of cloud resources.5-
- AlicenseAqualityBmaintenanceEnables AI agents to scan AWS accounts, build resource relationship graphs, detect unused resources, and export data via MCP tools.7AGPL 3.0
- AlicenseBqualityCmaintenanceEnables AI assistants to discover devices and perform connectivity diagnostics across a private Tailscale or WireGuard mesh through authenticated CLI or REST API backends. Supports safe dry-run simulations before affecting live node state.2Apache 2.0