# Give your Cursor agent its own phone number

- **URL:** https://agentline.cloud/build/cursor
- **Runtime:** Cursor
- **Keywords:** Cursor phone number, Cursor agent voice, Cursor MCP voice calling, phone number for AI agents, AI voice API

Cursor already edits the repo. Add AgentLine and it can provision a number, place a call, and read the transcript from the same session that writes your app.

## One skill file

Point Cursor at https://agentline.cloud/skill.md or add the MCP server in ~/.cursor/mcp.json. 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 Cursor needs its own number

### MCP or skill, your choice

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

### Calls from the repo you are already in

Cursor can create the agent, buy a number, and dial as part of the same session that ships the feature.

### Cloud agents included

The same skill works in local Cursor and in Cursor cloud agents. The number follows the agent, not the laptop.

## 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 Cursor?**

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

**Where do I put the MCP config?**

~/.cursor/mcp.json, or Settings → MCP. Use the bearer header with your AgentLine API key.

**Can Cursor handle inbound calls live?**

With the persistent relay installed, live utterances reach the runtime. A public webhook is the fallback.
