Skip to content

Commit 920a87f

Browse files
Add JSON schemas for plugin and marketplace manifests
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 7067f9d commit 920a87f

2 files changed

Lines changed: 208 additions & 0 deletions

File tree

schemas/marketplace.schema.json

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://cursor.com/schemas/cursor-plugin/marketplace.json",
4+
"title": "Cursor Plugin Marketplace",
5+
"description": "Schema for .cursor-plugin/marketplace.json — defines a marketplace that indexes one or more Cursor plugins.",
6+
"type": "object",
7+
"required": ["name", "plugins"],
8+
"additionalProperties": false,
9+
"properties": {
10+
"name": {
11+
"type": "string",
12+
"minLength": 1,
13+
"description": "Unique identifier for the marketplace."
14+
},
15+
"owner": {
16+
"$ref": "#/$defs/owner",
17+
"description": "The marketplace owner or organisation."
18+
},
19+
"metadata": {
20+
"type": "object",
21+
"additionalProperties": true,
22+
"properties": {
23+
"description": {
24+
"type": "string",
25+
"description": "Short description of the marketplace."
26+
}
27+
},
28+
"description": "Arbitrary metadata about the marketplace."
29+
},
30+
"plugins": {
31+
"type": "array",
32+
"items": { "$ref": "#/$defs/pluginEntry" },
33+
"description": "List of plugins available in the marketplace."
34+
}
35+
},
36+
"$defs": {
37+
"owner": {
38+
"type": "object",
39+
"required": ["name"],
40+
"additionalProperties": false,
41+
"properties": {
42+
"name": {
43+
"type": "string",
44+
"minLength": 1,
45+
"description": "Owner or organisation name."
46+
},
47+
"email": {
48+
"type": "string",
49+
"format": "email",
50+
"description": "Contact email address."
51+
}
52+
}
53+
},
54+
"pluginEntry": {
55+
"type": "object",
56+
"required": ["name", "source"],
57+
"additionalProperties": false,
58+
"properties": {
59+
"name": {
60+
"type": "string",
61+
"minLength": 1,
62+
"pattern": "^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$",
63+
"description": "Plugin identifier matching the plugin's name in its plugin.json."
64+
},
65+
"source": {
66+
"type": "string",
67+
"minLength": 1,
68+
"description": "Path to the plugin directory (relative to the marketplace root) or a remote URL."
69+
},
70+
"description": {
71+
"type": "string",
72+
"description": "Short description of the plugin."
73+
}
74+
}
75+
}
76+
}
77+
}

schemas/plugin.schema.json

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://cursor.com/schemas/cursor-plugin/plugin.json",
4+
"title": "Cursor Plugin Manifest",
5+
"description": "Schema for .cursor-plugin/plugin.json — defines a single Cursor plugin's metadata, components, and configuration.",
6+
"type": "object",
7+
"required": ["name"],
8+
"additionalProperties": false,
9+
"properties": {
10+
"name": {
11+
"type": "string",
12+
"minLength": 1,
13+
"pattern": "^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$",
14+
"description": "Unique plugin identifier in kebab-case (lowercase alphanumeric with hyphens and periods)."
15+
},
16+
"displayName": {
17+
"type": "string",
18+
"description": "Human-readable display name for the plugin."
19+
},
20+
"description": {
21+
"type": "string",
22+
"description": "Short description of what the plugin does."
23+
},
24+
"version": {
25+
"type": "string",
26+
"description": "Semantic version of the plugin (e.g. \"1.2.3\")."
27+
},
28+
"author": {
29+
"$ref": "#/$defs/author",
30+
"description": "The plugin author."
31+
},
32+
"publisher": {
33+
"type": "string",
34+
"minLength": 1,
35+
"description": "Publisher or organisation name."
36+
},
37+
"homepage": {
38+
"type": "string",
39+
"format": "uri",
40+
"description": "URL to the plugin's homepage."
41+
},
42+
"repository": {
43+
"type": "string",
44+
"format": "uri",
45+
"description": "URL to the plugin's source code repository."
46+
},
47+
"license": {
48+
"type": "string",
49+
"description": "SPDX license identifier (e.g. \"MIT\", \"Apache-2.0\")."
50+
},
51+
"logo": {
52+
"type": "string",
53+
"description": "Path to a logo image (relative to the plugin root) or an absolute URL."
54+
},
55+
"keywords": {
56+
"type": "array",
57+
"items": { "type": "string" },
58+
"description": "Keywords for discovery and search."
59+
},
60+
"commands": {
61+
"$ref": "#/$defs/stringOrStringArray",
62+
"description": "Glob pattern(s) or path(s) to command files."
63+
},
64+
"agents": {
65+
"$ref": "#/$defs/stringOrStringArray",
66+
"description": "Glob pattern(s) or path(s) to agent definition files."
67+
},
68+
"skills": {
69+
"$ref": "#/$defs/stringOrStringArray",
70+
"description": "Glob pattern(s) or path(s) to skill files."
71+
},
72+
"rules": {
73+
"$ref": "#/$defs/stringOrStringArray",
74+
"description": "Glob pattern(s) or path(s) to rule files."
75+
},
76+
"hooks": {
77+
"oneOf": [
78+
{ "type": "string" },
79+
{ "type": "object" }
80+
],
81+
"description": "Path to a hooks configuration file, or an inline hooks object."
82+
},
83+
"mcpServers": {
84+
"$ref": "#/$defs/mcpServers",
85+
"description": "MCP server configuration — a path, an inline config object, or an array of either."
86+
}
87+
},
88+
"$defs": {
89+
"author": {
90+
"type": "object",
91+
"required": ["name"],
92+
"additionalProperties": false,
93+
"properties": {
94+
"name": {
95+
"type": "string",
96+
"minLength": 1,
97+
"description": "Author name."
98+
},
99+
"email": {
100+
"type": "string",
101+
"format": "email",
102+
"description": "Author email address."
103+
}
104+
}
105+
},
106+
"stringOrStringArray": {
107+
"oneOf": [
108+
{ "type": "string" },
109+
{
110+
"type": "array",
111+
"items": { "type": "string" }
112+
}
113+
]
114+
},
115+
"mcpServers": {
116+
"oneOf": [
117+
{ "type": "string" },
118+
{ "type": "object" },
119+
{
120+
"type": "array",
121+
"items": {
122+
"oneOf": [
123+
{ "type": "string" },
124+
{ "type": "object" }
125+
]
126+
}
127+
}
128+
]
129+
}
130+
}
131+
}

0 commit comments

Comments
 (0)