How to Bring Organizational Knowledge Into Kiro Using Amazon Bedrock and MCP

How to Bring Organizational Knowledge Into Kiro Using Amazon Bedrock and MCP

Cloud Platform Engineering

A developer opens a pull request comment: “This doesn’t follow our circuit breaker pattern. Check the ADR.” Finding the ADR means switching to a browser, navigating the wiki, searching “circuit breaker,” scrolling past irrelevant results, copying the relevant content, and switching back. That context switch now has a fix — and it runs inside Kiro.

The Framework

The integration uses the Model Context Protocol to wire Kiro, an agentic IDE, to Amazon Bedrock Knowledge Bases. The MCP server handles retrieval; Kiro handles generation. When a developer queries organizational knowledge — architecture decisions, API specs, security guidelines, coding standards — the request flows through a local MCP server to Bedrock’s Retrieve API, which embeds the query via Amazon Titan Text Embeddings v2, runs a vector search against Amazon OpenSearch Serverless, and returns ranked document chunks. Kiro synthesizes those chunks into a cited, in-editor answer.

This is not a chatbot replacement for documentation. It’s a retrieval layer that keeps the developer in their flow state rather than switching to a browser.

Step 1 — Index Your Organizational Knowledge

Upload Architectural Decision Records, API specifications, coding standards, runbooks, and compliance documentation to an Amazon S3 bucket, then create a Bedrock Knowledge Base pointed at that bucket. Tag the Knowledge Base with mcp-multirag-kb=true — the MCP server uses this tag for auto-discovery. No schema changes or document restructuring required; Bedrock’s ingestion handles chunking and embedding.

Step 2 — Deploy the MCP Server

The MCP server runs as a local child process via stdio — no persistent service to manage. Add it to Kiro’s MCP configuration file at .kiro/settings/mcp.json:

{
  "mcpServers": {
    "bedrock-kb": {
      "command": "uvx",
      "args": ["bedrock-kb-mcp"],
      "env": {
        "AWS_REGION": "us-east-1",
        "KB_INCLUSION_TAG_KEY": "mcp-multirag-kb"
      }
    }
  }
}

The uvx runner means no permanent installation — the server starts on demand when Kiro needs it.

Step 3 — Query in Plain Language

With the integration live, developers query organizational knowledge in the same interface they use for everything else:

  • “What authentication does the Orders API require?” → returns JWT scope requirements and header formats with source citations
  • “What’s our standard for error handling in the payment service?” → returns the exact custom error class structure with code snippets
  • “Why did we choose circuit breakers over retries for the inventory service?” → returns the ADR rationale, alternatives considered, and tradeoffs documented

Every response includes citations to the source documents, so the developer can navigate to the full ADR if they need more context.

Step 4 — Extend to CI/CD

The Kiro CLI supports a --no-interactive --trust-tools=read mode for headless operation. This enables Knowledge Base queries in CI/CD pipelines — validating that generated code follows team standards before merge, identifying documentation gaps as part of the PR workflow, or surfacing relevant ADRs automatically when a reviewer opens a pull request against a service.

Where It Doesn’t Apply

The integration is retrieval over existing documentation. It can’t synthesize knowledge that hasn’t been written down. Teams with sparse or inconsistent ADR and API documentation will get answers that reflect those gaps — cited accurately, which helps identify what’s missing, but not filled in automatically. The quality of retrieval is bounded by the quality of the Knowledge Base content.

LangChain is available as an alternative path if the team needs provider portability (OpenAI, Ollama, local models), server-side RAG filtering, or custom chain composition. Both servers can run simultaneously. Kiro’s existing integration with the DevOps agent extends the same pattern to incident triage and infrastructure operations.

The So What

The bottleneck this solves — context switching to documentation while in flow — is one of the highest-frequency friction points in software engineering. The MCP + Bedrock Knowledge Base integration removes it by making organizational knowledge queryable from inside the editor. The practical first step: audit what your team actually looks up most often during code review and onboarding, and start the Knowledge Base with those documents. Citation-backed answers from a body of indexed ADRs and API specs are worth more than general model knowledge for questions specific to your system.

Source: AWS DevOps Blog

Content created with AI assistance and reviewed for accuracy.

💬

Join the conversation

Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.

Join Stack Insiders →

Newsletter coming soon.

Curated digests across AI, biohacking, photography, travel, and more. Be the first to know when we launch.