Supercharge Jetbrains AI with the AWS Knowledge MCP Server

Let's connect the Jetbrains AI Assistant and Junie to the official AWS Knowledge Remote MCP Server, empowering them to follow AWS best practices!

6 days ago   •   3 min read

By Benjamin Justice
Photo by Conny Schneider / Unsplash
Table of contents

Jetbrains AI Assistant and Junie both support MCP servers, but what can you actually do with it? A great start is the official AWS Knowledge Remote MCP Server, which empowers Jetbrains AI to reference the official AWS documentation and AWS best practices.
In this guide, we'll walk through setting up the AWS Knowledge server using the fastmcp proxy, as recommended by the official AWSLabs MCP documentation. This will improve AWS-related responses and even add links to relevant documentation in most cases.

A Quick Warning: Stick to "Read-Only"

While the Model Context Protocol (MCP) can support write-access, I strongly recommend sticking to Read-Only servers, like the ones in this guide.

If you want to proceed to use servers with write operations, be sure to strictly scope your permissions. You must be certain that a "worst-case" write operation won't cause serious damage to your project or organization.

Prerequisites

To follow this guide, you'll need:

Setting Up the MCP Server in Junie

First, let's tell Junie how to find and run the AWS Knowledge server.
Navigate to Settings -> Tools -> Junie -> MCP Settings.
Paste the following JSON into the configuration:

{
  "mcpServers": {
    "aws-knowledge": {
      "command": "uvx",
      "args": [
        "fastmcp",
        "run",
        "https://knowledge-mcp.global.api.aws"
      ]
    }
  }
}

Now, we need to instruct Junie to actually use this new tool. Ask Junie to create or extend its guidelines with the following instruction:

Create or extend the junie guidelines: instruct junie to use the aws-knowledge mcp server for AWS best practices, documentation and guidance.

That's it for Junie! You can now ask it AWS-specific questions. Try asking:

"please review if my CDK project follows best practices"
"How does EC2 autoscaling work?"

Setting Up the MCP Server in AI Assistant


The setup for the standard AI Assistant is similar but involves a couple of extra steps to configure its base instructions.
First, the AI assistant needs guidelines which tell it to use the AWS Knowledge MCP server for any AWS topics.

AI assistant reads any markdown tiles located in .aiassistant/rules/.
You can copy or symlink the .junie/guidelines.md file to .aiassistant/rules/read-junie-guidelines.md.

Next, add the MCP server for the AI Assistant (note: these settings are separate from Junie's).
Go to Settings -> Tools -> AI Assistant -> Model Context Protocol (MCP)
Create a new MCP server and paste in the following JSON:

{
  "mcpServers": {
    "aws-knowledge": {
      "command": "uvx",
      "args": [
        "fastmcp",
        "run",
        "https://knowledge-mcp.global.api.aws"
      ]
    }
  }
}

You're all set. Open the AI Assistant chat and ask an AWS question, for example:

What must I know about S3 encryption?

You should see the AI Assistant indicate that it used MCP tools (like aws___search_documentation). You can even click on these tools in the chat attachments to see the raw data the mcp server provided to the AI.

Bonus: Adding the awslabs-cdk MCP Server

To get even more specific guidance for AWS CDK projects, we can add the awslabs-cdk MCP server. This server provides specialized knowledge about CDK guidance and best practices.

Update Junie's MCP Settings

Go back to Settings -> Tools -> Junie -> MCP Settings. Update your existing JSON to include both servers. Junie uses one configuration file for all its servers.
JSON

{
  "mcpServers": {
    "aws-knowledge": {
      "command": "uvx",
      "args": [
        "fastmcp",
        "run",
        "https://knowledge-mcp.global.api.aws"
      ]
    },
    "awslabs-cdk": {
      "command": "uvx",
      "args": [
        "awslabs.cdk-mcp-server@latest"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Add to AI Assistant

Go to Settings -> Tools -> AI Assistant -> Model Context Protocol (MCP). The AI Assistant uses one JSON configuration per server. Click the + icon, select JSON format, and paste the following:

{
  "mcpServers": {
    "awslabs-cdk": {
      "command": "uvx",
      "args": [
        "awslabs.cdk-mcp-server@latest"
      ],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      }
    }
  }
}

Update the Guidelines Again

Finally, tell Junie to use this new server for CDK-related tasks. Ask Junie:

Extend the junie guidelines to use the awslabs-cdk mcp server for CDK guidance and best practices.

Ensure that AI assistant rules have these updated instructions as well.

Conclusion

And there you have it! Both Junie and the JetBrains AI Assistant are now equipped to use official AWS guidance and best practices directly within your IDE.
This greatly improves their contextual knowledge when you're working on AWS projects and provides a blueprint for adding even more custom MCP servers in the future. Happy coding!

Spread the word