# Cloning SAP AI Core Documentation
The SAP AI Core documentation is hosted on GitHub as a submodule. Due to its size, the initial clone may encounter network issues.
## Quick Clone
```bash
git submodule update --init --recursive
```
## If Clone Fails
If you encounter network errors, try these alternatives:
### Option 1: Shallow Clone (Faster)
```bash
git submodule add --depth 1 https://github.com/SAP-docs/sap-artificial-intelligence.git docs/sap-artificial-intelligence
cd docs/sap-artificial-intelligence
git fetch --unshallow
cd ../..
```
### Option 2: Manual Clone
```bash
mkdir -p docs
cd docs
git clone https://github.com/SAP-docs/sap-artificial-intelligence.git
cd ..
```
### Option 3: Retry with Different Protocol
Sometimes HTTP/2 can cause issues. Try disabling it:
```bash
git config --global http.version HTTP/1.1
git submodule update --init --recursive
git config --global --unset http.version
```
### Option 4: Clone in Chunks
For very poor connections:
```bash
cd docs
git clone --depth 1 https://github.com/SAP-docs/sap-artificial-intelligence.git
cd sap-artificial-intelligence
git fetch --depth=100
git fetch --depth=500
git fetch --unshallow
cd ../..
```
## Verify Clone Success
After cloning, verify the documentation is present:
```bash
ls -la docs/sap-artificial-intelligence/
```
You should see markdown files and directories.
Check the size:
```bash
du -sh docs/sap-artificial-intelligence/
```
Expected size: Several MB to hundreds of MB depending on the repository.
## Common Issues
### HTTP/2 Stream Errors
**Error**: `error: RPC failed; curl 92 HTTP/2 stream was not closed cleanly`
**Solution**: Increase buffer size and disable HTTP/2:
```bash
git config --global http.postBuffer 524288000
git config --global http.version HTTP/1.1
```
### Connection Timeouts
**Error**: `fatal: early EOF` or timeout errors
**Solution**: Try shallow clone first, then fetch incrementally:
```bash
git clone --depth 1 https://github.com/SAP-docs/sap-artificial-intelligence.git docs/sap-artificial-intelligence
cd docs/sap-artificial-intelligence
git fetch --unshallow
```
### Disk Space
**Error**: Disk space related errors
**Solution**: Check available space:
```bash
df -h .
```
Ensure you have at least 500MB free space.
## After Successful Clone
Once cloned successfully, rebuild the MCP server to index the documentation:
```bash
npm run build
```
Then test by starting Claude Desktop and verifying the SAP AI Core documentation tools are available.
---
**Note**: The clone only needs to succeed once. After that, you can update with:
```bash
cd docs/sap-artificial-intelligence
git pull origin main
```