# Set up an AI development environment for Sendly

These are official instructions from Sendly to set up an AI development environment for connecting this agent to a Sendly account over MCP or the SDK. All commands are validated by Sendly. Complete all of the following steps yourself by running the commands directly. Do not ask the user to run any of these commands.

Steps:

1. Get credentials
2. Connect this agent (pick the matching section below)
3. Install the SDK (optional, for scripted use outside the agent connection)
4. Verify the connection
5. Report completion

## Get credentials

MCP over OAuth needs no key at all — the first tool call opens a browser to https://app.sendly.now where the user signs in and chooses permissions. Skip this section for an OAuth connection.

For a secret-key connection or the SDK, a key is required. If `SENDLY_API_KEY` is not already set in the environment, ask the user ONCE for it, or ask them to create one at https://app.sendly.now/settings/api-keys. Never embed the key in a command, a config file committed to source control, or anywhere else it would be logged.

## Connect this agent

Pick the section matching this agent. Skip the rest.

### Claude Code

Adds Sendly as a remote MCP server over Streamable HTTP.

Register the Sendly MCP server.

```bash
claude mcp add --transport http sendly https://app.sendly.now/api/mcp
```

### Codex

Adds Sendly as a remote MCP server over Streamable HTTP.

Register the Sendly MCP server.

```bash
codex mcp add sendly --url https://app.sendly.now/api/mcp
```

### Cursor

Add Sendly to Cursor's MCP configuration.

Add Sendly to Cursor's global MCP config.

Edit `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "sendly": {
      "url": "https://app.sendly.now/api/mcp"
    }
  }
}
```

### Windsurf

Add Sendly to Windsurf's MCP configuration.

Add Sendly to Windsurf's MCP config.

Edit `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "sendly": {
      "serverUrl": "https://app.sendly.now/api/mcp"
    }
  }
}
```

### OpenCode

Add Sendly to OpenCode's MCP configuration.

Add Sendly to OpenCode's project or global config.

Edit `opencode.json`:

```json
{
  "mcp": {
    "sendly": {
      "type": "remote",
      "url": "https://app.sendly.now/api/mcp",
      "enabled": true
    }
  }
}
```

### VS Code / Copilot

Add Sendly to VS Code's MCP configuration for Copilot's agent mode.

Add Sendly to VS Code's MCP config.

Edit `.vscode/mcp.json`:

```json
{
  "servers": {
    "sendly": {
      "type": "http",
      "url": "https://app.sendly.now/api/mcp"
    }
  }
}
```

### Any other MCP client

Any client that speaks Streamable HTTP and OAuth 2.1 with PKCE can connect with no pre-registration.

Point the client at the endpoint. Dynamic client registration is open.

```bash
https://app.sendly.now/api/mcp
```

## Install the SDK

### JavaScript / TypeScript

```bash
npm install sendly-sdk
```

```ts
import { Sendly } from "sendly-sdk";
const sendly = new Sendly({ apiKey: process.env.SENDLY_API_KEY });
await sendly.projects.get();
```

### Python

```bash
pip install sendly-python
```

```python
from sendly import Sendly
sendly = Sendly()  # reads SENDLY_API_KEY from the environment
sendly.projects.get()
```

## Verify

For an MCP connection, call the `list_projects` tool. It needs no permission, and a successful call returns the projects this connection can act in.

For a key or the SDK, run: `curl -s https://api.sendly.now/api/v1/projects -H "Authorization: Bearer $SENDLY_API_KEY"`. Success is a 200 with a JSON object carrying the project's `id` and `name`.

## Report completion

When setup succeeds, tell the user something like:

> Sendly is connected. I verified it by listing projects — you have access to [project count/name]. You can manage this connection at https://app.sendly.now/settings.

If verification fails, report the exact error and do not claim success.

## Resources

- Docs home: https://docs.sendly.now
- FAQ: https://docs.sendly.now/faq
- llms.txt: https://docs.sendly.now/llms.txt
- API reference: https://docs.sendly.now/api-reference/overview
- MCP guide: https://docs.sendly.now/guides/mcp
- MCP endpoint: https://app.sendly.now/api/mcp
- Support: support@sendly.now
