File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ const handler = await createGraphQLHandler(config);
1414
1515const server = new Server (
1616 {
17- name : "mcp-graphql" ,
17+ name : config . name ,
1818 version : getVersion ( ) ,
19- description : `GraphQL client for ${ config . endpoint } ` ,
19+ description : `GraphQL server for ${ config . endpoint } ` ,
2020 } ,
2121 {
2222 capabilities : {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { hideBin } from "yargs/helpers";
33import { z } from "zod" ;
44
55export const configSchema = z . object ( {
6+ name : z . string ( ) . default ( "mcp-graphql" ) ,
67 // Endpoint for the schema to be introspected and transformed into tools
78 endpoint : z . string ( ) . url ( ) ,
89 // File path alternative to endpoint, will read the file instead of fetching the endpoint
@@ -21,6 +22,11 @@ export type Config = z.infer<typeof configSchema>;
2122
2223export function parseArgumentsToConfig ( ) : Config {
2324 const argv = yargs ( hideBin ( process . argv ) )
25+ . option ( "name" , {
26+ type : "string" ,
27+ description :
28+ "Name of the MCP server, can be used if you want to override the default name" ,
29+ } )
2430 . option ( "endpoint" , {
2531 type : "string" ,
2632 description :
You can’t perform that action at this time.
0 commit comments