Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: Arm MCP Server Overview
weight: 2

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## What is the Arm MCP Server?

The Arm MCP Server is a tool that enables AI-powered developer tools to become Arm cloud migration and optimization experts. It implements the Model Context Protocol (MCP), an open standard that allows AI assistants to access external tools and data sources.

By connecting your AI coding assistant to the Arm MCP Server, you gain access to Arm-specific knowledge, container image inspection tools, and code analysis capabilities that streamline the process of migrating applications from x86 to Arm.

## How to interact with the Arm MCP Server

There are multiple ways to interact with the Arm MCP Server, depending on your development environment and workflow:

### 1. Direct AI Chat

You can ask your AI assistant natural language questions, and it will automatically use the MCP tools when appropriate. For example:

```text
Check if the nginx:latest Docker image supports Arm architecture
```

### 2. Prompt Files

Many AI coding tools support prompt files that provide structured instructions. These files can reference MCP tools and guide the AI through complex workflows like full codebase migrations.

### 3. Agentic Workflows

Tools like GitHub Copilot Agent Mode, Claude Code, Kiro, and OpenAI Codex support autonomous agent workflows where the AI can execute multi-step migration tasks with minimal intervention. These fully agentic workflows can be combined with prompt files and direct chat to create an extremely powerful development system.

## Available Arm MCP Server Tools

The Arm MCP Server provides several specialized tools for migration and optimization:

### knowledge_base_search

Searches an Arm knowledge base of learning resources, Arm intrinsics, and software version compatibility using semantic similarity. Given a natural language query, it returns matching resources with URLs, titles, and content snippets ranked by relevance.

**Use case:** Finding documentation, tutorials, or version compatibility information for Arm migration.

### check_image

Checks Docker image architectures. Provide an image in `name:tag` format and get a report of supported architectures.

**Use case:** Quickly verify if a container base image supports `arm64` before starting a migration.

### skopeo

A container image architecture inspector that inspects container images remotely without downloading them to check architecture support (especially ARM64 compatibility).

**Use case:** Detailed inspection of container manifests and multi-architecture support before migrating workloads to Arm-based infrastructure.

### migrate_ease_scan

Runs a migrate-ease scan against a workspace or remote Git repository. Supported scanners include: cpp, python, go, js, and java. Returns analysis results identifying x86-specific code that needs attention.

**Use case:** Automated scanning of codebases to identify architecture-specific dependencies, build flags, intrinsics, and libraries that need to be changed for Arm.

### mca (Machine Code Analyzer)

An assembly code performance analyzer that predicts performance on different CPU architectures and identifies bottlenecks. It estimates Instructions Per Cycle (IPC), execution time, and resource usage.

**Use case:** Analyzing and optimizing performance-critical assembly code when migrating between processor types.

### sysreport_instructions

Provides instructions for installing and using sysreport, a tool that obtains system information related to system architecture, CPU, memory, and other hardware details.

**Use case:** Understanding the target Arm system's capabilities before deployment.

## Setting up the Arm MCP Server

To use the Arm MCP Server with your AI coding assistant, you need to configure your tool to connect to the server. The exact configuration depends on your tool:

[placeholder list of links to learn.arm.com install guides]

Continue to the next section to see the Arm MCP Server in action.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Direct AI Chat
weight: 3

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## Checking Base Images for Arm Compatibility

This section demonstrates just one example of using direct AI chat with the Arm MCP Server. You can use similar natural language prompts to check library compatibility, search for Arm documentation, or analyze code for migration issues.

One of the first steps in migrating a containerized application to Arm is verifying that your base images support the `arm64` architecture. The Arm MCP Server makes this easy with a simple natural language prompt.

## Example: Legacy CentOS 6 Application

Consider an application built on CentOS 6, a legacy distribution that has reached end-of-life. Here's a Dockerfile that represents a typical x86-optimized compute benchmark application. Copy it to your VS Code with GitHub Copilot or other agentic IDE:

```dockerfile
FROM centos:6

# CentOS 6 reached EOL, need to use vault mirrors
RUN sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/CentOS-Base.repo && \
sed -i 's|^#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Base.repo

# Install EPEL repository (required for some development tools)
RUN yum install -y epel-release && \
sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/epel.repo && \
sed -i 's|^#baseurl=http://download.fedoraproject.org/pub/epel|baseurl=http://archives.fedoraproject.org/pub/archive/epel|g' /etc/yum.repos.d/epel.repo

# Install Developer Toolset 2 for better C++11 support (GCC 4.8)
RUN yum install -y centos-release-scl && \
sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/CentOS-SCLo-scl.repo && \
sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo && \
sed -i 's|^# baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-SCLo-scl.repo && \
sed -i 's|^# baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo

# Install build tools
RUN yum install -y \
devtoolset-2-gcc \
devtoolset-2-gcc-c++ \
devtoolset-2-binutils \
make \
&& yum clean all

# Set working directory
WORKDIR /app

# Copy all header files
COPY *.h ./

# Copy all C++ source files
COPY *.cpp ./

# Build the application with optimizations using devtoolset-2 (GCC 4.8)
# AVX2 intrinsics are used in the code for x86-64 platforms
RUN scl enable devtoolset-2 "g++ -O2 -mavx2 -o benchmark \
main.cpp \
matrix_operations.cpp \
hash_operations.cpp \
string_search.cpp \
memory_operations.cpp \
polynomial_eval.cpp \
-std=c++11"

# Create a startup script
COPY start.sh .
RUN chmod +x start.sh

# Run the application
CMD ["./start.sh"]
```

This Dockerfile has several x86-specific elements:
- The `centos:6` base image
- The `-mavx2` compiler flag for x86 AVX2 SIMD instructions
- C++ source files containing x86 intrinsics (which you will examine in the next section)

## Using the Arm MCP Server to Check Compatibility

With the Arm MCP Server connected to your AI assistant, you can check the base image compatibility with a simple prompt:

```text
Check this base image for Arm compatibility
```

The AI assistant will use the `check_image` or `skopeo` tool to inspect the image and return a report. For `centos:6`, you would discover that this legacy image does **not** support `arm64` architecture.

This simple interaction demonstrates how direct AI chat can quickly surface compatibility issues. In the next section, you'll see how to resolve these issues automatically using a fully agentic migration workflow with prompt files.
Loading