AWS MCP Cloud
Query EC2, S3, CloudWatch Logs and ECS in your AWS account through a cross-account IAM role.
Quick start
- Prepare access in AWS by following the setup guide.
- Add a AWS connection with the settings below, then click Test configuration.
- Create an API key for your agent.
- Paste the key below, click Test endpoint, and copy the configuration for your platform.
| Endpoint | https://market.oshaani.com/aws (your default connection) or https://market.oshaani.com/aws/<connection-id> |
|---|---|
| Transport | Streamable HTTP (stateless, JSON responses). MCP protocol versions 2024-11-05 to 2025-11-25 and 2026-07-28. |
| Authentication | Authorization: Bearer <API key>, using a key from the API keys page. |
Setup guide: connect your AWS account
The AWS MCP never stores access keys. Instead, you create an IAM role in your AWS account that the oshaani marketplace is allowed to assume. An external ID that only you and your connection know protects the role, and its permissions decide exactly what agents can see. Setup takes about five minutes.
| Account to trust | 746780968188 |
|---|---|
| Principal to trust | arn:aws:iam::746780968188:role/OshaaniBase |
| Suggested role name | OshaaniMarketplaceAccess |
1. Choose an external ID
Generate a long random value, for example with openssl rand -hex 24, and keep it private. You will enter it
in the role's trust policy and in your marketplace connection. Without the matching external ID, nobody can use the role through
the marketplace, even if they know its ARN.
2. Create the role in your AWS account
In the AWS console
- Open IAM → Roles and click Create role.
- For trusted entity type, choose AWS account → Another AWS account and enter account ID
746780968188. Tick Require external ID and paste your external ID. - Skip the permissions step for now, name the role
OshaaniMarketplaceAccessand create it. - Open the role, go to Trust relationships → Edit trust policy, and replace it with the trust policy below. This lets only the oshaani marketplace role assume it, not every identity in the oshaani account.
- Go to Permissions → Add permissions → Create inline policy → JSON, paste the
permissions policy below and save it as
OshaaniMcpReadOnly. - Copy the role ARN from the role's summary, for example
arn:aws:iam::123456789012:role/OshaaniMarketplaceAccess.
Trust policy. Replace YOUR_EXTERNAL_ID with your external ID.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::746780968188:role/OshaaniBase"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "YOUR_EXTERNAL_ID"
}
}
}
]
}
Permissions policy. It allows exactly the read-only calls the AWS tools make: listing EC2 instances, S3 buckets and objects, CloudWatch log groups and ECS clusters and services, and running CloudWatch Logs Insights queries.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"s3:ListAllMyBuckets",
"s3:ListBucket",
"logs:DescribeLogGroups",
"logs:StartQuery",
"logs:GetQueryResults",
"logs:StopQuery",
"ecs:ListClusters",
"ecs:DescribeClusters",
"ecs:ListServices",
"ecs:DescribeServices"
],
"Resource": "*"
}
]
}
To narrow access, replace "Resource": "*" for s3:ListBucket and the logs:*
actions with specific bucket and log group ARNs. The AWS managed ReadOnlyAccess policy also works, but grants far more than
the tools use.
Or with the AWS CLI. Save the two policies above as trust.json and permissions.json, then run:
aws iam create-role --role-name OshaaniMarketplaceAccess \
--assume-role-policy-document file://trust.json
aws iam put-role-policy --role-name OshaaniMarketplaceAccess \
--policy-name OshaaniMcpReadOnly --policy-document file://permissions.json
aws iam get-role --role-name OshaaniMarketplaceAccess --query Role.Arn --output text
3. Add the connection on market.oshaani.com
| IAM role ARN | The ARN from step 2, in the form arn:aws:iam::<your account ID>:role/OshaaniMarketplaceAccess. |
|---|---|
| External ID | The same value as in the trust policy. |
| Default region | The region you use most, e.g. ap-south-1. Every tool also accepts a region override. |
| Session duration | Leave at 900 seconds. Values above 3600 also require raising the role's Maximum session duration. |
Click Test configuration. A working setup reports which role and account it reached.
Troubleshooting
- "not authorized to perform: sts:AssumeRole": the external ID in the connection doesn't exactly match the trust policy, or the trust policy names a different principal. Check both against this guide.
- "String should match pattern" on the role ARN: use the IAM role ARN
(
arn:aws:iam::…:role/…), not a user ARN. The session ARN printed byaws sts get-caller-identity(arn:aws:sts::…:assumed-role/…) is accepted too, except for roles created under a path. - A tool returns "AccessDenied": that action is missing from the role's permissions policy.
- Don't reuse a role your own servers run as: give the marketplace its own role with only these permissions.
Agent configuration
initialize and tools/list against the endpoint, exactly like an agent. No credits are charged.
Any MCP client that supports remote (Streamable HTTP) servers with custom headers.
{
"name": "aws",
"transport": "streamable-http",
"url": "https://market.oshaani.com/aws",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a project.
{
"mcpServers": {
"aws": {
"url": "https://market.oshaani.com/aws",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Settings > Developer > Edit Config (claude_desktop_config.json). Uses the mcp-remote bridge; needs Node.js.
{
"mcpServers": {
"aws": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://market.oshaani.com/aws",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer YOUR_API_KEY"
}
}
}
}
Run in your terminal, or put the JSON in .mcp.json at the project root.
claude mcp add --transport http aws https://market.oshaani.com/aws \
--header "Authorization: Bearer YOUR_API_KEY"
# .mcp.json
{
"mcpServers": {
"aws": {
"type": "http",
"url": "https://market.oshaani.com/aws",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
.vscode/mcp.json (GitHub Copilot agent mode). VS Code prompts for the key once and stores it securely.
{
"inputs": [
{
"type": "promptString",
"id": "oshaani-mcp-key",
"description": "oshaani MCP Marketplace API key",
"password": true
}
],
"servers": {
"aws": {
"type": "http",
"url": "https://market.oshaani.com/aws",
"headers": {
"Authorization": "Bearer ${input:oshaani-mcp-key}"
}
}
}
}
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"aws": {
"serverUrl": "https://market.oshaani.com/aws",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Responses API remote MCP tool (Python SDK).
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="gpt-4.1",
tools=[{
"type": "mcp",
"server_label": "aws",
"server_url": "https://market.oshaani.com/aws",
"headers": {"Authorization": "Bearer YOUR_API_KEY"},
"require_approval": "never", # or "always" to approve each tool call
}],
input="What can you do with these tools?",
)
print(response.output_text)
Messages API MCP connector (Python SDK).
import anthropic
client = anthropic.Anthropic()
response = client.beta.messages.create(
model="claude-sonnet-4-5",
max_tokens=1024,
messages=[{"role": "user", "content": "What can you do with these tools?"}],
mcp_servers=[{
"type": "url",
"url": "https://market.oshaani.com/aws",
"name": "aws",
"authorization_token": "YOUR_API_KEY",
}],
betas=["mcp-client-2025-04-04"],
)
print(response.content)
Official MCP Python SDK 2.x (pip install mcp); works inside any agent framework.
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import create_mcp_http_client, streamable_http_client
async def main():
headers = {"Authorization": "Bearer YOUR_API_KEY"}
async with create_mcp_http_client(headers=headers) as http:
async with streamable_http_client("https://market.oshaani.com/aws", http_client=http) as (read, write, *_):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
print([tool.name for tool in tools.tools])
asyncio.run(main())
Quick check from a terminal: lists the tools without charging credits.
curl -s https://market.oshaani.com/aws \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-06-18" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Connection settings
Entered once per connection on market.oshaani.com. Secrets are encrypted and never shown again or sent to agents.
| Setting | Type | Description |
|---|---|---|
IAM role ARNrole_arn
required |
string | Role in your account that trusts the oshaani marketplace, e.g. arn:aws:iam::123456789012:role/OshaaniMarketplaceAccess. See the setup guide on the AWS docs page. pattern ^arn:aws[a-zA-Z-]*:iam::\d{12}:role/[\w+=,.@/-]+$ |
External IDexternal_id
required |
string | Must match the role's trust policy min length 2, max length 1224 |
Default regionregion
|
string default "us-east-1" |
pattern ^[a-z]{2}(-gov)?-[a-z]+-\d$ |
Session duration (seconds)session_duration
|
integer default 900 |
min 900, max 43200 |
Tools (7)
ec2_describe_instances
read-only
List EC2 instances with state, type, IPs and Name tag
| Argument | Type | Description |
|---|---|---|
state |
string | Filter by state: pending, running, stopping, stopped, terminated |
instance_ids |
array of string | Specific instance IDs |
max_results |
integer default 100 |
min 1, max 500 |
region |
string | AWS region override, e.g. eu-west-1 (defaults to the connection's region) |
s3_list_buckets
read-only
List S3 buckets in the account
No arguments.
s3_list_objects
read-only
List objects in an S3 bucket under an optional prefix
| Argument | Type | Description |
|---|---|---|
bucket required |
string | |
prefix |
string default "" |
|
max_keys |
integer default 100 |
min 1, max 1000 |
region |
string | AWS region override, e.g. eu-west-1 (defaults to the connection's region) |
logs_list_groups
read-only
List CloudWatch log groups
| Argument | Type | Description |
|---|---|---|
prefix |
string | Log group name prefix, e.g. /aws/lambda/ |
limit |
integer default 50 |
min 1, max 50 |
region |
string | AWS region override, e.g. eu-west-1 (defaults to the connection's region) |
logs_query
read-only
Run a CloudWatch Logs Insights query and wait for the results
| Argument | Type | Description |
|---|---|---|
log_group required |
string | |
query |
string default "fields @timestamp, @message | sort @timestamp desc" |
Logs Insights query, e.g. 'fields @timestamp, @message | filter @message like /ERROR/' |
minutes |
integer default 60 |
Look back this many minutes min 1, max 10080 |
limit |
integer default 100 |
min 1, max 1000 |
region |
string | AWS region override, e.g. eu-west-1 (defaults to the connection's region) |
ecs_list_clusters
read-only
List ECS clusters
| Argument | Type | Description |
|---|---|---|
region |
string | AWS region override, e.g. eu-west-1 (defaults to the connection's region) |
ecs_list_services
read-only
List services in an ECS cluster with desired/running counts and deployment status
| Argument | Type | Description |
|---|---|---|
cluster required |
string | |
region |
string | AWS region override, e.g. eu-west-1 (defaults to the connection's region) |
Billing & errors
Each successful tool call costs 2 oshaani.com credits. initialize, tools/list, failed calls and timeouts are free.
| JSON-RPC code | Meaning |
|---|---|
-32054 (HTTP 401) | Missing, unknown or revoked API key |
-32053 (HTTP 404) | No AWS connection configured for your organisation, or the connection ID is wrong |
-32055 (HTTP 403) | Connection disabled or origin not allowed |
-32052 (HTTP 429) | Rate limit reached; retry after a minute |
-32050 | Not enough oshaani.com credits for the call |
-32051 | Billing temporarily unavailable; the call was not run |
Errors from AWS itself (bad IDs, permissions) come back as tool results with isError: true so the agent can read and correct them.
See the AWS API documentation.