Skip to content

Context7 Platform -- Up-to-date docs for AI agents

CTX7-3113: fix(cursor-plugin): add Cursor plugin and marketplace manifests (#3382)

Ramazan Onur Acar33414e6e3fc1
diff --git a/.cursor-plugin/marketplace.json b/.cursor-plugin/marketplace.json
new file mode 100644
index 00000000..ca335074
--- /dev/null
+++ b/.cursor-plugin/marketplace.json
@@ -0,0 +1,16 @@
+{
+ "name": "context7-marketplace",
+ "owner": {
+ "name": "Upstash"
+ },
+ "metadata": {
+ "description": "Context7 plugins for coding agents."
+ },
+ "plugins": [
+ {
+ "name": "context7",
+ "source": "./plugins/cursor/context7",
+ "description": "Up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context."
+ }
+ ]
+}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 502f40fb..29bd0651 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -5,6 +5,8 @@ on:
paths:
- "packages/**"
- "plugins/**"
+ - ".cursor-plugin/**"
+ - ".claude-plugin/**"
- "skills/**"
- "rules/**"
- "package.json"
diff --git a/.gitignore b/.gitignore
index c0aad441..455f3f7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -172,7 +172,6 @@ dist
.idea
.cursor
-!plugins/cursor/context7/.cursor
.opencode
.claude
diff --git a/packages/cli/package.json b/packages/cli/package.json
index fdb7146d..fe43d52f 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -37,6 +37,8 @@
"@types/node": "catalog:",
"@typescript-eslint/eslint-plugin": "catalog:",
"@typescript-eslint/parser": "catalog:",
+ "ajv": "^8.20.0",
+ "ajv-formats": "^3.0.1",
"eslint": "catalog:",
"eslint-plugin-prettier": "catalog:",
"prettier": "catalog:",
diff --git a/packages/cli/src/__tests__/fixtures/cursor/marketplace.schema.json b/packages/cli/src/__tests__/fixtures/cursor/marketplace.schema.json
new file mode 100644
index 00000000..350720da
--- /dev/null
+++ b/packages/cli/src/__tests__/fixtures/cursor/marketplace.schema.json
@@ -0,0 +1,112 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "https://cursor.com/schemas/cursor-plugin/marketplace.json",
+ "title": "Cursor Plugin Marketplace",
+ "description": "Schema for .cursor-plugin/marketplace.json — defines a marketplace that indexes one or more Cursor plugins.",
+ "type": "object",
+ "required": ["name", "plugins"],
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "description": "Unique identifier for the marketplace."
+ },
+ "owner": {
+ "$ref": "#/$defs/owner",
+ "description": "The marketplace owner or organisation."
+ },
+ "metadata": {
+ "type": "object",
+ "additionalProperties": true,
+ "properties": {
+ "description": {
+ "type": "string",
+ "description": "Short description of the marketplace."
+ }
+ },
+ "description": "Arbitrary metadata about the marketplace."
+ },
+ "plugins": {
+ "type": "array",
+ "items": { "$ref": "#/$defs/pluginEntry" },
+ "description": "List of plugins available in the marketplace."
+ }
+ },
+ "$defs": {
+ "owner": {
+ "type": "object",
+ "required": ["name"],
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "description": "Owner or organisation name."
+ },
+ "email": {
+ "type": "string",
+ "format": "email",
+ "description": "Contact email address."
+ }
+ }
+ },
+ "pluginEntry": {
+ "type": "object",
+ "required": ["name", "source"],
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "pattern": "^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$",
+ "description": "Plugin identifier matching the plugin's name in its plugin.json."
+ },
+ "source": {
+ "type": "string",
+ "minLength": 1,
+ "description": "Path to the plugin directory (relative to the marketplace root) or a remote URL."
+ },
+ "description": {
+ "type": "string",
+ "description": "Short description of the plugin."
+ },
+ "minClientVersions": {
+ "$ref": "#/$defs/minClientVersions",
+ "description": "Minimum client versions required to install the plugin, keyed by client identifier."
+ }
+ }
+ },
+ "minClientVersions": {
+ "type": "object",
+ "minProperties": 1,
+ "properties": {
+ "cursor": {
+ "$ref": "#/$defs/clientVersionRequirement",
+ "description": "Minimum Cursor version required to install the plugin (e.g. \"3.13.0\"), or \"never\" to hide it from Cursor entirely."
+ },
+ "grokbot": {
+ "$ref": "#/$defs/clientVersionRequirement",
+ "description": "Minimum Grok Bot version required to install the plugin (e.g. \"0.49.0\"), or \"never\" to hide it from Grok Bot entirely."
+ },
+ "sand": {
+ "$ref": "#/$defs/clientVersionRequirement",
+ "description": "Deprecated client id for Grok Bot. Same meaning as grokbot."
+ }
+ },
+ "additionalProperties": {
+ "$ref": "#/$defs/clientVersionRequirement",
+ "description": "Minimum version required for another client identifier, or \"never\" to hide the plugin from that client."
+ }
+ },
+ "clientVersionRequirement": {
+ "description": "A minimum semantic version, or the literal \"never\" when that client must not list or install the plugin.",
+ "oneOf": [{ "$ref": "#/$defs/semver" }, { "const": "never" }]
+ },
+ "semver": {
+ "type": "string",
+ "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?$",
+ "description": "Strict semantic version \"X.Y.Z\" with an optional prerelease suffix."
+ }
+ }
+}
diff --git a/packages/cli/src/__tests__/fixtures/cursor/plugin.schema.json b/packages/cli/src/__tests__/fixtures/cursor/plugin.schema.json
new file mode 100644
index 00000000..5e39e061
--- /dev/null
+++ b/packages/cli/src/__tests__/fixtures/cursor/plugin.schema.json
@@ -0,0 +1,187 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "https://cursor.com/schemas/cursor-plugin/plugin.json",
+ "title": "Cursor Plugin Manifest",
+ "description": "Schema for .cursor-plugin/plugin.json — defines a single Cursor plugin's metadata, components, and configuration.",
+ "type": "object",
+ "required": ["name"],
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "pattern": "^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$",
+ "description": "Unique plugin identifier in kebab-case (lowercase alphanumeric with hyphens and periods)."
+ },
+ "displayName": {
+ "type": "string",
+ "description": "Human-readable display name for the plugin."
+ },
+ "description": {
+ "type": "string",
+ "description": "Short description of what the plugin does."
+ },
+ "version": {
+ "type": "string",
+ "description": "Semantic version of the plugin (e.g. \"1.2.3\")."
+ },
+ "minClientVersions": {
+ "$ref": "#/$defs/minClientVersions",
+ "description": "Minimum client versions required to install the plugin, keyed by client identifier."
+ },
+ "author": {
+ "$ref": "#/$defs/author",
+ "description": "The plugin author."
+ },
+ "publisher": {
+ "type": "string",
+ "minLength": 1,
+ "description": "Publisher or organisation name."
+ },
+ "homepage": {
+ "type": "string",
+ "format": "uri",
+ "description": "URL to the plugin's homepage."
+ },
+ "repository": {
+ "type": "string",
+ "format": "uri",
+ "description": "URL to the plugin's source code repository."
+ },
+ "license": {
+ "type": "string",
+ "description": "SPDX license identifier (e.g. \"MIT\", \"Apache-2.0\")."
+ },
+ "logo": {
+ "type": "string",
+ "description": "Path to a logo image (relative to the plugin root) or an absolute URL."
+ },
+ "keywords": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Keywords for discovery and search."
+ },
+ "category": {
+ "type": "string",
+ "description": "Plugin category for marketplace classification."
+ },
+ "tags": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Tags for filtering and discovery."
+ },
+ "commands": {
+ "$ref": "#/$defs/stringOrStringArray",
+ "description": "Glob pattern(s) or path(s) to command files."
+ },
+ "agents": {
+ "$ref": "#/$defs/stringOrStringArray",
+ "description": "Glob pattern(s) or path(s) to agent definition files."
+ },
+ "skills": {
+ "$ref": "#/$defs/stringOrStringArray",
+ "description": "Glob pattern(s) or path(s) to skill files."
+ },
+ "rules": {
+ "$ref": "#/$defs/stringOrStringArray",
+ "description": "Glob pattern(s) or path(s) to rule files."
+ },
+ "hooks": {
+ "oneOf": [{ "type": "string" }, { "type": "object" }],
+ "description": "Path to a hooks configuration file, or an inline hooks object."
+ },
+ "variables": {
+ "type": "object",
+ "required": ["type"],
+ "properties": {
+ "type": {
+ "const": "object"
+ },
+ "properties": {
+ "type": "object"
+ },
+ "required": {
+ "type": "array",
+ "items": { "type": "string" },
+ "uniqueItems": true
+ }
+ },
+ "description": "JSON Schema for user-configured plugin variables."
+ },
+ "mcpServers": {
+ "$ref": "#/$defs/mcpServers",
+ "description": "MCP server configuration — a path, an inline config object, or an array of either."
+ }
+ },
+ "$defs": {
+ "author": {
+ "type": "object",
+ "required": ["name"],
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "type": "string",
+ "minLength": 1,
+ "description": "Author name."
+ },
+ "email": {
+ "type": "string",
+ "format": "email",
+ "description": "Author email address."
+ }
+ }
+ },
+ "minClientVersions": {
+ "type": "object",
+ "minProperties": 1,
+ "properties": {
+ "cursor": {
+ "$ref": "#/$defs/clientVersionRequirement",
+ "description": "Minimum Cursor version required to install the plugin (e.g. \"3.13.0\"), or \"never\" to hide it from Cursor entirely."
+ },
+ "grokbot": {
+ "$ref": "#/$defs/clientVersionRequirement",
+ "description": "Minimum Grok Bot version required to install the plugin (e.g. \"0.49.0\"), or \"never\" to hide it from Grok Bot entirely."
+ },
+ "sand": {
+ "$ref": "#/$defs/clientVersionRequirement",
+ "description": "Deprecated client id for Grok Bot. Same meaning as grokbot."
+ }
+ },
+ "additionalProperties": {
+ "$ref": "#/$defs/clientVersionRequirement",
+ "description": "Minimum version required for another client identifier, or \"never\" to hide the plugin from that client."
+ }
+ },
+ "clientVersionRequirement": {
+ "description": "A minimum semantic version, or the literal \"never\" when that client must not list or install the plugin.",
+ "oneOf": [{ "$ref": "#/$defs/semver" }, { "const": "never" }]
+ },
+ "semver": {
+ "type": "string",
+ "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?$",
+ "description": "Strict semantic version \"X.Y.Z\" with an optional prerelease suffix."
+ },
+ "stringOrStringArray": {
+ "oneOf": [
+ { "type": "string" },
+ {
+ "type": "array",
+ "items": { "type": "string" }
+ }
+ ]
+ },
+ "mcpServers": {
+ "oneOf": [
+ { "type": "string" },
+ { "type": "object" },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [{ "type": "string" }, { "type": "object" }]
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/cli/src/__tests__/plugin-manifests.test.ts b/packages/cli/src/__tests__/plugin-manifests.test.ts
index f72740b0..45986cae 100644
--- a/packages/cli/src/__tests__/plugin-manifests.test.ts
+++ b/packages/cli/src/__tests__/plugin-manifests.test.ts
@@ -1,8 +1,75 @@
import { describe, test, expect } from "vitest";
-import { access, readdir, readFile } from "fs/promises";
-import { join } from "path";
+import { access, readdir, readFile, stat } from "fs/promises";
+import { basename, extname, isAbsolute, join } from "path";
+import Ajv from "ajv";
+import addFormats from "ajv-formats";
const REPO_ROOT = join(import.meta.dirname, "..", "..", "..", "..");
+const CURSOR_PLUGIN = "plugins/cursor/context7";
+const CURSOR_SCHEMAS = join(import.meta.dirname, "fixtures", "cursor");
+
+const KEBAB_CASE = /^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$/;
+const MARKDOWN = [".md", ".mdc", ".markdown"];
+
+async function readJson<T>(relPath: string): Promise<T> {
+ return JSON.parse(await readFile(join(REPO_ROOT, relPath), "utf-8")) as T;
+}
+
+// Vendored copies of github.com/cursor/plugins/schemas/*.schema.json (draft-07).
+// Validating offline keeps CI deterministic; refresh the fixtures when Cursor
+// changes the format.
+async function validator(schemaFile: string) {
+ const schema = JSON.parse(await readFile(join(CURSOR_SCHEMAS, schemaFile), "utf-8"));
+ const ajv = new Ajv({ allErrors: true, strict: true });
+ addFormats(ajv);
+ return ajv.compile(schema);
+}
+
+// Cursor's parser ships only `name` and `description`; a YAML dependency would
+// be overkill for single-line `key: value` frontmatter.
+function frontmatter(file: string, content: string): Record<string, string> {
+ const block = content.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/);
+ expect(block, `${file} should start with a YAML frontmatter block`).not.toBeNull();
+ const fields: Record<string, string> = {};
+ for (const line of block![1].split(/\r?\n/)) {
+ const separator = line.indexOf(":");
+ if (separator > 0) {
+ fields[line.slice(0, separator).trim()] = line.slice(separator + 1).trim();
+ }
+ }
+ return fields;
+}
+
+// Cursor's submission checklist: "All paths in manifest are relative and valid
+// (no `..`, no absolute paths)".
+function expectRelative(field: string, value: string) {
+ expect(isAbsolute(value), `${field} must be relative: ${value}`).toBe(false);
+ expect(value.split(/[\\/]/), `${field} must not escape the plugin: ${value}`).not.toContain("..");
+}
+
+interface CursorManifest {
+ name: string;
+ version?: string;
+ logo?: string;
+ skills?: string;
+ rules?: string;
+ agents?: string;
+ commands?: string;
+ hooks?: string | object;
+ mcpServers?: string | object;
+}
+
+interface CursorMarketplace {
+ name: string;
+ owner: { name: string };
+ metadata?: { description?: string };
+ plugins: { name: string; source: string; description?: string }[];
+}
+
+interface ClaudeMarketplace {
+ name: string;
+ owner: { name: string };
+}
describe("plugin MCP manifests", () => {
test("Claude sends no Authorization header so OAuth can run", async () => {
@@ -27,28 +94,181 @@ describe("plugin MCP manifests", () => {
});
});
- test("Cursor plugin names a skill it actually ships", async () => {
- const relPath = "plugins/cursor/context7/rules/use-context7.mdc";
+ test("Cursor uses the mcpServers map with an explicit http transport", async () => {
+ // Cursor plugins read `{ mcpServers: { name: {...} } }` like the Claude
+ // plugin, not the bare `{ name: {...} }` shape the plugin shipped with.
+ // The OAuth endpoint is the one Cursor keys the token on; changing it
+ // makes every installed user sign in again, so pin it.
+ const config = await readJson<Record<string, unknown>>(`${CURSOR_PLUGIN}/mcp.json`);
+ expect(config).toEqual({
+ mcpServers: {
+ context7: {
+ type: "http",
+ url: "https://mcp.context7.com/mcp/oauth",
+ },
+ },
+ });
+ });
+});
+
+describe("Cursor plugin manifest", () => {
+ const manifestPath = `${CURSOR_PLUGIN}/.cursor-plugin/plugin.json`;
+
+ test("lives at .cursor-plugin/plugin.json", async () => {
+ // Cursor only recognises `.cursor-plugin/plugin.json`; the original plugin
+ // (#1659) used `.cursor/plugin.json`, which Cursor ignores entirely.
+ await expect(access(join(REPO_ROOT, manifestPath))).resolves.toBeUndefined();
+ });
+
+ test("validates against Cursor's plugin.schema.json", async () => {
+ const validate = await validator("plugin.schema.json");
+ const manifest = await readJson<CursorManifest>(manifestPath);
+ expect(validate(manifest), JSON.stringify(validate.errors, null, 2)).toBe(true);
+ expect(manifest.name).toBe("context7");
+ });
+
+ test("declared component paths are relative and resolve inside the plugin", async () => {
+ const manifest = await readJson<CursorManifest>(manifestPath);
+ const pathFields = [
+ "logo",
+ "skills",
+ "rules",
+ "agents",
+ "commands",
+ "hooks",
+ "mcpServers",
+ ] as const;
+
+ for (const field of pathFields) {
+ const value = manifest[field];
+ if (typeof value !== "string") continue;
+ expectRelative(field, value);
+ await expect(
+ access(join(REPO_ROOT, CURSOR_PLUGIN, value)),
+ `${field} points at a missing path: ${value}`
+ ).resolves.toBeUndefined();
+ }
+
+ // The marketplace listing should install the whole plugin, not just MCP.
+ expect(manifest.skills).toBeDefined();
+ expect(manifest.rules).toBeDefined();
+ expect(manifest.agents).toBeDefined();
+ expect(manifest.mcpServers).toBe("./mcp.json");
+ });
+
+ test("logo is committed to the repo and referenced by relative path", async () => {
+ // Cursor resolves relative logo paths to raw.githubusercontent.com; an
+ // external URL is accepted by the schema but fails the submission checklist.
+ const manifest = await readJson<CursorManifest>(manifestPath);
+ expect(manifest.logo).toBeDefined();
+ expect(manifest.logo).not.toMatch(/^https?:\/\//);
+ const size = (await stat(join(REPO_ROOT, CURSOR_PLUGIN, manifest.logo!))).size;
+ expect(size).toBeGreaterThan(0);
+ });
+});
+
+describe("Cursor plugin components", () => {
+ // Mirrors the discovery rules in cursor.com/docs/reference/plugins and the
+ // `review-plugin-submission` checklist in github.com/cursor/plugins.
+ test("every skill directory has a SKILL.md with name and description", async () => {
+ const manifest = await readJson<CursorManifest>(`${CURSOR_PLUGIN}/.cursor-plugin/plugin.json`);
+ const dir = join(REPO_ROOT, CURSOR_PLUGIN, manifest.skills ?? "skills");
+ const entries = await readdir(dir);
+ expect(entries.length).toBeGreaterThan(0);
+
+ for (const entry of entries) {
+ const file = join(dir, entry, "SKILL.md");
+ const fields = frontmatter(file, await readFile(file, "utf-8"));
+ expect(fields.name, `${file} name`).toBe(entry);
+ expect(fields.name).toMatch(KEBAB_CASE);
+ expect(fields.description, `${file} description`).toBeTruthy();
+ }
+ });
+
+ test("every rule has frontmatter with a description", async () => {
+ const manifest = await readJson<CursorManifest>(`${CURSOR_PLUGIN}/.cursor-plugin/plugin.json`);
+ const dir = join(REPO_ROOT, CURSOR_PLUGIN, manifest.rules ?? "rules");
+ const files = (await readdir(dir)).filter((f) => MARKDOWN.includes(extname(f)));
+ expect(files.length).toBeGreaterThan(0);
+
+ for (const name of files) {
+ const file = join(dir, name);
+ const fields = frontmatter(file, await readFile(file, "utf-8"));
+ expect(fields.description, `${file} description`).toBeTruthy();
+ if ("alwaysApply" in fields) {
+ expect(["true", "false"], `${file} alwaysApply`).toContain(fields.alwaysApply);
+ }
+ }
+ });
+
+ test("every agent has frontmatter with name and description", async () => {
+ const manifest = await readJson<CursorManifest>(`${CURSOR_PLUGIN}/.cursor-plugin/plugin.json`);
+ const dir = join(REPO_ROOT, CURSOR_PLUGIN, manifest.agents ?? "agents");
+ const files = (await readdir(dir)).filter((f) => MARKDOWN.includes(extname(f)));
+ expect(files.length).toBeGreaterThan(0);
+
+ for (const name of files) {
+ const file = join(dir, name);
+ const fields = frontmatter(file, await readFile(file, "utf-8"));
+ expect(fields.name, `${file} name`).toBe(basename(name, extname(name)));
+ expect(fields.name).toMatch(KEBAB_CASE);
+ expect(fields.description, `${file} description`).toBeTruthy();
+ }
+ });
+
+ test("rule and README name a skill the plugin actually ships", async () => {
+ const relPath = `${CURSOR_PLUGIN}/rules/use-context7.mdc`;
const rule = await readFile(join(REPO_ROOT, relPath), "utf-8");
- const readme = await readFile(join(REPO_ROOT, "plugins/cursor/context7/README.md"), "utf-8");
- const shipped = (await readdir(join(REPO_ROOT, "plugins/cursor/context7/skills"))).sort();
+ const readme = await readFile(join(REPO_ROOT, `${CURSOR_PLUGIN}/README.md`), "utf-8");
+ const shipped = (await readdir(join(REPO_ROOT, `${CURSOR_PLUGIN}/skills`))).sort();
// Both files point the reader at a skill by name; a rename that misses one
// of them leaves a dangling reference the agent cannot resolve.
for (const [file, content] of [
[relPath, rule],
- ["plugins/cursor/context7/README.md", readme],
+ [`${CURSOR_PLUGIN}/README.md`, readme],
] as const) {
const reference = content.match(/`(context7-[a-z0-9-]+)` skill/)?.[1];
expect(reference, `${file} should reference a skill by name`).toBeDefined();
expect(shipped, `${file} references "${reference}"`).toContain(reference);
}
});
+});
+
+describe("Cursor marketplace manifest", () => {
+ const marketplacePath = ".cursor-plugin/marketplace.json";
+
+ test("validates against Cursor's marketplace.schema.json", async () => {
+ const validate = await validator("marketplace.schema.json");
+ const marketplace = await readJson<CursorMarketplace>(marketplacePath);
+ expect(validate(marketplace), JSON.stringify(validate.errors, null, 2)).toBe(true);
+ });
- test("Cursor plugin's skill directories all contain a SKILL.md", async () => {
- const dir = join(REPO_ROOT, "plugins/cursor/context7/skills");
- for (const entry of await readdir(dir)) {
- await expect(access(join(dir, entry, "SKILL.md"))).resolves.toBeUndefined();
+ test("every entry resolves to a Cursor plugin with a matching, unique name", async () => {
+ const marketplace = await readJson<CursorMarketplace>(marketplacePath);
+ expect(marketplace.plugins.length).toBeGreaterThan(0);
+
+ const names = marketplace.plugins.map((p) => p.name);
+ expect(new Set(names).size).toBe(names.length);
+
+ for (const entry of marketplace.plugins) {
+ expectRelative(`plugins[${entry.name}].source`, entry.source);
+ const manifest = await readJson<CursorManifest>(
+ join(entry.source, ".cursor-plugin", "plugin.json")
+ );
+ expect(manifest.name).toBe(entry.name);
}
});
+
+ test("lists only the Cursor plugin under the same marketplace identity as Claude", async () => {
+ // The listing on cursor.com indexes this file; keep the marketplace name
+ // and owner in step with .claude-plugin/marketplace.json so both stores
+ // show one brand. Descriptions are free to differ.
+ const cursor = await readJson<CursorMarketplace>(marketplacePath);
+ const claude = await readJson<ClaudeMarketplace>(".claude-plugin/marketplace.json");
+
+ expect(cursor.plugins.map((p) => p.source)).toEqual([`./${CURSOR_PLUGIN}`]);
+ expect(cursor.name).toBe(claude.name);
+ expect(cursor.owner.name).toBe(claude.owner.name);
+ });
});
diff --git a/plugins/cursor/context7/.cursor-plugin/plugin.json b/plugins/cursor/context7/.cursor-plugin/plugin.json
new file mode 100644
index 00000000..bd08dcb4
--- /dev/null
+++ b/plugins/cursor/context7/.cursor-plugin/plugin.json
@@ -0,0 +1,21 @@
+{
+ "name": "context7",
+ "displayName": "Context7",
+ "version": "1.1.0",
+ "description": "Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.",
+ "author": {
+ "name": "Upstash",
+ "email": "[email protected]"
+ },
+ "homepage": "https://context7.com",
+ "repository": "https://github.com/upstash/context7",
+ "license": "MIT",
+ "logo": "assets/logo.svg",
+ "keywords": ["documentation", "mcp", "context7", "libraries", "frameworks", "library-docs"],
+ "category": "developer-tools",
+ "tags": ["documentation", "mcp"],
+ "skills": "./skills/",
+ "rules": "./rules/",
+ "agents": "./agents/",
+ "mcpServers": "./mcp.json"
+}
diff --git a/plugins/cursor/context7/.cursor/plugin.json b/plugins/cursor/context7/.cursor/plugin.json
deleted file mode 100644
index 8692c4f5..00000000
--- a/plugins/cursor/context7/.cursor/plugin.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "name": "context7",
- "version": "1.0.0",
- "description": "Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.",
- "author": {
- "name": "Context7",
- "email": "[email protected]",
- "url": "https://context7.com"
- },
- "keywords": ["documentation", "mcp", "context7", "libraries", "frameworks"],
- "logo": "https://context7.com/brand/context7-icon-green.svg",
- "primaryColor": "#059669"
-}
diff --git a/plugins/cursor/context7/LICENSE b/plugins/cursor/context7/LICENSE
new file mode 100644
index 00000000..17900de4
--- /dev/null
+++ b/plugins/cursor/context7/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2021 Upstash, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/plugins/cursor/context7/README.md b/plugins/cursor/context7/README.md
index 67efefd7..067b3d31 100644
--- a/plugins/cursor/context7/README.md
+++ b/plugins/cursor/context7/README.md
@@ -6,11 +6,38 @@ Context7 solves a common problem with AI coding assistants: outdated training da
This plugin provides:
-- **MCP Server** — Connects Cursor to Context7's documentation service
+- **MCP Server** — Connects Cursor to Context7's documentation service over OAuth (`https://mcp.context7.com/mcp/oauth`)
- **Rules** — An always-on `use-context7` rule that nudges the agent to fetch docs when unsure about library APIs
- **Skills** — A `context7-mcp` skill with detailed instructions on resolving libraries and fetching documentation
- **Agents** — A dedicated `docs-researcher` agent for focused lookups
+## Installation
+
+### From the Cursor Marketplace
+
+1. Open **Customize** in the Cursor sidebar and search for **Context7**, or open the listing at [cursor.com/marketplace](https://cursor.com/marketplace).
+2. Select **Install** and choose a user or project scope.
+3. When the `context7` MCP server shows **Needs authentication**, click it and complete the sign-in in your browser.
+
+Or run `/add-plugin context7` in chat.
+
+After installation, **Customize** lists the `context7` MCP server, the `use-context7` rule, the `context7-mcp` skill, and the `docs-researcher` agent.
+
+### Locally, for development
+
+Cursor loads plugins from `~/.cursor/plugins/local`. Copy this directory there (symlinks that point outside the folder are ignored):
+
+```bash
+mkdir -p ~/.cursor/plugins/local/context7
+cp -R plugins/cursor/context7/. ~/.cursor/plugins/local/context7
+```
+
+Then restart Cursor or run **Developer: Reload Window** and check **Customize** for the plugin's components.
+
+If the marketplace plugin with the same name is already installed, that install takes precedence over the local copy. Uninstall it first to test local changes.
+
+On Teams and Enterprise plans, admins control this with **Allow Local Plugin Imports** under **Dashboard → Settings → Security & Identity → Marketplace and Plugins** (off by default on Enterprise).
+
## Available Tools
### resolve-library-id
@@ -51,3 +78,25 @@ To get documentation for a specific version, include the version in the library
```
The `resolve-library-id` tool returns available versions, so you can pick the one that matches your project.
+
+## Plugin Layout
+
+```
+plugins/cursor/context7/
+├── .cursor-plugin/
+│ └── plugin.json # Cursor plugin manifest
+├── agents/
+│ └── docs-researcher.md
+├── assets/
+│ └── logo.svg
+├── rules/
+│ └── use-context7.mdc
+├── skills/
+│ └── context7-mcp/
+│ └── SKILL.md
+├── mcp.json # MCP server definition
+├── LICENSE
+└── README.md
+```
+
+The repository root carries `.cursor-plugin/marketplace.json`, which lists this plugin for the Cursor Marketplace.
diff --git a/plugins/cursor/context7/assets/logo.svg b/plugins/cursor/context7/assets/logo.svg
new file mode 100644
index 00000000..760d40b8
--- /dev/null
+++ b/plugins/cursor/context7/assets/logo.svg
@@ -0,0 +1,7 @@
+<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="28" height="28" rx="4" fill="#059669"/>
+<path d="M10.5724 15.2565C10.5724 17.5025 9.6613 19.3778 8.17805 21.1047H11.6319L11.6319 22.7786H6.33459V21.1895C7.95557 19.3566 8.58065 17.8628 8.58065 15.2565L10.5724 15.2565Z" fill="white"/>
+<path d="M17.4276 15.2565C17.4276 17.5025 18.3387 19.3778 19.822 21.1047H16.3681V22.7786H21.6654V21.1895C20.0444 19.3566 19.4194 17.8628 19.4194 15.2565H17.4276Z" fill="white"/>
+<path d="M10.5724 12.7435C10.5724 10.4975 9.66131 8.62224 8.17807 6.89532L11.6319 6.89532V5.22137L6.33461 5.22137V6.81056C7.95558 8.64343 8.58066 10.1373 8.58066 12.7435L10.5724 12.7435Z" fill="white"/>
+<path d="M17.4276 12.7435C17.4276 10.4975 18.3387 8.62224 19.822 6.89532L16.3681 6.89532L16.3681 5.22138L21.6654 5.22138V6.81056C20.0444 8.64343 19.4194 10.1373 19.4194 12.7435H17.4276Z" fill="white"/>
+</svg>
diff --git a/plugins/cursor/context7/mcp.json b/plugins/cursor/context7/mcp.json
index 734b3246..7dcea218 100644
--- a/plugins/cursor/context7/mcp.json
+++ b/plugins/cursor/context7/mcp.json
@@ -1,5 +1,8 @@
{
- "context7": {
- "url": "https://mcp.context7.com/mcp/oauth"
+ "mcpServers": {
+ "context7": {
+ "type": "http",
+ "url": "https://mcp.context7.com/mcp/oauth"
+ }
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0e14c298..387a2c3e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -124,6 +124,12 @@ importers:
'@typescript-eslint/parser':
specifier: 'catalog:'
+ ajv:
+ specifier: ^8.20.0
+ version: 8.20.0
+ ajv-formats:
+ specifier: ^3.0.1
+ version: 3.0.1([email protected])
eslint:
specifier: 'catalog:'
version: 10.11.0([email protected])
@@ -2173,6 +2179,9 @@ packages:
resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}
+ resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==}
+
resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==}
engines: {node: '>=12'}
@@ -5814,6 +5823,10 @@ snapshots:
ajv: 8.17.1
optional: true
+ optionalDependencies:
+ ajv: 8.20.0
+
dependencies:
fast-deep-equal: 3.1.3
@@ -5829,6 +5842,13 @@ snapshots:
require-from-string: 2.0.2
optional: true
+ dependencies:
+ fast-deep-equal: 3.1.3
+ fast-uri: 3.1.0
+ json-schema-traverse: 1.0.0
+ require-from-string: 2.0.2
+
@@ -6364,8 +6384,7 @@ snapshots:
dependencies:
fast-string-truncated-width: 3.0.3
- optional: true
dependencies:
@@ -6669,8 +6688,7 @@ snapshots:
- optional: true
optional: true
@@ -7166,8 +7184,7 @@ snapshots:
- '@node-rs/xxhash'
- '@opentelemetry/api'
- optional: true
dependencies:
@@ -7551,7 +7568,7 @@ snapshots:
picomatch: 4.0.7
postcss: 8.5.6
rollup: 4.53.3
- tinyglobby: 0.2.15
+ tinyglobby: 0.2.17
optionalDependencies:
'@types/node': 25.9.8
fsevents: 2.3.3