---
title: Claude Code Setup
description: "Use AndroidAPI.net directly inside Claude Code (the CLI/IDE tool) with a single command. ## Add the Server Run this in your terminal: ``` claude mcp add androidapi -- npx -y androidapi-mcp ``` Then add your API key to `~/.claude/settings.json`: ```…"
url: "https://tecniforge.com/docs/androdiapi-net/androidapi-net-for-claude/claude-code-setup/"
updated: "2026-07-02"
category: AndrodiAPI.net / AndroidAPI.net for Claude
---

# Claude Code Setup

Use AndroidAPI.net directly inside Claude Code (the CLI/IDE tool) with a single command.

## Add the Server

Run this in your terminal:

```
claude mcp add androidapi -- npx -y androidapi-mcp
```

Then add your API key to `~/.claude/settings.json`:

```
{
  "mcpServers": {
    "androidapi": {
      "command": "npx",
      "args": ["-y", "androidapi-mcp"],
      "env": {
        "ANDROIDAPI_SECRET": "YOUR_API_KEY_HERE"
      }
    }
  }
}
```

## Or Set via Environment Variable

Add this to your shell profile (`~/.zshrc` or `~/.bashrc`):

```
export ANDROIDAPI_SECRET="your_api_key_here"
```

Then reload:

```
source ~/.zshrc
```

## Verify It Works

In a Claude Code session, ask:

> List my AndroidAPI devices

Claude will call `androidapi_get_devices` and return your connected Android devices.

## Project-Level Config

You can also add a project-level config by creating `.claude/settings.json` in your project root with the same server config. This lets each project use a different API key.

---

### Discover more from TecniForge

Subscribe to get the latest posts sent to your email.
