AWS Diagram MCP server: generate_diagram fails with No module named 'sarif_om'
When I use the AWS Diagram MCP server from awslabs/mcp with LibreChat v0.8.0 on Windows 11, generate_diagram fails and the server logs "Could not load 'sarif': No module named 'sarif_om'" at extension.py:227. The server connects but no diagram is generated. What causes this error and is there a fix? The same error also appears on macOS.
Originally asked on GitHub: https://github.com/awslabs/mcp/issues/1041
4 answers
The cause is explained in this thread, and a fix PR exists, but no release version was confirmed here.
The error comes from Bandit, which the AWS Diagram MCP server imports and uses for security analysis. SARIF (Static Analysis Results Interchange Format) is an optional output format for Bandit, so when the optional
sarif_ompackage is missing, Bandit logsCould not load 'sarif': No module named 'sarif_om'atextension.py:227. The failure was reproduced on Windows 11 (LibreChat v0.8.0) and macOS.A contributor initially described the error as non-fatal, saying it is only a warning about an optional feature. Two users reported the opposite in practice: after the warning, the
generate_diagramtool does not generate a diagram, and one user reported repeated attempts to run the tool. A contributor opened PR #1104 ("fix: resolve sarif_om module error in aws-diagram-mcp-server") to fix the issue and was seeking approvals; the thread does not confirm the PR was merged or that a fixed release exists. No workaround is given in the thread, so on an affected build, applying or waiting for that PR is the only known path.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Ran generate_diagram with the AWS Diagram MCP server via LibreChat v0.8.0 on Windows 11. The connection was established, then the server logged "Could not load 'sarif': No module named 'sarif_om'" and the tool errored when generating the diagram.
Source: https://github.com/awslabs/mcp/issues/1041 (opens external site)
Did this work for you?What @SuperMohit tried on GitHub (Didn't work)
Reported that the error is not non-fatal in practice: after the sarif_om warning appears, the MCP server does not generate a diagram.
Source: https://github.com/awslabs/mcp/issues/1041#issuecomment-3184806151 (opens external site)
Did this work for you?What @MichaelWalker-git tried on GitHub (Outcome unclear)
A contributor opened PR #1104 ("fix: resolve sarif_om module error in aws-diagram-mcp-server") to fix the error and asked for approvals. The thread does not confirm the PR was merged or released.
Source: https://github.com/awslabs/mcp/issues/1041#issuecomment-3190044756 (opens external site)
Did this work for you?
Related questions
- 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"
- Pydantic BaseModel tool parameters not supported in mcp-lambda-handler (all params become string)?