INSTALL_MACOS.mdâĸ7.48 kB
# macOS Installation Guide
Complete guide for installing MCP ABAP ADT Server on macOS using Homebrew.
## đ Prerequisites
- macOS 10.15 (Catalina) or later
- Terminal access
- Administrator privileges
## đē Step 1: Install Homebrew
If you don't have Homebrew installed:
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
Verify installation:
```bash
brew --version
```
## đ§ Step 2: Install Node.js
### Option 1: Using nvm (Recommended)
nvm (Node Version Manager) allows you to install and switch between multiple Node.js versions.
1. **Install nvm:**
```bash
# Install nvm via Homebrew
brew install nvm
# Create nvm directory
mkdir ~/.nvm
# Add to your shell profile (~/.zshrc or ~/.bash_profile)
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zshrc
echo '[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"' >> ~/.zshrc
echo '[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"' >> ~/.zshrc
# Reload shell
source ~/.zshrc
```
2. **Install Node.js LTS:**
```bash
# Install latest LTS version
nvm install --lts
# Use the installed version
nvm use --lts
# Set as default
nvm alias default lts/*
# Verify installation
node -v
npm -v
```
### Option 2: Using Homebrew (Direct)
```bash
# Install Node.js LTS directly
brew install node
# Verify installation
node -v
npm -v
```
## đĻ Step 3: Install Git
```bash
# Install Git (if not already installed)
brew install git
# Verify
git --version
```
## đ Step 4: Install MCP ABAP ADT Server
You have two installation options:
### Option A: Install from Pre-built Package (Recommended)
Install from a pre-built `.tgz` package file:
**Global Installation (Recommended):**
```bash
# Download or obtain the package file
# Then install globally
npm install -g ./fr0ster-mcp-abap-adt-1.1.0.tgz
# Verify installation
mcp-abap-adt --help
```
**Available commands after installation:**
- `mcp-abap-adt` - stdio transport (default, for MCP clients)
- `mcp-abap-adt-http` - HTTP server transport
- `mcp-abap-adt-sse` - SSE server transport
**Usage examples:**
```bash
# HTTP server on default port (3000)
mcp-abap-adt-http
# HTTP server on custom port
mcp-abap-adt-http --port 8080
# SSE server accessible from network
mcp-abap-adt-sse --host 0.0.0.0 --port 3000
# Use custom .env file
mcp-abap-adt-http --env /path/to/custom/.env --port 8080
```
**Local Installation (Project-specific):**
```bash
# Navigate to your project
cd /path/to/your/project
# Install package locally
npm install /path/to/fr0ster-mcp-abap-adt-1.1.0.tgz
# Use via npx
npx mcp-abap-adt-http --port 3000
```
**Troubleshooting:**
If command not found after global installation:
```bash
# Check npm global bin directory
npm config get prefix
# Add to PATH (add to ~/.zshrc or ~/.bash_profile)
export PATH="$(npm config get prefix)/bin:$PATH"
source ~/.zshrc # or source ~/.bash_profile
```
### Option B: Install from Source (For Development)
Clone and build from source code:
```bash
# Clone repository with submodules
git clone --recurse-submodules https://github.com/fr0ster/mcp-abap-adt.git
cd mcp-abap-adt
# If you already cloned without submodules, initialize them:
# git submodule update --init --recursive
# Install dependencies
npm install
# Build project
npm run build
# Verify installation
npm test
```
## âī¸ Step 5: Configure SAP Connection
Create `.env` file in project root:
```bash
# Copy template
cp .env.template .env
# Edit with your favorite editor
nano .env
# or
vim .env
# or
code .env # if you have VS Code
```
Example `.env` content:
```env
SAP_URL=https://your-sap-system.com:8000
SAP_CLIENT=100
SAP_LANGUAGE=en
SAP_AUTH_TYPE=basic
SAP_USERNAME=your_username
SAP_PASSWORD=your_password
TLS_REJECT_UNAUTHORIZED=0
SAP_TIMEOUT_DEFAULT=45000
```
## đ Step 6: Connect to AI Tools
### Server Modes
MCP ABAP ADT Server supports two transport protocols:
1. **stdio** (default) - Standard input/output, used by Cline/Cursor
2. **SSE/HTTP** - Server-Sent Events over HTTP, for web interfaces
### Cline (VS Code Extension)
Uses **stdio** mode (default).
1. Install Cline extension in VS Code
2. Open Cline settings (JSON): `Cmd+Shift+P` â "Preferences: Open User Settings (JSON)"
3. Add MCP server configuration:
```json
{
"mcpServers": {
"mcp-abap-adt": {
"command": "node",
"args": ["/Users/your-username/mcp-abap-adt/dist/index.js"],
"env": {
"SAP_URL": "https://your-sap-system.com:8000",
"SAP_CLIENT": "100",
"SAP_USERNAME": "your_username",
"SAP_PASSWORD": "your_password"
}
}
}
}
```
### Cursor
Uses **stdio** mode (default).
Add to Cursor settings (`~/.cursor/config.json`):
```json
{
"mcpServers": {
"mcp-abap-adt": {
"command": "node",
"args": ["/Users/your-username/mcp-abap-adt/dist/index.js"]
}
}
}
```
### SSE/HTTP Mode (Web Interfaces)
For web-based clients or custom integrations:
```bash
# Start server in SSE mode
npm run start:sse
# Or with custom port
node dist/index.js --transport sse --sse-port 3001
# Or streamable HTTP mode
npm run start:http
node dist/index.js --transport streamable-http
```
**SSE Server Options:**
- `--sse-port PORT` - Port number (default: 3001)
- `--sse-host HOST` - Host address (default: 0.0.0.0)
- `--sse-allowed-origins LIST` - Comma-separated allowed origins
- `--sse-enable-dns-protection` - Enable DNS rebinding protection
**Example:**
```bash
node dist/index.js --transport sse --sse-port 4100 --sse-host 127.0.0.1
```
Server will be available at: `http://127.0.0.1:4100/sse`
## â
Step 7: Test Installation
```bash
# Run test suite
npm test
# Test specific connection
node tests/test-connection.js
```
## đ Troubleshooting
### Homebrew installation fails
If you get permission errors:
```bash
sudo chown -R $(whoami) /usr/local/Cellar /usr/local/Homebrew
```
### Node.js version issues
Check and switch Node.js versions:
```bash
# Install nvm (Node Version Manager)
brew install nvm
# Install specific Node.js version
nvm install 18
nvm use 18
```
### SSL/TLS certificate errors
Set in `.env`:
```env
TLS_REJECT_UNAUTHORIZED=0
```
Or install certificates:
```bash
# Update certificates
brew install ca-certificates
```
### Permission denied errors
Fix npm permissions:
```bash
sudo chown -R $(whoami) ~/.npm
sudo chown -R $(whoami) /usr/local/lib/node_modules
```
### Command not found after installation
Add to PATH in `~/.zshrc` or `~/.bash_profile`:
```bash
export PATH="/usr/local/bin:$PATH"
export PATH="$HOME/.npm-global/bin:$PATH"
```
Then reload:
```bash
source ~/.zshrc # for zsh
# or
source ~/.bash_profile # for bash
```
## đ Next Steps
- [Configure SAP Connection](../CONFIGURATION.md)
- [Connect to AI Tools](../AI_TOOLS.md)
- [Available Tools](../AVAILABLE_TOOLS.md)
## đĄ Tips for macOS
### Use iTerm2
Better terminal experience:
```bash
brew install --cask iterm2
```
### Use Oh My Zsh
Enhanced shell:
```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```
### Install VS Code via Homebrew
```bash
brew install --cask visual-studio-code
```
### Use Rosetta 2 (Apple Silicon)
If you have M1/M2/M3 Mac and encounter compatibility issues:
```bash
softwareupdate --install-rosetta
```
### Check Architecture
```bash
uname -m
# arm64 = Apple Silicon
# x86_64 = Intel
```