@@ -21,7 +21,10 @@ export type ExtensionKind = "mcp" | "plugin" | "skill";
2121
2222export type McpDirectoryInfo = {
2323 id ?: string ;
24+ /** Display name shown in the UI. */
2425 name : string ;
26+ /** Safe server name for opencode.jsonc (alphanumeric, - and _ only). Auto-derived from name if omitted. */
27+ serverName ?: string ;
2528 description : string ;
2629 url ?: string ;
2730 type ?: "remote" | "local" ;
@@ -35,9 +38,20 @@ export type McpDirectoryInfo = {
3538 iconSrc ?: string ;
3639} ;
3740
41+ /** Derive a safe MCP server name from a display name or explicit serverName. */
42+ export function getMcpServerName ( entry : McpDirectoryInfo ) : string {
43+ if ( entry . serverName ) return entry . serverName ;
44+ return entry . name
45+ . toLowerCase ( )
46+ . replace ( / [ ^ a - z 0 - 9 _ - ] / g, "-" )
47+ . replace ( / - + / g, "-" )
48+ . replace ( / ^ - | - $ / g, "" ) || "mcp" ;
49+ }
50+
3851export const MCP_QUICK_CONNECT : McpDirectoryInfo [ ] = [
3952 {
4053 get name ( ) { return t ( "mcp.quick_connect_notion_title" ) ; } ,
54+ serverName : "notion" ,
4155 get description ( ) { return t ( "mcp.quick_connect_notion_desc" ) ; } ,
4256 url : "https://mcp.notion.com/mcp" ,
4357 type : "remote" ,
@@ -47,6 +61,7 @@ export const MCP_QUICK_CONNECT: McpDirectoryInfo[] = [
4761 } ,
4862 {
4963 get name ( ) { return t ( "mcp.quick_connect_linear_title" ) ; } ,
64+ serverName : "linear" ,
5065 get description ( ) { return t ( "mcp.quick_connect_linear_desc" ) ; } ,
5166 url : "https://mcp.linear.app/mcp" ,
5267 type : "remote" ,
@@ -56,6 +71,7 @@ export const MCP_QUICK_CONNECT: McpDirectoryInfo[] = [
5671 } ,
5772 {
5873 get name ( ) { return t ( "mcp.quick_connect_sentry_title" ) ; } ,
74+ serverName : "sentry" ,
5975 get description ( ) { return t ( "mcp.quick_connect_sentry_desc" ) ; } ,
6076 url : "https://mcp.sentry.dev/mcp" ,
6177 type : "remote" ,
@@ -65,6 +81,7 @@ export const MCP_QUICK_CONNECT: McpDirectoryInfo[] = [
6581 } ,
6682 {
6783 get name ( ) { return t ( "mcp.quick_connect_stripe_title" ) ; } ,
84+ serverName : "stripe" ,
6885 get description ( ) { return t ( "mcp.quick_connect_stripe_desc" ) ; } ,
6986 url : "https://mcp.stripe.com" ,
7087 type : "remote" ,
@@ -74,6 +91,7 @@ export const MCP_QUICK_CONNECT: McpDirectoryInfo[] = [
7491 } ,
7592 {
7693 get name ( ) { return t ( "mcp.quick_connect_context7_title" ) ; } ,
94+ serverName : "context7" ,
7795 get description ( ) { return t ( "mcp.quick_connect_context7_desc" ) ; } ,
7896 url : "https://mcp.context7.com/mcp" ,
7997 type : "remote" ,
@@ -83,6 +101,7 @@ export const MCP_QUICK_CONNECT: McpDirectoryInfo[] = [
83101 } ,
84102 {
85103 get name ( ) { return t ( "mcp.quick_connect_openwork_cloud_title" ) ; } ,
104+ serverName : "openwork-cloud" ,
86105 get description ( ) { return t ( "mcp.quick_connect_openwork_cloud_desc" ) ; } ,
87106 get url ( ) {
88107 try {
@@ -96,4 +115,13 @@ export const MCP_QUICK_CONNECT: McpDirectoryInfo[] = [
96115 kind : "mcp" ,
97116 iconSrc : "/openwork-mark.svg" ,
98117 } ,
118+ {
119+ get name ( ) { return t ( "mcp.quick_connect_openwork_ui_title" ) ; } ,
120+ serverName : "openwork-ui" ,
121+ get description ( ) { return t ( "mcp.quick_connect_openwork_ui_desc" ) ; } ,
122+ type : "remote" ,
123+ oauth : false ,
124+ kind : "mcp" ,
125+ iconSrc : "/openwork-mark.svg" ,
126+ } ,
99127] ;
0 commit comments