npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@miguel-carrera/aws-bedrock-mcp-server

v1.1.0

Published

MCP server for AWS Bedrock Knowledge Base — semantic search and RAG via bedrock_retrieve and bedrock_retrieve_and_generate

Downloads

31

Readme

aws-bedrock-mcp-server

MCP server for AWS Bedrock Knowledge Base — exposes two tools for semantic search and RAG.

| Tool | Description | |------|-------------| | bedrock_retrieve | Semantic / hybrid search — returns raw passages from the Knowledge Base | | bedrock_retrieve_and_generate | Full RAG pipeline — retrieves passages and generates a grounded answer |


Usage with Claude Code

claude mcp add aws-bedrock -- npx -y @miguel-carrera/aws-bedrock-mcp-server

Or add to your claude_desktop_config.json / .mcp.json:

Cognito auth (recommended):

{
  "mcpServers": {
    "aws-bedrock": {
      "command": "npx",
      "args": ["-y", "@miguel-carrera/aws-bedrock-mcp-server"],
      "env": {
        "BEDROCK_KNOWLEDGE_BASE_ID": "<your-kb-id>",
        "AWS_REGION": "us-east-1",
        "COGNITO_IDENTITY_POOL_ID": "<identity-pool-id>",
        "COGNITO_USER_POOL_CLIENT_ID": "<app-client-id>",
        "COGNITO_DOMAIN": "<your-domain>.auth.us-east-1.amazoncognito.com"
      }
    }
  }
}

AWS profile auth:

{
  "mcpServers": {
    "aws-bedrock": {
      "command": "npx",
      "args": ["-y", "@miguel-carrera/aws-bedrock-mcp-server"],
      "env": {
        "BEDROCK_KNOWLEDGE_BASE_ID": "<your-kb-id>",
        "AWS_REGION": "us-east-1",
        "AWS_PROFILE": "default"
      }
    }
  }
}

Prerequisites

  • Node.js ≥ 18

For AWS profile auth: credentials configured in ~/.aws/credentials or ~/.aws/config.

For Cognito auth: a Cognito User Pool with a hosted UI and an Identity Pool. On the first run the server opens your browser to log in; credentials are cached to ~/.atlas-ai/cognito-credentials.json and reused until they expire (~1 hour).

Required IAM permissions:

{
  "Effect": "Allow",
  "Action": [
    "bedrock:Retrieve",
    "bedrock:RetrieveAndGenerate"
  ],
  "Resource": "arn:aws:bedrock:*:*:knowledge-base/*"
}

Configuration

| Environment variable | Required | Default | Description | |---|---|---|---| | BEDROCK_KNOWLEDGE_BASE_ID | Recommended | — | Default Knowledge Base ID; can be overridden per tool call | | AWS_REGION | No | us-east-1 | AWS region where your Knowledge Base lives | | Cognito auth | | | | | COGNITO_IDENTITY_POOL_ID | Yes (Cognito) | — | Cognito Identity Pool ID — activates Cognito auth when set | | COGNITO_USER_POOL_CLIENT_ID | Yes (Cognito) | — | Cognito User Pool app client ID | | COGNITO_DOMAIN | Yes (Cognito) | — | Cognito hosted UI domain (e.g. xyz.auth.us-east-1.amazoncognito.com) | | AWS profile auth | | | | | AWS_PROFILE | No | default | AWS named profile from ~/.aws (used when COGNITO_IDENTITY_POOL_ID is not set) |


Tools

bedrock_retrieve

Search the Knowledge Base and return raw passages.

| Parameter | Type | Default | Description | |---|---|---|---| | query | string | — | Natural language search query (required) | | knowledge_base_id | string | env var | Bedrock KB ID | | number_of_results | number | 5 | Passages to return (1–100) | | search_type | SEMANTIC | HYBRID | SEMANTIC | Search strategy | | next_token | string | — | Pagination cursor | | response_format | markdown | json | markdown | Output format |

bedrock_retrieve_and_generate

Retrieve passages and generate a grounded answer using a Bedrock model.

| Parameter | Type | Default | Description | |---|---|---|---| | query | string | — | Question to answer (required) | | knowledge_base_id | string | env var | Bedrock KB ID | | model_arn | string | Claude 3 Haiku | ARN of the Bedrock model for generation | | number_of_results | number | 5 | Passages to retrieve (1–100) | | search_type | SEMANTIC | HYBRID | SEMANTIC | Search strategy | | session_id | string | — | Session ID for multi-turn conversations | | system_prompt | string | — | Custom generation prompt (use $search_results$ placeholder) | | response_format | markdown | json | markdown | Output format |


Development

npm install
npm run dev      # watch mode
npm run build    # compile to dist/