@primer/mcp 0.3.3-rc.da8b5648e → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stdio.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
2
- import { s as server } from './server-B7Ip8Z4Y.js';
2
+ import { s as server } from './server-C2QaEv-c.js';
3
3
  import '@modelcontextprotocol/sdk/server/mcp.js';
4
4
  import 'cheerio';
5
5
  import 'zod';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/mcp",
3
3
  "description": "An MCP server that connects AI tools to the Primer Design System",
4
- "version": "0.3.3-rc.da8b5648e",
4
+ "version": "0.3.3",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "mcp": "./bin/mcp.js"
@@ -37,7 +37,7 @@
37
37
  "@modelcontextprotocol/sdk": "^1.24.0",
38
38
  "@primer/octicons": "^19.15.5",
39
39
  "@primer/primitives": "10.x || 11.x",
40
- "@primer/react": "^38.28.0",
40
+ "@primer/react": "^38.20.0",
41
41
  "cheerio": "^1.0.0",
42
42
  "turndown": "^7.2.0",
43
43
  "zod": "^4.3.5"
package/src/server.ts CHANGED
@@ -39,7 +39,6 @@ server.registerTool(
39
39
  'init',
40
40
  {
41
41
  description: 'Setup or create a project that includes Primer React',
42
- annotations: {readOnlyHint: true},
43
42
  },
44
43
  async () => {
45
44
  const url = new URL(`/product/getting-started/react`, 'https://primer.style')
@@ -93,7 +92,7 @@ ${text}
93
92
  // -----------------------------------------------------------------------------
94
93
  server.registerTool(
95
94
  'list_components',
96
- {description: 'List all of the components available from Primer React', annotations: {readOnlyHint: true}},
95
+ {description: 'List all of the components available from Primer React'},
97
96
  async () => {
98
97
  const components = listComponents().map(component => {
99
98
  return `- ${component.name}`
@@ -121,7 +120,6 @@ server.registerTool(
121
120
  inputSchema: {
122
121
  name: z.string().describe('The name of the component to retrieve'),
123
122
  },
124
- annotations: {readOnlyHint: true},
125
123
  },
126
124
  async ({name}) => {
127
125
  const components = listComponents()
@@ -168,7 +166,6 @@ server.registerTool(
168
166
  inputSchema: {
169
167
  name: z.string().describe('The name of the component to retrieve'),
170
168
  },
171
- annotations: {readOnlyHint: true},
172
169
  },
173
170
  async ({name}) => {
174
171
  const components = listComponents()
@@ -229,7 +226,6 @@ server.registerTool(
229
226
  inputSchema: {
230
227
  name: z.string().describe('The name of the component to retrieve'),
231
228
  },
232
- annotations: {readOnlyHint: true},
233
229
  },
234
230
  async ({name}) => {
235
231
  const components = listComponents()
@@ -302,7 +298,6 @@ server.registerTool(
302
298
  inputSchema: {
303
299
  name: z.string().describe('The name of the component to retrieve'),
304
300
  },
305
- annotations: {readOnlyHint: true},
306
301
  },
307
302
  async ({name}) => {
308
303
  const components = listComponents()
@@ -372,7 +367,7 @@ ${text}`,
372
367
  // -----------------------------------------------------------------------------
373
368
  server.registerTool(
374
369
  'list_patterns',
375
- {description: 'List all of the patterns available from Primer React', annotations: {readOnlyHint: true}},
370
+ {description: 'List all of the patterns available from Primer React'},
376
371
  async () => {
377
372
  const patterns = listPatterns().map(pattern => {
378
373
  return `- ${pattern.name}`
@@ -397,7 +392,6 @@ server.registerTool(
397
392
  inputSchema: {
398
393
  name: z.string().describe('The name of the pattern to retrieve'),
399
394
  },
400
- annotations: {readOnlyHint: true},
401
395
  },
402
396
  async ({name}) => {
403
397
  const patterns = listPatterns()
@@ -475,7 +469,6 @@ server.registerTool(
475
469
  .default(15)
476
470
  .describe('Maximum results to return to stay within context limits'),
477
471
  },
478
- annotations: {readOnlyHint: true},
479
472
  },
480
473
  async ({query, group, limit}) => {
481
474
  // Resolve group via aliases
@@ -573,7 +566,6 @@ server.registerTool(
573
566
  inputSchema: {
574
567
  groups: z.array(z.string()).describe('Array of group names (e.g., ["overlay", "shadow", "focus"])'),
575
568
  },
576
- annotations: {readOnlyHint: true},
577
569
  },
578
570
  async ({groups}) => {
579
571
  // Normalize and resolve aliases
@@ -616,7 +608,6 @@ server.registerTool(
616
608
  {
617
609
  description:
618
610
  'CRITICAL: CALL THIS FIRST. Provides the logic matrix and the list of valid group names. You cannot search accurately without this map.',
619
- annotations: {readOnlyHint: true},
620
611
  },
621
612
  async () => {
622
613
  const groups = listTokenGroups()
@@ -640,7 +631,6 @@ server.registerTool(
640
631
  {
641
632
  description:
642
633
  'Provides "Golden Example" CSS for core patterns: Button (Interactions) and Stack (Layout). Use this to understand how to apply the Logic Matrix, Motion, and Spacing scales.',
643
- annotations: {readOnlyHint: true},
644
634
  },
645
635
  async () => {
646
636
  const customPatterns = getTokenUsagePatternsText()
@@ -669,7 +659,6 @@ server.registerTool(
669
659
  description:
670
660
  'REQUIRED FINAL STEP. Use this to validate your CSS. You cannot complete a task involving CSS without a successful run of this tool.',
671
661
  inputSchema: {css: z.string()},
672
- annotations: {readOnlyHint: true},
673
662
  },
674
663
  async ({css}) => {
675
664
  try {
@@ -705,7 +694,7 @@ server.registerTool(
705
694
  // -----------------------------------------------------------------------------
706
695
  server.registerTool(
707
696
  'get_color_usage',
708
- {description: 'Get the guidelines for how to apply color to a user interface', annotations: {readOnlyHint: true}},
697
+ {description: 'Get the guidelines for how to apply color to a user interface'},
709
698
  async () => {
710
699
  const url = new URL(`/product/getting-started/foundations/color-usage`, 'https://primer.style')
711
700
  const response = await fetch(url)
@@ -743,10 +732,7 @@ server.registerTool(
743
732
 
744
733
  server.registerTool(
745
734
  'get_typography_usage',
746
- {
747
- description: 'Get the guidelines for how to apply typography to a user interface',
748
- annotations: {readOnlyHint: true},
749
- },
735
+ {description: 'Get the guidelines for how to apply typography to a user interface'},
750
736
  async () => {
751
737
  const url = new URL(`/product/getting-started/foundations/typography`, 'https://primer.style')
752
738
  const response = await fetch(url)
@@ -787,10 +773,7 @@ server.registerTool(
787
773
  // -----------------------------------------------------------------------------
788
774
  server.registerTool(
789
775
  'list_icons',
790
- {
791
- description: 'List all of the icons (octicons) available from Primer Octicons React',
792
- annotations: {readOnlyHint: true},
793
- },
776
+ {description: 'List all of the icons (octicons) available from Primer Octicons React'},
794
777
  async () => {
795
778
  const icons = listIcons().map(icon => {
796
779
  const keywords = icon.keywords.map(keyword => {
@@ -825,7 +808,6 @@ server.registerTool(
825
808
  name: z.string().describe('The name of the icon to retrieve'),
826
809
  size: z.string().optional().describe('The size of the icon to retrieve, e.g. "16"').default('16'),
827
810
  },
828
- annotations: {readOnlyHint: true},
829
811
  },
830
812
  async ({name, size}) => {
831
813
  const icons = listIcons()
@@ -883,10 +865,7 @@ ${text}`,
883
865
  // -----------------------------------------------------------------------------
884
866
  server.registerTool(
885
867
  'primer_coding_guidelines',
886
- {
887
- description: 'Get the guidelines when writing code that uses Primer or for UI code that you are creating',
888
- annotations: {readOnlyHint: true},
889
- },
868
+ {description: 'Get the guidelines when writing code that uses Primer or for UI code that you are creating'},
890
869
  async () => {
891
870
  return {
892
871
  content: [
@@ -943,7 +922,6 @@ server.registerTool(
943
922
  alt: z.string().describe('The alt text of the image being evaluated'),
944
923
  image: z.string().describe('The image URL or file path being evaluated'),
945
924
  },
946
- annotations: {readOnlyHint: true},
947
925
  },
948
926
  async ({surroundingText, alt, image}) => {
949
927
  // Call the LLM through MCP sampling