# Voice for your Claude Code agent

- **URL:** https://agentline.cloud/build/claude-code
- **Runtime:** Claude Code
- **Keywords:** Claude Code phone number, Claude Code voice agent, AI voice API, phone number for AI agents, MCP voice calling

Claude Code already runs terminal tools. Add AgentLine and it can provision a number, place a call, and read the transcript without you wiring WebSockets.

## One skill file

Point Claude Code at https://agentline.cloud/skill.md or connect the MCP server. After AGENTLINE_API_KEY is set, 'call this number' is a normal tool use.

```
Get yourself a phone number and call me. Follow https://agentline.cloud/skill.md
```

## Why Claude Code needs its own number

### MCP or skill, your choice

Use the skill file for Claude Code, or https://api.agentline.cloud/mcp with a bearer header. Same API underneath.

### Calls from the repo you are already in

Claude Code can create the agent, buy a number, and dial as part of the same session that writes your app.

### Templates included

Open any template on this site and paste the prompt. Claude Code will apply it to a new AgentLine agent.

## Python

```python
from agentline import AgentLine

client = AgentLine(api_key="al_live_...")

agent = client.agents.create(
    name="Voice Agent",
    system_prompt="You are a helpful voice agent. Keep spoken turns under 15 words.",
    initial_greeting="Hey, this is your agent. How can I help?",
    voice_id="female-1",
)

number = client.numbers.buy(agent_id=agent.id, country="US", area_code="415")
call = client.calls.create(agent_id=agent.id, to="+14155557890")
print("Number:", number)
print("Call:", call)
```

## Node.js

```ts
import AgentLine from "agentline";

const client = new AgentLine({ apiKey: "al_live_..." });

const agent = await client.agents.create({
  name: "Voice Agent",
  systemPrompt: "You are a helpful voice agent. Keep spoken turns under 15 words.",
  initialGreeting: "Hey, this is your agent. How can I help?",
  voiceId: "female-1",
});

const number = await client.numbers.buy({
  agentId: agent.id,
  country: "US",
  areaCode: "415",
});
const call = await client.calls.create({
  agentId: agent.id,
  to: "+14155557890",
});
console.log("Number:", number);
console.log("Call:", call);
```

## FAQ

**Does AgentLine work with Claude Code?**

Yes. Add the skill or the MCP server, set AGENTLINE_API_KEY, and ask Claude Code to buy a number and call you.

**What does the MCP server expose?**

Twenty-plus tools: create_agent, buy numbers, make_outbound_call, push_call_context, transcripts, webhooks, and billing.

**Can I use the SDK alongside MCP?**

Yes. MCP is conversational access. The Python and Node SDKs are for production services Claude Code might generate.
