npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-cursor-provider

v0.3.3

Published

OpenCode 2 plugin that connects Cursor via the official SDK

Readme

opencode-cursor-provider

Use Cursor models and the Cursor coding agent in OpenCode 2. The plugin uses the official Cursor SDK.

The Cursor coding agent can read and change your workspace. OpenCode shows Cursor reasoning and tool activity in the session.

Requirements

  • OpenCode 2
  • Node.js 22.13 or later
  • A Cursor account or a Cursor API key

Install the plugin

Run this command:

opencode2 plugin add opencode-cursor-provider

You can also add the plugin to opencode.jsonc:

{
	"plugins": ["opencode-cursor-provider"]
}

Restart OpenCode after you change the plugin configuration.

Connect Cursor

  1. Start opencode2.
  2. Run /connect.
  3. Select Cursor.
  4. Select browser login, API key, or CURSOR_API_KEY.

Browser login creates a user API key. Sign in again when the key expires.

Select a model

  1. Run /models.
  2. Select a model under Cursor.

The plugin gets the model list and the model variants from Cursor. The fallback list includes cursor/composer-2.5 and cursor/auto.

How the plugin works

  • Cursor runs its own tools and changes the workspace.
  • OpenCode shows Cursor tools as provider-executed tool calls.
  • The plugin exposes OpenCode tools to Cursor with an opencode__ prefix for each run.
  • OpenCode executes bridged tools through its normal permissions, hooks, and MCP connections.
  • The plugin keeps one Cursor agent for each OpenCode session.
  • The plugin starts a new Cursor agent after a model, directory, mode, conversation, or Cursor agent option change.
  • OpenCode cancellation stops the active Cursor run.
  • You can set Cursor plan mode with providerOptions.cursor.mode.

The provider supports these Cursor agent options:

providerOptions: {
	cursor: {
		mode: "plan",
		tools: ["read", "grep"],
		disallowedTools: ["shell"],
		sandboxOptions: { enabled: true },
		autoReview: true,
		settingSources: ["project", "team"],
	},
}

The tools and disallowedTools options apply only to Cursor tools. OpenCode controls its bridged tools separately.

Because Cursor settings can load MCP servers, select only settings layers that you trust.

Current limits

  • The plugin supports text and local image input. It supports text output.
  • The plugin rejects image URLs and non-image file input. It does not discard the input.
  • The plugin rejects structured output requests.
  • The plugin rejects explicit tool choice.
  • Tool bridging requires an OpenCode session. One-shot model calls cannot use OpenCode tools.
  • OpenCode sampling settings do not change Cursor model parameters. The plugin reports those settings as unsupported.
  • Cursor controls tool access and tool approval for its tools.
  • OpenCode controls permission checks for bridged OpenCode tools.
  • The plugin does not accept user-defined Cursor custom tools, extra workspace roots, or a replacement system prompt.

Credentials

OpenCode stores the Cursor credentials. The plugin does not write ~/.cursor/sdk/auth.json.

You can set CURSOR_API_KEY when you do not want to store a connection in OpenCode.

Develop the plugin

Install the dependencies:

bun install

Run the checks:

bun test
bun run typecheck
bun run build

The source code is in src/. The build writes the package files to dist/.

Release

Releases use Release Please with conventional commits (feat:, fix:, docs:, …). Merging to main opens or updates a release PR. Merging that PR tags a GitHub release and publishes to npm.

Configure an npm trusted publisher with these values:

  • Organization or user: pragmaticivan
  • Repository: opencode-cursor-provider
  • Workflow filename: release-please.yml
  • Allowed action: npm publish

The workflow uses OpenID Connect and does not need an npm token.

License

Apache License 2.0. See LICENSE.