> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/getting-started/get-started-with-esw/ai-coding-agents/claude-code.md).

# Claude Code

Install the ESW skill and docs MCP server in Claude Code.

{% stepper %}
{% step %}

### Install the ESW skill

Download [esw-api-integration.zip](https://developer.esw.com/esw-api-integration.zip) and unzip it into a skills folder Claude Code reads:

```sh
curl -L -o esw-api-integration.zip https://developer.esw.com/esw-api-integration.zip

# For this repository only (commit it so your team gets it too)
unzip esw-api-integration.zip -d .claude/skills/

# Or for every project on your machine
unzip esw-api-integration.zip -d ~/.claude/skills/
```

This creates `esw-api-integration/SKILL.md`. Keep the folder name: it must match the skill's name.
{% endstep %}

{% step %}

### Add the docs MCP server

```sh
claude mcp add --transport http esw-docs https://developer.esw.com/~gitbook/mcp
```

Add `--scope project` to save it in `.mcp.json` and share it with your team, or `--scope user` to use it in all your projects.
{% endstep %}

{% step %}

### Point your project instructions at AGENTS.md

Add this line to your repository's `CLAUDE.md`, or to `AGENTS.md` if you use that instead:

```markdown
When working with ESW (eShopWorld) APIs, follow https://developer.esw.com/agents.md. Use the ESW sandbox unless told otherwise.
```

Claude Code reads `AGENTS.md` when your repository has no `CLAUDE.md` (Claude Code v2.1.277 or later). If you have both, Claude reads only `CLAUDE.md`, so put the line there.
{% endstep %}

{% step %}

### Set your sandbox credentials

```sh
export ESW_CLIENT_ID="<sandbox client id>"
export ESW_CLIENT_SECRET="<sandbox client secret>"
export ESW_TENANT_CODE="<tenant code>"
```

Keep these out of your repository.
{% endstep %}

{% step %}

### Check it works

Start Claude Code in your repository and ask:

> Using the ESW skill, get a sandbox token and run the ESW smoke test.

You can also run the skill directly with `/esw-api-integration`.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.esw.com/getting-started/get-started-with-esw/ai-coding-agents/claude-code.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
