aws-iac-mcp-server doc search tools fail with KeyError: 'url'?
Why do
search_cdk_documentationandsearch_cloudformation_documentationfail withError calling tool '<tool_name>': 'url'in aws-iac-mcp-server? I'm on server version 1.0.28, macOS 26.4.1, using the Kiro CLI, and every query returns this KeyError instead of the expected ranked results withrank,title,url, andcontext.Originally asked on GitHub: https://github.com/awslabs/mcp/issues/3339
6 answers
Fixed. The root cause was in the AWS Knowledge MCP backend that
aws-iac-mcp-serverproxies to:search_documentationresponses started mixing document items (which haveurl) with skill items that only haveskill_nameandskill_description. The server's_parse_search_documentation_resultassumed every item had aurl, so any query returning a skill-type item raisedKeyError: 'url'.No client upgrade or config change is needed. The Knowledge MCP side was fixed so it no longer emits url-less items, and the maintainers confirmed existing installs, including
@latest/ 1.0.26, work as-is. They verified both repro cases end-to-end after the fix:search_cloudformation_documentationwith{"query": "AWS::Lambda::Function"}returned 5 results all withurl, andsearch_cdk_documentationwith{"query": "S3 Bucket encryption"}returned 9 results all withurl. If you still seeKeyError: 'url'on a current install, post the triggering query and the maintainers said they would reopen the issue.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reproduced with Kiro CLI on aws-iac-mcp-server 1.0.28 (macOS 26.4.1): both
search_cdk_documentation{"query": "S3 Bucket encryption"} andsearch_cloudformation_documentation{"query": "AWS::Lambda::Function"} returnedError calling tool '<tool_name>': 'url'.Source: https://github.com/awslabs/mcp/issues/3339 (opens external site)
Did this work for you?What @masamaru0513 tried on GitHub (Worked)
A contributor tested both repro queries against the current main branch and got results with the
urlfield present; the Knowledge MCP endpoint appeared to be returningurlconsistently at that time.Source: https://github.com/awslabs/mcp/issues/3339#issuecomment-4509223500 (opens external site)
Did this work for you?What @daniel-amag tried on GitHub (Didn't work)
Another user hit the same error and posted server logs showing the crash in
aws_knowledge_client.py:79in_parse_search_documentation_result, confirming the KeyError was still occurring.Source: https://github.com/awslabs/mcp/issues/3339#issuecomment-4516155680 (opens external site)
Did this work for you?What @masamaru0513 tried on GitHub (Outcome unclear)
A contributor identified the root cause (document items vs skill items mixed in one result list) and proposed a patch making
urloptional and mappingskill_descriptiontocontext; the thread does not show that PR being merged.Source: https://github.com/awslabs/mcp/issues/3339#issuecomment-4517146436 (opens external site)
Did this work for you?What @kumvprat tried on GitHub (Worked)
A maintainer re-ran both repro queries after the server-side fix and confirmed all results included
url(5 results for the CloudFormation query, 9 for the CDK query).Source: https://github.com/awslabs/mcp/issues/3339#issuecomment-6020815343 (opens external site)
Did this work for you?
Related questions
- AWS Diagram MCP server: generate_diagram fails with No module named 'sarif_om'
- DynamoDB MCP server fails: FastMCP.__init__() got an unexpected keyword argument 'version'
- AWS MCP server not using AWS_CONTAINER_AUTHORIZATION_TOKEN when run via Docker MCP Toolkit?
- EKS MCP server: how to switch AWS profiles or Kubernetes contexts dynamically?
- postgres-mcp-server: run_query fails with "No database connection available"