Skip to content
Cloud InfrastructureAuto-generatedScore: 40

AWS EC2 Instance Connect MCP Server

Amazon EC2 Instance Connect, provided by Amazon Web Services (AWS), is a managed service designed to simplify and secure SSH and serial console access to Amazon Elastic Compute Cloud (EC2) instances.

Quick Start Summary

The AWS EC2 Instance Connect MCP server is a Model Context Protocol bridge that connects AI assistants — including Claude Desktop, Cursor, Windsurf, and VS Code Copilot — to the AWS EC2 Instance Connect API through natural language. It exposes 2 API endpoints as callable tools, such as SendSSHPublicKey, SendSerialConsoleSSHPublicKey. No authentication is required — setup takes approximately 30 seconds. The server uses STDIO transport and can be installed by running npx -y @mcp/amazonaws-com-ec2-instance-connect. This integration is sourced from the auto AWS EC2 Instance Connect OpenAPI specification (v2018-04-02) and has a quality score of 40/99 (fair documentation coverage).

2Endpointstools mapped
NoneAuthopen access
40/99Qualityfair
~30 secSetupno auth

Server Details

Category
Cloud Infrastructure
Authentication
None
Endpoints
2 operations
Transport
STDIO
Spec Version
v2018-04-02
Install Command
npx -y @mcp/amazonaws-com-ec2-instance-connect

Environment Variables

AWS_EC2_INSTANCE_CONNECT_API_KEY

Example: your_aws_ec2_instance_connect_api_key

Top Endpoints

POST
/#X-Amz-Target=AWSEC2InstanceConnectService.SendSSHPublicKey

SendSSHPublicKey

POST
/#X-Amz-Target=AWSEC2InstanceConnectService.SendSerialConsoleSSHPublicKey

SendSerialConsoleSSHPublicKey

Own this API?

Verify ownership of this listing to control the description, configuration details, and documentation links. Choose between free manual verification or instant premium placement.

Option 1: Free Verification

Slow manual review. Requires creating a GitHub issue with verified documentation or domain verification.

  • • Verified badge on page
  • • Standard search sorting
  • • 2-3 business days review
Start Free Claim →
Instant & Boosted

Option 2: Featured Upgrade($9/mo)

Instant verification plus premium styling, featured badges, and directory placement boost.

  • • ★ Featured star & amber highlight border
  • • Top of directory search placement
  • • Instant activation via claim token

📖 Detailed MCP Integration Guide

A technical breakdown of capabilities, agent workflows, and security/configuration best practices.

Capabilities & Use Cases
Amazon EC2 Instance Connect, provided by Amazon Web Services (AWS), is a managed service designed to simplify and secure SSH and serial console access to Amazon Elastic Compute Cloud (EC2) instances. Its core capability revolves around the secure, one-time use of SSH public keys. Instead of users managing persistent SSH keys and manually distributing them across instances, system administrators can use this API to publish ephemeral, short-lived public keys to the instance metadata. This establishes a secure, just-in-time access model where credentials are valid only for the duration required for a connection session, typically 60 seconds. The primary enterprise use cases include providing secure, auditable access for developers and DevOps engineers to troubleshoot instances, enabling automated systems and CI/CD pipelines to perform secure deployment or management tasks without long-lived credentials, and facilitating compliance with security standards by minimizing the attack surface associated with persistent SSH keys on instances.
🤖AI Agent Value
When this API is exposed as a set of tools to an AI coding assistant through the Model Context Protocol (MCP), it unlocks significant value for automating and securing infrastructure workflows. An AI agent, operating within a developer's IDE or a chat interface, gains the ability to directly orchestrate secure instance access as part of higher-level tasks. For example, instead of the developer manually generating a temporary key pair and calling the AWS CLI, they can instruct the AI to "securely connect to the production web server instance i-1234567890abcdef0 to check the application logs." The AI, via the MCP server, can then execute the workflow: generate a fresh, one-time SSH key pair locally, use the SendSSHPublicKey tool to push the public key to the specified instance, and provide the temporary private key or connection command back to the user or an integrated SSH client. This integration transforms instance access from a manual, error-prone step into a secure, tool-driven operation embedded within natural language instructions.
💬Example Workflows
Practical workflow examples demonstrate the dynamic tasks an AI agent can perform. A developer could instruct: "Help me deploy a configuration change to all instances tagged with 'Environment: staging'." The AI agent could, in sequence, query AWS to list the target instances, then use the EC2 Instance Connect API to establish a secure, temporary connection to each instance one by one, execute the necessary configuration management commands (like applying a new config file via SCP or running a script), and report back on the success or failure for each instance. Another example is automated diagnostics: "The monitoring system is alerting on high CPU on instance i-... . Connect to it and gather a snapshot of running processes and network connections." The AI would initiate a temporary connection, run diagnostic commands like top -bn1 and ss -tuln, and return the structured output for analysis, all without the developer needing to handle or store any sensitive credentials on their local machine.
🛡️Security & Auth
Crucially, while the API itself does not require direct authentication at the endpoint level (as the SendSSHPublicKey action is authenticated via the caller's IAM permissions), a robust security posture is mandatory. The IAM entity (user, role, or assumed role) invoking the API must have explicit permissions for the ec2-instance-connect:SendSSHPublicKey action, scoped to the specific instance IDs or tags using resource constraints, adhering to the principle of least privilege. Developers must ensure the EC2 instances are configured with the required IAM role (EC2InstanceConnect) or have the EC2 Instance Connect agent installed and configured. Best practices include enforcing tag-based policies for access control, logging all API calls via AWS CloudTrail for audit purposes, and integrating this tool-based access with broader identity governance systems. The temporary nature of the keys is a primary security feature, but it must be complemented by proper network controls (like Security Groups) and instance-level hardening to ensure a comprehensive defense-in-depth strategy.

Similar APIs

Other APIs in the Cloud Infrastructure category.

Related MCP Server Integrations

Supabase API MCP Setup

Manage Supabase projects, databases, authentication, and storage through your AI agent.

Cloud InfrastructureConfigure →

Cloudflare API MCP Setup

Manage Cloudflare DNS, CDN, Workers, and security settings through your AI agent.

Cloud InfrastructureConfigure →

Vercel API MCP Setup

Deploy projects, manage domains, and monitor deployments through your AI agent.

Cloud InfrastructureConfigure →

DigitalOcean API MCP Setup

The DigitalOcean API is a comprehensive, RESTful interface provided by DigitalOcean, a leading cloud infrastructure provider focused on simplifying cloud computing for developers, startups, and enterprises. It serves as the programmatic backbone for managing the entire DigitalOcean ecosystem, enabling users to provision, configure, and control cloud resources such as Droplets (virtual private servers), Kubernetes clusters, managed databases, networks, storage volumes, and application platforms. Core capabilities include full lifecycle management of these resources, from creation and scaling to monitoring and deletion, mirroring the functionality available in the DigitalOcean control panel. Its primary use cases range from automating infrastructure setup for CI/CD pipelines and enabling infrastructure-as-code practices to supporting dynamic application scaling and resource optimization for SaaS products, e-commerce sites, and development environments. The API is designed for both developers seeking to automate their cloud operations and businesses that require programmable, scalable cloud infrastructure without the complexity of larger hyperscale providers.

Cloud InfrastructureConfigure →

Access Analyzer MCP Setup

The AWS Identity and Access Management Access Analyzer API provides a powerful, policy-as-code service that automatically identifies resources accessible from outside your AWS account or organization. At its core, the service continuously evaluates resource-based policies—such as Amazon S3 bucket policies, AWS Identity and Access Management (IAM) roles, Amazon KMS key policies, and AWS Lambda function policies—using logic-based reasoning to determine which resources grant access to unknown external principals. Its primary use case is for security and compliance teams within enterprises to proactively detect unintended data exposure, enforce least privilege principles, and audit cross-account and cross-service access. The API endpoints allow programmatic control to create, configure, and query analyzers, manage archive rules for storing findings, and generate custom policy documents, making it a foundational tool for automating cloud security posture management at scale.

Cloud InfrastructureConfigure →