# How to Connect Kalen to Cursor and VS Code

> Add Kalen to Cursor or VS Code with an mcp.json entry: the server URL plus an Authorization header with your Kalen API key, then test it in chat.

Canonical: https://kalen.si/guides/connect-cursor

[Start](https://kalen.si/guides)

Updated November 23, 2026 · 3 min read

To connect Kalen to Cursor or VS Code, create an API key on the [Connect page](https://kalen.si/app/setup) and add Kalen to the editor’s MCP config file: the URL `https://kalen.si/mcp` and an `Authorization: Bearer <key>` header. Cursor reads `~/.cursor/mcp.json`, VS Code reads `.vscode/mcp.json` in your workspace. Reload the editor, open its AI chat in agent mode and ask it to check your Kalen account.

## Get a key

1. Sign in to Kalen and open the [Connect page](https://kalen.si/app/setup).
2. Create an API key. It starts with `kln_live_` and is shown once. Use one key per machine or app; you can keep up to 10 and revoke any.

## Cursor

1. Open or create `~/.cursor/mcp.json`.
2. Add Kalen, with your key in place of `<key>`:

```
{ "mcpServers": { "kalen": { "url": "https://kalen.si/mcp", "headers": { "Authorization": "Bearer <key>" } } } }
```

1. If the file already has other servers, add the `kalen` entry inside the existing `mcpServers` object.
2. Check that Kalen shows as enabled in Cursor’s MCP settings, then open the chat.

## VS Code

1. Open or create `.vscode/mcp.json` in your workspace.
2. Add Kalen, with your key in place of `<key>`:

```
{ "servers": { "kalen": { "type": "http", "url": "https://kalen.si/mcp", "headers": { "Authorization": "Bearer <key>" } } } }
```

1. Start the server from the file or the MCP view, then open the chat in agent mode.

`.vscode/mcp.json` lives in your project, so keep it out of version control or use a key you can revoke.

## Check that it works

```
Use Kalen to check my account.
```

The editor’s AI should call the `account` tool and report your plan, credits, X connection and profile. Each call is on your [Usage](https://kalen.si/app/usage) page.

## Example

An illustration, not a real account.

You: Use Kalen to check my account.

The agent calls `account` and relays Kalen’s line: your plan and balance, the X account Kalen posts as, and what’s still missing from your profile.

You: I just merged the new export feature. Write a post about it with Kalen.

The agent asks what the feature does and any number you can share, writes a draft, scores it with Kalen and shows it to you in full. It schedules only after you say yes.

## Media from the editor

No upload panel shows in an editor chat. Kalen’s `upload_media` returns a `curl` line; run it once per file in the terminal, then ask for your media list to get the ids. See [Media and video](https://kalen.si/guides/media-and-video).

## What it costs

Free to connect. Credits are spent when posts are scheduled and on paid reads from X, which ask first. See [Credits and plans](https://kalen.si/guides/credits-and-plans).

## Common errors

- **“Missing or invalid Kalen credentials” (HTTP 401).** The key is mistyped, missing “Bearer “, or revoked. Create a new one on the [Connect page](https://kalen.si/app/setup).
- **The JSON doesn’t load.** One stray comma breaks the whole file. Check that each server sits inside the top-level object.
- **The chat doesn’t call Kalen.** Use agent mode and name Kalen in your request.
- **A new tool is missing.** Restart the server or reload the window so the editor reads the tool list again.

## Next

Next: [Connect your X account](https://kalen.si/guides/connect-x).

**About this guide.** Written by the team that builds Kalen. Something didn't match what you see? Write to [support@kalen.si](mailto:support@kalen.si) and say which AI you use.

## Your X assistant, inside your AI.

 [Start your 7-day trial for $1](https://kalen.si/#pricing)
