Skip to main content

MCP Server proxy for Amazon Bedrock AgentCore Runtime

Project description

OpsGuide MCP Proxy

A Model Context Protocol (MCP) server proxy for OpsGuide's Amazon Bedrock AgentCore Runtime. This package allows you to use your existing Bedrock AgentCore MCP server with Claude Code and other MCP clients that expect stdio communication.

Overview

This proxy server acts as a bridge between:

  • MCP clients (like Claude Code) that communicate via stdio
  • Amazon Bedrock AgentCore Runtime that hosts your MCP server via HTTP
Claude Code ↔ uvx opsguide-mcp ↔ HTTP Client ↔ Bedrock AgentCore Runtime ↔ OpsGuide MCP Server

Features

  • Protocol Bridge: Converts between stdio (MCP client) and HTTP (Bedrock AgentCore)
  • Tool Proxying: Forwards all tool calls to your Bedrock-hosted MCP server
  • Resource Access: Proxies resource reading and listing
  • Prompt Support: Forwards prompt operations
  • uvx Compatible: Easy installation and usage with uvx
  • Environment Configuration: Uses standard environment variables

Prerequisites

  • Python 3.10 or higher
  • uv package manager
  • Amazon Bedrock AgentCore Runtime with deployed MCP server
  • Valid API key and agent ARN

Installation

For Claude Code

Add this configuration to your Claude Code MCP settings:

{
  "mcpServers": {
    "opsguide-mcp": {
      "command": "uvx",
      "args": ["opsguide-mcp@latest"],
      "env": {
        "API_KEY": "your-bearer-token"
      }
    }
  }
}

Direct Installation

# Install with uvx (recommended)
uvx opsguide-mcp

# Or install with pip
pip install opsguide-mcp

Environment Variables

Only one environment variable is required:

  • API_KEY: The bearer token for authentication

Hardcoded Configuration:

  • AGENT_ARN: arn:aws:bedrock-agentcore:us-east-1:654654574429:runtime/opsguide_mcp_server_example-feNooQ7JbB
  • AWS_REGION: us-east-1

Example .env file

API_KEY=eyJraWQiOiI3RG1ZaXlQbnpoUXR6cmRXNmtvWEd5anhaZU9FaitXcHBpck1rcDlvbHFjPSIsImFsZyI6IlJTMjU2In0...

Usage

With Claude Code

  1. Configure the MCP server in Claude Code settings (see installation section)
  2. Restart Claude Code
  3. Your Bedrock-hosted MCP tools will be available in Claude Code

Command Line

# Run directly
opsguide-mcp

# Run with uvx
uvx opsguide-mcp

# Run with environment variable
API_KEY="your-bearer-token" opsguide-mcp

How It Works

  1. Startup: The proxy server reads your environment variables
  2. Connection: Establishes HTTP connection to Bedrock AgentCore Runtime
  3. Discovery: Lists available tools, resources, and prompts from your MCP server
  4. Proxying: Forwards all MCP requests from Claude Code to Bedrock AgentCore
  5. Response: Returns results back to Claude Code via stdio

Troubleshooting

Common Issues

Connection Failed

  • Verify your API_KEY is correct and not expired
  • Check that your Bedrock AgentCore runtime is running
  • Ensure you have network access to bedrock-agentcore.us-east-1.amazonaws.com

No Tools Available

  • Check that your MCP server is properly deployed in Bedrock AgentCore
  • Verify the runtime is in "DEFAULT" qualifier state
  • Check logs for connection errors

Authentication Errors

  • Ensure your API_KEY (bearer token) is valid and not expired
  • Verify the token has permission to invoke the specified runtime

Debug Mode

Run with debug logging:

PYTHONPATH=. python -m bedrock_mcp_proxy.server

Development

Local Development

# Clone the repository
git clone https://github.com/your-username/opsguide-mcp
cd opsguide-mcp

# Install dependencies
uv sync

# Run locally
uv run opsguide-mcp

Testing

# Test the connection
python test_connection.py

Security Considerations

  • API Keys: Store API keys securely using environment variables or secure credential management
  • Network Access: The proxy requires outbound HTTPS access to AWS Bedrock AgentCore
  • Authentication: Bearer tokens should be rotated regularly
  • Logging: Be careful not to log sensitive information

License

MIT License - see LICENSE file for details.

Support

For issues related to:

  • This proxy: Open an issue on this repository
  • Bedrock AgentCore: Consult AWS documentation
  • Claude Code: Check Claude Code documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opsguide_mcp-0.1.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opsguide_mcp-0.1.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file opsguide_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: opsguide_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for opsguide_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9cda13581d3efd1bcba4b095e4c9d2738391224128ee4decb7bb08cb3f2382ec
MD5 c315f69b243e1f6e12c32bcfda306332
BLAKE2b-256 5c086af89623d94cc526e19d30a1eb87878f04403bbe83f47e1fdf2b21f71e2e

See more details on using hashes here.

File details

Details for the file opsguide_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: opsguide_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for opsguide_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9dca90e3dc3d1bac57965b2617bb89a3f121def4cb74d106420c9e965e849f69
MD5 69399a5dc56bdd97e38b14d2645b9057
BLAKE2b-256 8f36d303e308c395c68eada644f96555031afb55542e1b02f2e105339d63a667

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page