AWS Network MCP
This server performs offline or live hop-by-hop AWS network path analysis and related hybrid-network diagnostics.
Analyze a 5-tuple path between IPs, ENIs, or instances with
describe_path, returning each hop and the exact SG, NACL, VPC route, TGW route, Network Firewall rule, or VPN/DX BGP prefix that allows or drops traffic.Explain connectivity in human-readable form with
explain_connectivity.Run billed VPC Reachability Analyzer checks with
run_reachability_analysis.Look up TGW longest-prefix routes and list TGW attachments/route-table associations.
Inspect Site-to-Site VPN tunnel/BGP state and Direct Connect VIFs.
Check Route 53 Resolver forwarding for a domain from a VPC.
Query VPC Flow Logs for a 5-tuple filter.
Load and list offline demo scenarios covering landing-zone segmentation and common misconfigurations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AWS Network MCP Why can't 10.2.0.100 reach 10.1.0.50 on port 443?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AWS Network MCP
Offline and live hybrid path analysis for AWS Transit Gateway hubs. Given two endpoints, the server reports each hop and the exact route or rule that allowed or dropped the flow.
This is not a clone of AWS Labs' awslabs.aws-network-mcp-server. That server inventories live Cloud WAN, Transit Gateway, VPC, Network Firewall, and VPN APIs (several TGW route tools require Network Manager registration).
My example evaluates a 5-tuple against Transit Gateway route tables (static, propagated, blackhole), inspection VPC / AWS Network Firewall STRICT_ORDER policy, security groups, NACLs, and on-prem prefixes learned over VPN or Direct Connect BGP.
Companion Terraform hub: aws-hybrid-network-landing-zone.
Quick start
Needs Python 3.11+. On macOS, python3 is often still 3.9 — use python3.12 (or 3.11). No AWS credentials.
python3.12 -m venv .venv
source .venv/bin/activate
make install-dev
make test && make demoRelated MCP server: emfirge
Analysis flow
flowchart TD
A[explain_connectivity / describe_path] --> B[Resolve endpoints]
B --> C[Source SG egress]
C --> D[Source NACL egress]
D --> E[VPC route table LPM]
E -->|next hop TGW| F[Source attachment TGW RT]
F -->|blackhole or missing route| Z[DENY / BLACKHOLE + firewall would-also-drop]
F -->|more-specific route to another spoke| Y[inspection_bypass + dest SG/NACL]
F -->|static via inspection| G[Network Firewall STRICT_ORDER]
G -->|drop / default aws:drop_established| Z
G -->|pass sid| H[Inspection TGW RT LPM]
H -->|VPN/DX attachment| I[On-prem BGP prefix]
H -->|spoke attachment| J[Dest VPC RT + NACL + return NACL + dest SG]
I --> K[Verdict + hop list]
J --> K
Y --> K
Z --> KInstall
The package is not on PyPI. Clone, then use the Quick start (venv + make install-dev) so make test and make demo work.
git clone https://github.com/harin-singh/aws-network-mcp.git
cd aws-network-mcpOr run the console script from git with uv:
uvx --from git+https://github.com/harin-singh/aws-network-mcp aws-network-mcpDemo mode (no AWS credentials):
make demo
# or
python3 -m aws_network_mcp.demoConnect from an MCP client
Set AWS_NETWORK_MCP_DEMO=true for the landing-zone fixtures. Omit it and provide an AWS profile: the server describes the region and builds a topology for hop-by-hop analysis.
Cursor (~/.cursor/mcp.json or project MCP config):
{
"mcpServers": {
"aws-network": {
"command": "python3",
"args": ["-m", "aws_network_mcp.server"],
"env": {
"AWS_NETWORK_MCP_DEMO": "true"
}
}
}
}From a local clone with live credentials:
{
"mcpServers": {
"aws-network": {
"command": "python3",
"args": ["-m", "aws_network_mcp.server"],
"env": {
"AWS_PROFILE": "your-profile",
"AWS_REGION": "us-east-1"
}
}
}
}Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS) uses the same mcpServers object. Example files: examples/config-cursor.json, examples/config-claude-desktop.json.
Sample session (from python3 -m aws_network_mcp.demo)
missing_tgw_propagation: prod 10.10.0.10 to on-prem 10.200.1.50:443. Traffic reaches inspection; the inspection TGW route table has no VPN-propagated prefix.
Test: 10.10.0.10 → 10.200.1.50:443/tcp
Verdict: DENY
1. [✓] security_group: sg-prod-app-001
Allowed by SG sg-prod-app-001 egress rule: destination=0.0.0.0/0, port=all, protocol=-1
2. [✓] nacl: acl-prod-001
Allowed by NACL acl-prod-001 rule #100 (egress): 0.0.0.0/0 port all
3. [✓] route_table: rtb-prod-001
Matched route 0.0.0.0/0 -> transit-gateway:tgw-demo-001
4. [✓] transit_gateway: tgw-rtb-prod-001
Matched TGW route 10.200.0.0/16 -> vpc:tgw-attach-inspection-004 (static)
5. [✓] network_firewall: nfw-policy-inspection-001
Allowed by Network Firewall ... rule sid:2000005 (Allow prod to onprem)
6. [✗] transit_gateway: tgw-rtb-inspection-004
Inspection return/forward lookup: No TGW route found for 10.200.1.50
BLOCKING: missing route propagation or static route on inspection RTprod_nonprod_blocked: prod 10.10.0.10 to nonprod 10.20.0.10:443. The packet is dropped by a static TGW blackhole; the analyzer also reports the matching Network Firewall drop.
Verdict: BLACKHOLE
4. [⚫] transit_gateway: tgw-rtb-prod-001
TGW route to 10.20.0.0/24 is blackholed
route/rule: 10.20.0.0/24 -> none (static, blackhole)
BLOCKING: static blackhole route 10.20.0.0/24
Additional findings:
- Defense in depth: Network Firewall ... would also drop this flow via sid:1000001Tools
Tool | Description |
| Hop-by-hop path analysis with the matching route or rule at each hop |
| Same analysis as readable text from two IP addresses |
| AWS Reachability Analyzer (~$0.10 per analysis) |
| Longest-prefix match in a TGW route table |
| TGW attachments and associated route tables |
| VPN tunnel / BGP and Direct Connect VIF status |
| Route 53 Resolver forwarding for a domain |
| CloudWatch Logs Insights over VPC Flow Logs |
| Offline landing-zone and misconfig fixtures |
Demo scenarios
Fixtures follow aws-hybrid-network-landing-zone CIDRs: inspection 10.0.0.0/24, shared 10.1.0.0/24, prod 10.10.0.0/24, nonprod 10.20.0.0/24, on-prem BGP 10.200.0.0/16.
Scenario | Expected result |
| DENY — VPN prefix not on the inspection RT |
| BLACKHOLE — inspection RT blackholes |
| BLACKHOLE on prod RT + firewall sid:1000001 |
| BLACKHOLE on nonprod RT + firewall sid:1000003 |
| ALLOW via inspection, firewall sid:2000005, BGP VPN route |
| ALLOW, but a propagated spoke prefix skips the firewall |
| DENY — dest SG references the wrong source SG |
| DENY — dest SG allows 80, flow is 443 |
| DENY — stateless NACL missing ephemeral return |
# After connecting an MCP client in demo mode
load_demo_scenario(scenario_name="prod_nonprod_blocked")
explain_connectivity(source_ip="10.10.0.10", dest_ip="10.20.0.10", port=443)IAM
Read-only. iam/policy.json is the minimal policy for live hop-by-hop analysis:
EC2 describe of VPCs, subnets, route tables, security groups, NACLs, ENIs, Transit Gateway attachments/route tables (
SearchTransitGatewayRoutes, associations, propagations), VPN, and managed prefix listsDirect Connect virtual-interface describe
Network Firewall
ListFirewalls,DescribeFirewall,DescribeFirewallPolicy,DescribeRuleGroupRoute 53 Resolver and CloudWatch Logs Insights (inventory tools, not required for path analysis)
Optional iam/policy-reachability-analyzer.json adds Reachability Analyzer (creates/deletes paths; billed per analysis).
Lab environment
Deploy the companion hub rather than the old two-VPC lab in this repo:
git clone https://github.com/harin-singh/aws-hybrid-network-landing-zone.git
cd aws-hybrid-network-landing-zone/examples/completeSee that repository for cost, terraform apply, and scripts/test-connectivity.sh.
Development
After the Quick start venv is active:
make lint
make typecheck
make test
make demo
make ciDependencies are pinned in pyproject.toml. CI runs ruff, mypy, pytest (including an stdio list_tools / call_tool smoke test), pip-audit, gitleaks, terraform fmt, Checkov, and pre-commit run --all-files. Checkov skips for account-wide describe APIs are listed in .checkov.yaml.
Local development
Hook versions match CI (ruff==0.17.3, mypy==1.19.1, gitleaks v8.18.4).
python3 -m pip install -e ".[dev]"
pre-commit install
pre-commit run --all-files
# or
make pre-commitKnown limitations
Live hop-by-hop analysis loads a regional topology at process start via
LiveTopologyLoader(EC2 describe APIs + Network Firewall policy import). The process usesAWS_REGION/ the boto3 session region only; other regions are not scanned.Network Firewall import evaluates
STRICT_ORDERstateful 5-tuple / Suricata headers:pass/drop/reject,ip/tcp/udp/icmp, CIDR/any/$HOME_NET/!$HOME_NET, optional dest ports,sid,msg. Unsupported and skipped:alert; application inspectors (http/tls/dns);content/pcre/flow/byte_*/threshold/xbits/dataset/geoip; domain-list rule groups (TLS_SNI/HTTP_HOST); stateless rule groups (onlyStatefulDefaultActionsapply after stateful rules). Import notes are logged and returned astopology_warningsondescribe_path.On-prem CIDRs come from TGW routes toward VPN or Direct Connect attachments and from VPN static routes. Customer-gateway ACLs and on-prem firewalls are not evaluated.
Direct Connect is modeled as a TGW attachment type. There is no DX Gateway / transit VIF topology builder.
IPv6, PrivateLink, VPC Lattice, and cross-account RAM-shared attachments are out of scope.
VPC Reachability Analyzer is optional and billed by AWS (~$0.10 per path).
This server does not replace AWS Labs' inventory, flow-log, or Cloud WAN tools.
License
MIT License — see LICENSE.
Author
Harinder Singh
Available Tools
10 toolscheck_dns_resolutionC
Check Route 53 Resolver forwarding for a domain from a VPC.
Inputs: domain (required), vpc_id (required). Returns: object
describe_pathB
Analyze the hop-by-hop path between two endpoints.
Walks security groups, NACLs, VPC route tables, Transit Gateway route tables (static, propagated, blackhole), inspection VPC / Network Firewall, and on-prem VPN/DX routes. Returns the exact rule or route that allowed or dropped the flow at each hop.
Inputs: port, dest_ip, protocol, source_ip, +4 more. Returns: object
explain_connectivityC
Explain why source_ip can or cannot reach dest_ip.
Simplified IP-based interface that returns a human-readable hop list.
Inputs: dest_ip (required), source_ip (required), port, protocol. Returns: object
inspect_vpn_bgpC
Inspect Site-to-Site VPN tunnel / BGP state and Direct Connect VIFs.
Inputs: vpn_id. Returns: object
list_demo_scenariosA
List offline demo scenarios (landing-zone segmentation and classic misconfigs).
Inputs: no named parameters. Returns: object
list_tgw_attachmentsB
List Transit Gateway attachments and their associated route tables.
Inputs: tgw_id. Returns: object
load_demo_scenarioC
Load a fixture topology with a known misconfiguration or allowed path.
Inputs: scenario_name (required). Returns: object
query_flow_logsC
Query VPC Flow Logs for a 5-tuple filter.
Inputs: log_group (required), action, dst_addr, dst_port, +1 more. Returns: object
run_reachability_analysisC
Run VPC Reachability Analyzer. Charges apply (~$0.10 per path).
Inputs: source (required), destination (required), protocol, destination_port. Returns: object
tgw_route_lookupC
Longest-prefix match in a Transit Gateway route table.
Inputs: destination_cidr (required), tgw_route_table_id (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Three tools (describe_path, explain_connectivity, run_reachability_analysis) all answer essentially the same question — can source reach destination and why — differing mainly in output format and backend. The descriptions do help differentiate them (rule-level hops vs. simplified IP summary vs. paid AWS API), but an agent could easily pick the wrong one. The remaining tools (TGW, VPN/BGP, DNS, flow logs, demos) target clearly distinct resources.
Every tool follows a consistent snake_case verb_noun pattern (describe_path, list_tgw_attachments, check_dns_resolution, query_flow_logs, load_demo_scenario). Prefixes like tgw_/vpn_/dns_ are used predictably to scope resources, with no camelCase or stylistic drift.
Ten tools is well within the ideal range for a network diagnostics server. Each tool maps to a distinct diagnostic surface (path analysis, TGW routing, VPN/BGP, DNS, flow logs, demos) with no filler tools.
The surface covers the core troubleshooting chain — path analysis, TGW routes/attachments, VPN/BGP, DNS resolution, and flow logs — plus demo fixtures. Minor gaps exist: no standalone VPC route table or security group/NACL rule enumeration tool (only surfaced indirectly via describe_path), and no explicit interface/subnet inventory listing.
Maintenance
Related MCP Connectors
IP intelligence, network diagnostics, and AI service availability tools for AI agents.
AI SRE for AWS teams: your agent reads security, cost and reliability findings, read-only by default
AI helper for choosing and speccing network & security products from Cisco, Arista, Juniper and more
Diagnose AI workflows for failure, security, and handoff risks — RED/AMBER/GREEN per node.
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-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to safely troubleshoot networks through read-only tools for device inventory, interface status, VLAN paths, BGP neighbors, route lookups, and interface error detection. Integrates with Microsoft Copilot Studio and Teams for natural-language-driven network diagnostics.-
- AlicenseAqualityCmaintenanceEnables AI agents to run eleven read-only network checks — interfaces, Wi-Fi signal, IP configuration, ping, traceroute, routing and ARP tables, DNS, port and HTTP probes — and to diagnose faults bottom-up across the network layers, returning the first broken layer with a plain-English explanation and fix.11MIT