> ## Documentation Index
> Fetch the complete documentation index at: https://nuntly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Nuntly from VS Code

> Add the Nuntly MCP server to a VS Code Local or Copilot session, keep the API key out of the repository, and send a test email from your agent.

The Nuntly MCP server (`@nuntly/sdk-mcp`) gives the VS Code agent tools to send email, manage domains and webhooks, and read and reply to inbound messages. Check the [prerequisites](https://nuntly.com/docs/guides/ai-agents.md#prerequisites) first: an API key and Node.js 20 or later.

## Set up from a one-line prompt

Paste this line into the agent, in the project you want to set up. The agent follows an install guide written for it, asks you to create the API key, sends a test email to your address, and ends with a setup report.

```text theme={null}
Download https://nuntly.com/cursor/install.md raw (`curl -fsSL` on macOS and Linux, `curl.exe -fsSL` on Windows), read the whole output, and follow it word for word to connect Nuntly to this editor.
```

To set it up yourself, follow the steps below.

## Create an API key

In the dashboard, go to **API Keys** and create a key with the **Sending only** permission, and leave **Restrict to domains** empty. Copy it. Pick **Full access** instead for an agent that manages domains, inboxes, webhooks or agent memory. See [API keys](https://nuntly.com/docs/guides/api-keys.md).

## Add the MCP server

For a Local session, [install in VS Code](https://insiders.vscode.dev/redirect/mcp/install?name=nuntly\&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22nuntly-api-key%22%2C%22description%22%3A%22Nuntly%20API%20key%22%2C%22password%22%3Atrue%7D%5D\&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nuntly%2Fsdk-mcp%402%22%5D%2C%22env%22%3A%7B%22NUNTLY_API_KEY%22%3A%22%24%7Binput%3Anuntly-api-key%7D%22%7D%7D). VS Code asks for your key when the server first starts (**MCP: List Servers**, then start `nuntly`) and stores it outside the configuration file.

If the link does not open VS Code, add the server by hand:

```json Local session (.vscode/mcp.json) theme={null}
{
  "inputs": [
    {
      "type": "promptString",
      "id": "nuntly-api-key",
      "description": "Nuntly API key",
      "password": true
    }
  ],
  "servers": {
    "nuntly": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@nuntly/sdk-mcp@2"],
      "env": {
        "NUNTLY_API_KEY": "${input:nuntly-api-key}"
      }
    }
  }
}
```

```json Copilot session (~/.copilot/mcp-config.json) theme={null}
{
  "mcpServers": {
    "nuntly": {
      "command": "npx",
      "args": ["-y", "@nuntly/sdk-mcp@2"],
      "env": {
        "NUNTLY_API_KEY": "your-api-key"
      }
    }
  }
}
```

The Local session file holds no key, so you can commit it and share the server with your team. A Copilot session reads the portable `mcpServers` format, and VS Code does not pass it a server that asks for an input. So in a Copilot session, put the entry in your user file `~/.copilot/mcp-config.json`, outside the repository, and save and close it once your key is in.

## Send a test email

Ask your agent: "Send a test email from [hello@onboarding.nuntly.com](mailto:hello@onboarding.nuntly.com) to my address." Use the email address of your Nuntly account (the organization owner), exactly as you signed up. This sender only delivers to that address.

## Troubleshooting

**The server does not start.** Run **MCP: List Servers**, select `nuntly` and open its output. On native Windows, an error that names `npx` can mean that VS Code cannot start `npx` directly: set `"command": "cmd"` and `"args": ["/c", "npx", "-y", "@nuntly/sdk-mcp@2"]`.

For errors shared by every client, such as a tool that returns `isError: true`, see [Troubleshooting](https://nuntly.com/docs/guides/ai-agents-troubleshooting.md).

## Next steps

> [card] [AI agent inboxes](https://nuntly.com/docs/guides/receiving-agents.md)
>
> Give the agent its own inbox and a memory per thread

> [card] [What an agent can do](https://nuntly.com/docs/guides/ai-agents.md#what-an-agent-can-do-and-what-stays-with-you)
>
> See which operations stay with you


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.