Skip to main content

Cursor SDK vs Continue.dev (2026)

·PkgPulse Team
0

TL;DR

Cursor is an AI-first IDE (closed, VS Code fork) — you integrate with it through VS Code Extension API or .cursorrules files, not an npm SDK. Continue.dev is the open-source equivalent with actual npm packages (@continuedev/core) for building custom AI coding assistants. For adding AI coding features to a custom IDE: Continue.dev. For VS Code extensions that leverage Cursor users: standard VS Code Extension API + Cursor context.

Key Takeaways

  • Cursor: AI-first VS Code fork, no public SDK — integrate via .cursorrules, VS Code extension API, and MCP
  • Continue.dev: OSS VS Code/JetBrains extension, @continuedev/core npm package for custom integrations
  • MCP (Model Context Protocol): The 2026 standard for giving AI context from your tools
  • For npm package authors: Add Cursor/Copilot-friendly JSDoc, .cursorrules, and MCP server
  • Custom AI coding tools: Continue.dev + custom context providers > trying to extend Cursor

Downloads

PackageWeekly DownloadsTrend
@continuedev/core~50K↑ Growing
@modelcontextprotocol/sdk~200K↑ Fast growing

Cursor Integration: What's Actually Possible

Cursor integration surface area (2026):

1. .cursorrules file (project-level AI instructions):
   → Custom coding standards
   → Library/framework preferences
   → Code style guidelines
   → No npm package needed

2. VS Code Extension API:
   → Cursor is a VS Code fork — most VS Code extensions work
   → Use standard vscode module for LSP, diagnostics, commands
   → Cursor-specific: Cursor Tab (AI autocomplete) reads context from open files

3. MCP (Model Context Protocol):
   → Add Cursor → Settings → MCP servers
   → Your MCP server provides context/tools to Cursor's AI
   → This is the REAL way to integrate custom data sources with Cursor

4. No public Cursor SDK (as of 2026):
   → Cursor team has not published an npm package for external integration
   → Integration is through VS Code Extension API + MCP
# .cursorrules — project AI instructions (no npm needed):
# Place at project root or .cursor/rules/

You are an expert TypeScript developer working on a Next.js 15 App Router project.

## Stack
- Next.js 15 with App Router
- TypeScript strict mode
- Drizzle ORM with PostgreSQL
- shadcn/ui components
- Tailwind CSS v4

## Code Style
- Prefer Server Components by default, add 'use client' only when needed
- Use `async/await`, never `.then()` callbacks
- Import paths: use @/ alias for src/ directory
- Zod for all external data validation
- drizzle-kit for migrations, never raw SQL migrations

## Patterns
- API routes: /app/api/[route]/route.ts
- Server Actions: colocate with component in actions.ts
- Error handling: use Result type pattern, never throw in Server Components

Continue.dev: Open Source AI Coding Extension

# Install Continue.dev VS Code extension, then optionally use npm packages:
npm install @continuedev/core  # For custom integrations
// Custom context provider for Continue.dev:
// (Add to .continue/config.ts in your project)
import type { IdeSettings, ContextProviderDescription } from '@continuedev/core';

// Custom context provider — adds your docs/codebase context:
export const myContextProvider = {
  title: 'myDocs',
  displayTitle: 'My Library Docs',
  description: 'Documentation for our internal library',
  type: 'query' as const,
  
  async getContextItems(query: string, extras: any) {
    // Fetch relevant docs based on query:
    const docs = await searchDocs(query);
    return docs.map(doc => ({
      name: doc.title,
      description: doc.description,
      content: doc.content,
    }));
  },
};
// .continue/config.json — project-level Continue config:
{
  "models": [
    {
      "title": "Claude Sonnet",
      "provider": "anthropic",
      "model": "claude-sonnet-4-5",
      "apiKey": "$ANTHROPIC_API_KEY"
    },
    {
      "title": "GPT-4o",
      "provider": "openai",
      "model": "gpt-4o",
      "apiKey": "$OPENAI_API_KEY"
    }
  ],
  "contextProviders": [
    { "name": "code" },
    { "name": "docs" },
    { "name": "terminal" },
    { "name": "diff" }
  ],
  "slashCommands": [
    {
      "name": "test",
      "description": "Write unit tests for highlighted code",
      "step": "WriteTestsStep"
    }
  ]
}

MCP: The Real Integration Standard

// Build an MCP server that works with BOTH Cursor and Continue.dev:
// (And Claude Desktop, any MCP-compatible AI tool)

import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';

const server = new Server(
  { name: 'my-dev-tools', version: '1.0.0' },
  { capabilities: { tools: {} } }
);

// Tool: search your codebase/docs for AI context
server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [
    {
      name: 'search_codebase',
      description: 'Search the codebase for relevant code snippets',
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string', description: 'Search query' },
          language: { type: 'string', description: 'Filter by language' },
        },
        required: ['query'],
      },
    },
    {
      name: 'get_component_docs',
      description: 'Get documentation for a specific component',
      inputSchema: {
        type: 'object',
        properties: { componentName: { type: 'string' } },
        required: ['componentName'],
      },
    },
  ],
}));

server.setRequestHandler(CallToolRequestSchema, async (request) => {
  if (request.params.name === 'search_codebase') {
    const results = await searchCodebase(request.params.arguments.query);
    return { content: [{ type: 'text', text: JSON.stringify(results) }] };
  }
  if (request.params.name === 'get_component_docs') {
    const docs = await getComponentDocs(request.params.arguments.componentName);
    return { content: [{ type: 'text', text: docs }] };
  }
  throw new Error('Unknown tool');
});

const transport = new StdioServerTransport();
await server.connect(transport);
// Add to Cursor Settings (claude_desktop_config.json equivalent for Cursor):
{
  "mcpServers": {
    "my-dev-tools": {
      "command": "node",
      "args": ["/path/to/mcp-server.js"]
    }
  }
}

Making npm Packages AI-Friendly

// Best practices for npm package authors in 2026:

// 1. Rich JSDoc — AI tools read these:
/**
 * Creates a new user in the database.
 * @param email - Must be a valid email address
 * @param name - Display name, 2-100 characters
 * @param options.role - Defaults to 'user'. Use 'admin' for full access.
 * @example
 * const user = await createUser('alice@example.com', 'Alice', { role: 'admin' });
 */
export async function createUser(email: string, name: string, options?: CreateUserOptions): Promise<User>

// 2. .cursorrules at package root (for monorepos):
// Uses the package correctly out of the box

// 3. llms.txt at your docs site:
// Structured docs format AI tools can consume
// https://yourlibrary.dev/llms.txt

// 4. TypeScript types — AI autocomplete uses these for suggestions

Decision Guide

Build a Cursor integration if:
  → .cursorrules file for project conventions (free, no code)
  → VS Code extension that works in Cursor (standard extension API)
  → MCP server for providing your tool's data/context to AI

Use Continue.dev if:
  → Want open source, self-hosted AI coding assistant
  → Need custom context providers (internal docs, APIs)
  → Team uses VS Code or JetBrains

Build with @continuedev/core if:
  → Building a custom AI coding tool or extension
  → Need programmatic access to Continue's capabilities

The 2026 AI dev tools stack:
  → Cursor or Continue.dev (the AI IDE layer)
  → MCP servers (your custom context/tools)
  → .cursorrules (project conventions)
  → Good TypeScript types and JSDoc (AI autocomplete)

Compare AI coding tool packages on PkgPulse.

The 2026 JavaScript Stack Cheatsheet

One PDF: the best package for every category (ORMs, bundlers, auth, testing, state management). Used by 500+ devs. Free, updated monthly.