Skip to main content

Kiro MCP Integration with BookStack

Kiro MCP Integration with ClaudeBookStack

Overview

This page documents how to connect your BookStack instance to Kiro is Amazon's agentic AI-poweredAI IDE that uses Claude (via Amazon Bedrock) as itsan AIMCP backbone.server. KiroOnce natively supports the Model Context Protocol (MCP), allowing it to connect to external tools and data sources during agentic coding sessions. This integration enablesconfigured, Kiro's AI agentsagent tocan interactsearch withyour APIs,documentation, databases,read documentationpage systems,content for context, create new pages, and otherupdate servicesexisting ones allwithout from withinleaving your development workflow.environment.

The integration uses the bookstack-mcp npm package as a local MCP server. Kiro connects to it via .kiro/settings/mcp.json and treats BookStack as a tool it can invoke during any agentic coding session.


What isYou Kiro?Can Do

KiroWith wasBookStack launched by AWS in July 2025 as a spec-driven agentic IDE — a VS Code-based environment that brings structure to AI-assisted development. Rather than treating AI as a simple autocomplete tool, Kiro operates through a methodology of structured specifications, turning natural language promptswired into comprehensiveKiro, technicalyou planscan beforesay writingthings a single line of code.

Kiro's three core concepts are:like:

  • SpecsSearch docs during coding: A structured"Find three-fileour systeminternal (requirements.md,API design.md,spec tasks.md)in thatBookStack definesbefore whatimplementing tothis build, how to build it, and what steps are needed. Written using EARS (Easy Approach to Requirements Syntax).client."
  • Read pages for context — "Read the BookStack page on our DB2 schema before writing this migration."
  • Generate documentation automatically — "After finishing this module, create a BookStack page summarizing how it works."
  • Update existing pages — "Update the Linux hardening page with the new sysctl values we just tested."
  • Keep docs in sync via Agent Hooks: Automated triggers that fire predefined agent actions when IDE events occursuchConfigure asKiro to auto-generatingupdate documentationa onBookStack save,page runningwhenever qualitya checkskey on commit, or updating tests when codefile changes.
  • Steering Files: Persistent project knowledge stored in .kiro/steering/ as Markdown files. Steering gives Kiro's agents durable context about your tech stack, coding standards, and project structure that survives across sessions.

What is MCP?

Model Context Protocol (MCP) is an open standard developed by Anthropic that allows AI models like Claude to connect to external tools and data sources. MCP servers act as bridges between the AI and external services, exposing capabilities (tools) that the AI can invoke during a session.

In Kiro, MCP servers extend what Kiro's agents can do. With MCP configured, Kiro can:

  • Search and retrieve documentation from external knowledge bases
  • Read and write files via filesystem servers
  • Query GitHub repositories, issues, and pull requests
  • Interact with REST APIs and databases
  • Fetch live web content for research during a coding task
  • Connect to any MCP-compliant service (Slack, Jira, BookStack, etc.)

Claude as Kiro's AI Backend

Kiro uses Claude (licensed through Amazon Bedrock) as its underlying AI model. Users can select between:

  • Claude Sonnet 4.5 — the default model, optimized for reliable advanced coding and reasoning
  • Auto — a mixed-model mode that uses multiple frontier models for intent detection and caching to balance quality, latency, and cost

Because Kiro routes through Amazon Bedrock, it benefits from AWS's enterprise security, data residency controls, and compliance posture — making it suitable for organizations with strict data handling requirements.


Prerequisites

  • Kiro IDE installed (macOS Intel/Apple Silicon,macOS, Windows, or Linux) — kiro.dev
  • An AWS account (required for Kiro authentication and Bedrock access)authentication)
  • Node.js 18+18 or newer (for running npm/npx-based MCP servers locally)
  • Thethe MCP server package(s)via you want to connect to Kironpx)
  • AnyA running BookStack instance with API credentialsaccess orenabled
  • tokens
  • A requiredBookStack byAPI thoseToken MCPID serversand Token Secret (see below)

Setup

1.Step Locate1 — Generate a BookStack API Token

  1. Log into BookStack as an admin (or as the user you want Kiro to act as)
  2. Click your profile avatar in the top-right → Edit Profile
  3. Scroll down to the API Tokens section and click Create Token
  4. Give it a name (e.g., Kiro MCP) and optionally set an expiry date
  5. Click Save — copy the Token ID and Token Secret immediately. The secret is only shown once.
The token inherits the permissions of the BookStack user it belongs to. Create a dedicated user with only the access Kiro needs — or use a read-only token if you don't want Kiro writing content.

Step 2 — Create the Kiro MCP ConfigurationConfig File

Kiro loadsreads MCP server configurationdefinitions from a JSON file at one of two locations:

  • Workspace-level: .kiro/settings/mcp.json (checked intoinside your repo;project root — applies only to that project only)
  • User-level: ~/.kiro/settings/mcp.json (in your home directory — applies globally acrossto all projects)projects

Workspace-levelCreate settingsor take precedence over user-level settings when both exist.

2. Configure an MCP Server

Editedit the appropriate mcp.json file and add your server definition. Kiro uses the samefollowing JSON structure as other MCP-compatible hosts:block:

{
  "mcpServers": {
    "bookstack": {
      "command": "npx",
      "args": ["-y", "bookstack-mcp"],
      "env": {
        "BOOKSTACK_BASE_URL": "${BOOKSTACK_BASE_URL}",
        "BOOKSTACK_TOKEN_ID": "${BOOKSTACK_TOKEN_ID}",
        "BOOKSTACK_TOKEN_SECRET": "${BOOKSTACK_TOKEN_SECRET}"
      }
    },
        "github": {
      "command"BOOKSTACK_ENABLE_WRITE": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"true"
      }
    }
  }
}

UseThe ${VARIABLE_NAME}VAR_NAME} syntax tells Kiro to referenceread the value from your shell environment at startup. Export the three variables ratherin thanyour hardcodingshell secretsprofile directly(e.g., ~/.zshrc or ~/.bashrc):

export BOOKSTACK_BASE_URL="https://bookstack.x1a.net"
export BOOKSTACK_TOKEN_ID="your-token-id-here"
export BOOKSTACK_TOKEN_SECRET="your-token-secret-here"
Write operations are disabled by default. The bookstack-mcp server ships in read-only mode. You must explicitly set BOOKSTACK_ENABLE_WRITE=true in the configenv file.

block

3.to Remote MCP Servers

Kiro also supports remote MCP servers via HTTP/SSE. Use the url property instead of command:

{
  "mcpServers": {
    "my-remote-server": {
      "url": "https://mcp.example.com/sse",
      "headers": {
        "Authorization": "Bearer ${MY_API_TOKEN}"
      }
    }
  }
}

4. Restrict Dangerous Tools

You can preventallow Kiro fromto invokingcreate specificor MCPupdate toolspages. usingOmit theit disabledToolsif property:

you
{only "mcpServers":want {read "filesystem":access.
{
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"],
      "disabledTools": ["delete_file", "move_file"]
    }
  }
}

5.Step 3 — Reload Kiro

AfterSave savingthe mcp.json, file. Kiro willdetects detectconfiguration changes automatically — the change and make the MCPBookStack tools will be available to agents in your next agent chat or spec session.session Nowithout a full restartrestart. isIf typicallytools required.don't appear, open the MCP panel in Kiro settings to check for any startup errors from the server process.


Common MCP Servers forWhat Kiro Can Do with BookStack

Once connected, Kiro's agent has access to the following BookStack tools:

commentsget_books and documentation research tasks
ServerTool PackageDescription WhatRequires It ProvidesWrite?
Filesystem@modelcontextprotocol/server-filesystemsearch_content Read/writeFull-text filessearch outsideacross theall workspacebooks, chapters, and pagesNo
GitHub@modelcontextprotocol/server-githubget_page SearchRetrieve repos,a readspecific issuespage's andcontent PRs,by createID No
BookStack / bookstack-mcpget_book Read/writeList internalall documentationbooks inor BookStackget details of a specific bookNo
Fetchget_chapters / Web@modelcontextprotocol/server-fetchget_chapter RetrieveList liveor webretrieve pageschapters No
Brave Search@modelcontextprotocol/server-brave-searchget_recent_changes WebList searchrecently resultsupdated forcontent No
PostgreSQL@modelcontextprotocol/server-postgresexport_page Query and inspectExport a PostgreSQLpage databaseas HTML, PDF, Markdown, or plain textNo
Slack@modelcontextprotocol/server-slackcreate_page ReadCreate anda postnew Slackpage messagesin a specified book or chapterYes
update_pageUpdate an existing page's title or contentYes
create_shelf / update_shelfManage book shelvesYes
create_attachmentAttach a link to a pageYes

A full community directory of available MCP servers is listed in the official Kiro documentation at kiro.dev/docs/mcp/servers/.


Example UseKiro CasesPrompts

PullSearch documentationdocs whilebefore writingimplementing codesomething

"ImplementSearch BookStack for our internal REST API authentication spec, then scaffold a BookStack APIPython client inthat Python.implements Use the BookStack MCP to look up the current API spec and generate a working client class.it."

Kiro willcalls invokesearch_content with your query, reads the BookStackmatching MCPpage, tothen read your internal API docs and useuses that content as context to generate accurate implementation code — no copy-pastingpaste required.needed.

Spec-drivenGenerate featurea withdocumentation GitHubpage contextfrom code

"Read GitHubthe issuedb_backup.sh #142script andI generatejust wrote, then create a KiroBookStack specpage for implementingin the requestedLinux feature.book titled 'Automated DB Backup Script' documenting how it works."

Kiro callsreads the GitHubfile, MCP to fetchdrafts the issue bodydocumentation, and comments, then generatescalls requirements.mdcreate_page, with the appropriate design.mdbook_id,. andThe tasks.mdpage groundedappears in theBookStack actual issue text.immediately.

QueryUpdate a databasepage toafter writemaking a migrationchanges

"InspectI've changed the currentfirewall schemarules ofon the usersiSeries table— find the iSeries network configuration page in our dev databaseBookStack and writeupdate a migrationit to addreflect anthe audit_lognew column.port allowlist."

Kiro uses the PostgreSQL MCPsearch_content to introspectlocate the livepage, schema,reads it, then writescalls aupdate_page migrationwith filethe thatrevised accuratelycontent, targetspreserving existingeverything columnselse andon types.the page.

Auto-update docs via Agent Hook

Configure"When I save any file in scripts/, automatically update the corresponding BookStack runbook page."

Define an Agent Hook in .kiro/hooks/ tothat triggerfires on filefile-save save.events. WhenThe hook instructs Kiro to find and update the relevant BookStack page each time you save a functionscript signature changes,keeping your runbooks always in sync without manual effort.

Read a runbook to answer a question

"What's the hookcorrect firesprocess for joining a new Linux VM to our domain? Check the BookStack Linux book."

Kiro searches BookStack, reads the relevant page, and answers from your actual internal documentation rather than generic knowledge.


Tips and Gotchas

  • Write mode is off by default. Don't forget BOOKSTACK_ENABLE_WRITE=true — otherwise create/update calls will silently do nothing or error.
  • Export your env vars before launching Kiro. Kiro usesreads environment variables at startup. If you add them to your shell profile, open a new terminal session before starting Kiro, or they won't be picked up.
  • Use disabledTools to limit risk. If you want Kiro to read but not write, omit BOOKSTACK_ENABLE_WRITE and also add "disabledTools": ["create_page", "update_page"] to your server config block for an extra layer of protection.
  • Mention BookStack explicitly in your prompt. Kiro won't automatically reach for the BookStack MCP to updateunless the relevantcontext internalmakes documentationit clear — say "check BookStack" or "search our docs" to guide it.
  • Check the book ID when creating pages. If Kiro creates a page automatically.

    in
    the

    Securitywrong Considerations

    book,
      tell it the correct book name. It will look up the ID via get_books and retry.
    • EnvironmentDon't variablescommit oversecrets hardcodedto valuesthe repo.: Always useUse ${VAR}VAR_NAME} references in mcp.json., Hardcodednot secretsliteral committedtoken tovalues. version control are a significant risk.
    • Workspace vs. user config: Be careful about checking workspace-levelAdd .kiro/settings/mcp.json intoto shared repos.gitignore if it containsexists serverat definitionsworkspace thatlevel referenceand environmentyour variablesteam specifichas todifferent individual developers.credentials.
    • disabledToolsToken permissions matter.: UseThe MCP token acts as the disabledToolsBookStack fielduser toyou limitcreated whatit Kiro'sunder. agentsIf that user can't see a book, neither can do with a given MCP server — especially for servers that can delete or overwrite data.
    • Trusted servers only: Only connect Kiro to MCP servers you trust. Remote servers receive requests that may include code context and file contents.
    • Bedrock data handling: Prompts sent to Claude through Kiro are processed via Amazon Bedrock. Review AWS Bedrock's data use and retention policies for compliance requirements.Kiro.

    Troubleshooting

    use
    Issue Resolution
    MCPBookStack tools notdon't availableappear in Kiro chat VerifyCheck the Kiro MCP panel for server errors; verify mcp.json is valid JSON; run npx -y bookstack-mcp manually to check Kiro's MCP panel for install errors
    Authentication error messages(401)Confirm BOOKSTACK_TOKEN_ID and BOOKSTACK_TOKEN_SECRET are correct; check the token hasn't expired in BookStack
    Connection refused / cannot reach BookStackConfirm BOOKSTACK_BASE_URL is reachable from the machine running Kiro; check VPN or firewall if BookStack is internal
    Create/update page does nothingEnsure BOOKSTACK_ENABLE_WRITE=true is set in the env block
    Environment variablevariables not resolving EnsureMake thesure variablevariables isare exported in your shell environment before launchingstarting Kiro; restart Kiro after adding them
    MCPKiro serveragent exitsdoesn't immediately Run the server command manually in a terminal to check for missing dependencies or bad args
    Remote server connection refusedConfirm the URL is reachable; check firewall rules and any VPN requirements
    Agent ignores MCP toolsBookStack Mention the tool or data sourceBookStack explicitly in your prompt to guidee.g. Kiro's"search agentour toBookStack usedocs itfor..."
    SteeringSearch filesreturns notno appliedresults Ensure filesBookStack's aresearch inindex is up to date: .kiro/steering/php artisan bookstack:regenerate-search with a .md extension; check for YAML front matter if using conditional inclusion

    References