Skip to content

Commit 1bd64ff

Browse files
Simplify MCP template (#84)
* Use correct Inspector task info * Add in a router configuration We should put new use cases on the latest connectors to get feedback * Standardize on port 5000 * All mutations should require confirmation * Simplify settings for VS Code * remove claude desktop config * Use port 5000 * Remove duplicative README * feat(add-mcp): Revert MCP server port from 5000 to 5050 * feat(add-mcp): Update MCP README to reflect removal of Claude Desktop configuration * feat(add-mcp): Update port to 5050 * feat(add-mcp): Replace mcp-claude shortlink --------- Co-authored-by: Camille Lawrence <[email protected]>
1 parent 77e6178 commit 1bd64ff

File tree

10 files changed

+75
-304
lines changed

10 files changed

+75
-304
lines changed

add-mcp/.apollo/mcp.local.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Working local configuration:
55
overrides:
66
mutation_mode: all
7+
require_confirmation: true # Confirmation required for mutations
78
operations:
89
source: collection
910
id: default # localhost:4000 in browser → Sandbox → Collections → Create operations for MCP tools

add-mcp/.apollo/mcp.staging.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Working staging configuration:
55
overrides:
66
mutation_mode: all
7-
require_confirmation: true # Confirmation required for mutations in staging
7+
require_confirmation: true # Confirmation required for mutations
88
operations:
99
source: collection
1010
id: default # GraphQL endpoint in browser → Sandbox → Collections → Create operations for MCP tools

add-mcp/.vscode/settings.json

Lines changed: 26 additions & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
// This file configures VS Code to provide excellent GraphQL development
77
// experience when creating MCP tools. It enables syntax highlighting,
88
// auto-completion, schema validation, and more for GraphQL files.
9-
9+
1010
// ==========================================================================
1111
// GRAPHQL LANGUAGE SUPPORT
1212
// ==========================================================================
13-
13+
1414
// Associate files with their appropriate languages
1515
"files.associations": {
1616
"*.graphql": "graphql",
@@ -31,71 +31,27 @@
3131
"editor.formatOnType": true,
3232
"editor.wordWrap": "bounded",
3333
"editor.wordWrapColumn": 100,
34-
34+
3535
// Enable semantic highlighting for GraphQL
3636
"editor.semanticHighlighting.enabled": true,
37-
37+
3838
// Show suggestions while typing
3939
"editor.quickSuggestions": {
4040
"other": true,
4141
"comments": false,
4242
"strings": true
4343
},
44-
44+
4545
// Auto-complete brackets and quotes
4646
"editor.autoClosingBrackets": "always",
4747
"editor.autoClosingQuotes": "always",
4848
"editor.autoSurround": "languageDefined"
4949
},
5050

51-
// ==========================================================================
52-
// GRAPHQL EXTENSION CONFIGURATION
53-
// ==========================================================================
54-
55-
// GraphQL Language Server configuration
56-
"graphql.introspect": {
57-
// Your GraphQL endpoint for schema introspection
58-
"endpoint": "{{GRAPHQL_ENDPOINT}}",
59-
60-
// Headers for authentication (if required)
61-
"headers": {
62-
// "Authorization": "Bearer {{AUTH_TOKEN}}"
63-
// "X-API-Key": "{{API_KEY}}"
64-
}
65-
},
66-
67-
// GraphQL validation and linting
68-
"graphql.validate": true,
69-
"graphql.lint": {
70-
"enable": true,
71-
"rules": {
72-
// Enforce operation naming
73-
"operations-without-names": "error",
74-
75-
// Enforce field selection
76-
"fields-without-selections": "error",
77-
78-
// Warn about unused variables
79-
"unused-variables": "warn",
80-
81-
// Warn about undefined variables
82-
"undefined-variables": "error",
83-
84-
// Enforce proper fragment usage
85-
"unused-fragments": "warn"
86-
}
87-
},
88-
89-
// Enable auto-completion from GraphQL schema
90-
"graphql.autocomplete": {
91-
"enable": true,
92-
"showDeprecated": true
93-
},
94-
9551
// ==========================================================================
9652
// FILE EXPLORER CONFIGURATION
9753
// ==========================================================================
98-
54+
9955
// Group GraphQL files in explorer
10056
"explorer.fileNesting.enabled": true,
10157
"explorer.fileNesting.patterns": {
@@ -112,7 +68,7 @@
11268
// ==========================================================================
11369
// EDITOR ENHANCEMENTS FOR MCP DEVELOPMENT
11470
// ==========================================================================
115-
71+
11672
// Enable breadcrumbs for navigation
11773
"breadcrumbs.enabled": true,
11874
"breadcrumbs.showFiles": true,
@@ -130,7 +86,7 @@
13086
// ==========================================================================
13187
// SEARCH AND FIND CONFIGURATION
13288
// ==========================================================================
133-
89+
13490
// Include GraphQL files in search
13591
"search.include": {
13692
"**/*.graphql": true,
@@ -139,15 +95,6 @@
13995
".apollo/**": true
14096
},
14197

142-
// Exclude node_modules and build artifacts
143-
"search.exclude": {
144-
"**/node_modules": true,
145-
"**/dist": true,
146-
"**/build": true,
147-
"**/.git": true,
148-
"**/coverage": true
149-
},
150-
15198
// ==========================================================================
15299
// YAML CONFIGURATION FOR APOLLO CONFIG FILES
153100
// ==========================================================================
@@ -187,11 +134,10 @@
187134
]
188135
},
189136

190-
191137
// ==========================================================================
192138
// DOCKERFILE CONFIGURATION
193139
// ==========================================================================
194-
140+
195141
// Configure Docker file settings
196142
"[dockerfile]": {
197143
"editor.quickSuggestions": {
@@ -200,11 +146,10 @@
200146
"editor.formatOnSave": true
201147
},
202148

203-
204149
// ==========================================================================
205150
// JSON CONFIGURATION FOR CONFIG FILES
206151
// ==========================================================================
207-
152+
208153
// Configure JSON files (like Claude Desktop config)
209154
"[json]": {
210155
"editor.tabSize": 2,
@@ -224,130 +169,41 @@
224169
// ==========================================================================
225170
// INTEGRATED TERMINAL CONFIGURATION
226171
// ==========================================================================
227-
228-
// Configure terminal for MCP development workflow
172+
173+
// Configure terminal for Apollo Key and Graph Ref
229174
"terminal.integrated.cwd": "${workspaceFolder}",
230-
"terminal.integrated.env.osx": {},
231-
"terminal.integrated.env.linux": {},
232-
"terminal.integrated.env.windows": {},
233-
234-
// Add common MCP development tasks to terminal profiles
235-
"terminal.integrated.profiles.osx": {
236-
"MCP Development": {
237-
"path": "/bin/bash",
238-
"args": [
239-
"-c",
240-
"echo 'MCP Development Environment'; echo 'Available commands:'; echo ' docker build -f mcp.Dockerfile -t mcp-server .'; echo ' docker run -p 5050:5050 --env-file .env mcp-server'; echo ' npx @mcp/inspector --port 5050'; echo ''; exec bash"
241-
]
242-
},
243-
"graphos": {
244-
"path": "zsh",
245-
"args": ["-l"],
246-
"env": {
247-
"APOLLO_KEY": "{{APOLLO_KEY}}",
248-
"APOLLO_GRAPH_REF": "{{APOLLO_GRAPH_REF}}",
249-
}
250-
}
175+
"terminal.integrated.env.osx": {
176+
"APOLLO_KEY": "{{APOLLO_KEY}}",
177+
"APOLLO_GRAPH_REF": "{{APOLLO_GRAPH_REF}}"
178+
},
179+
"terminal.integrated.env.linux": {
180+
"APOLLO_KEY": "{{APOLLO_KEY}}",
181+
"APOLLO_GRAPH_REF": "{{APOLLO_GRAPH_REF}}"
182+
},
183+
"terminal.integrated.env.windows": {
184+
"APOLLO_KEY": "{{APOLLO_KEY}}",
185+
"APOLLO_GRAPH_REF": "{{APOLLO_GRAPH_REF}}"
251186
},
252-
"terminal.integrated.defaultProfile.osx": "graphos",
253187

254188
// ==========================================================================
255189
// TASKS AND DEBUGGING CONFIGURATION
256190
// ==========================================================================
257-
191+
258192
// Enable problem matcher for GraphQL validation
259193
"problems.decorations.enabled": true,
260194
"problems.showCurrentInStatus": true,
261195

262196
// Configure git integration for GraphQL files
263197
"git.decorations.enabled": true,
264198
"scm.diffDecorations": "all",
265-
266-
// ==========================================================================
267-
// WORKSPACE-SPECIFIC SETTINGS
268-
// ==========================================================================
269-
270-
// Workspace trust settings
271-
"security.workspace.trust.untrustedFiles": "open",
272-
273-
// Auto-save settings for development
274-
"files.autoSave": "onWindowChange",
275-
"files.autoSaveDelay": 1000,
276-
277-
// Enable hot reload feedback
278-
"files.watcherExclude": {
279-
"**/node_modules/**": true,
280-
"**/dist/**": true,
281-
"**/coverage/**": true
282-
},
283-
284-
// ==========================================================================
285-
// DEVELOPMENT WORKFLOW ENHANCEMENTS
286-
// ==========================================================================
287-
288-
// Enable emmet for GraphQL (useful for quick field selection)
289-
"emmet.includeLanguages": {
290-
"graphql": "css"
291-
},
292-
293-
// Configure auto-rename for consistency
294-
"editor.linkedEditing": true,
295-
296-
// Enable parameter hints for GraphQL variables
297-
"editor.parameterHints.enabled": true,
298-
"editor.parameterHints.cycle": true,
299-
300-
// ==========================================================================
301-
// CUSTOM SNIPPETS SUPPORT
302-
// ==========================================================================
303-
304-
// These settings enable custom GraphQL snippets
305-
"editor.snippetSuggestions": "top",
306-
"editor.suggest.snippetsPreventQuickSuggestions": false,
307-
308-
// ==========================================================================
309-
// ERROR AND WARNING DISPLAY
310-
// ==========================================================================
311-
312-
// Configure how GraphQL errors are displayed
313-
"problems.sortOrder": "severity",
314-
"editor.gotoLocation.multipleDefinitions": "goto",
315-
"editor.gotoLocation.multipleReferences": "goto",
316-
317-
// ==========================================================================
318-
// FORMATTING AND LINTING
319-
// ==========================================================================
320-
321-
// Enable format on paste for GraphQL
322-
"editor.formatOnPaste": true,
323-
324-
// Configure rulers for GraphQL query readability
325-
"editor.rulers": [80, 120],
326-
327-
// ==========================================================================
328-
// MINIMAP CONFIGURATION
329-
// ==========================================================================
330-
331-
// Configure minimap for better navigation of large GraphQL files
332-
"editor.minimap.enabled": true,
333-
"editor.minimap.maxColumn": 120,
334-
"editor.minimap.renderCharacters": false,
335-
336-
// ==========================================================================
337-
// INTELLISENSE CONFIGURATION
338-
// ==========================================================================
339-
340-
// Enhanced IntelliSense for GraphQL development
341-
"editor.suggestSelection": "first",
342-
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
343199

344200
// ==========================================================================
345201
// COMMENTS AND DOCUMENTATION
346202
// ==========================================================================
347-
203+
348204
// Better comment highlighting in GraphQL files
349205
"editor.comments.insertSpace": true,
350206
"files.trimTrailingWhitespace": true,
351207
"files.trimFinalNewlines": true,
352208
"files.insertFinalNewline": true
353-
}
209+
}

add-mcp/.vscode/tasks.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"dev",
1111
"--supergraph-config",
1212
"supergraph.yaml",
13+
"--router-config",
14+
"router.yaml",
1315
"--mcp",
1416
".apollo/mcp.local.yaml"
1517
],
@@ -28,7 +30,7 @@
2830
// Opens MCP inspector UI in browser to test your AI tools
2931
"label": "Test MCP Tools",
3032
"command": "npx",
31-
"args": ["@mcp/inspector", "--port", "5050"],
33+
"args": ["@modelcontextprotocol/inspector", "--transport", "http", "--server-url", "http://localhost:5050/mcp"],
3234
"type": "shell"
3335
}
3436
]

0 commit comments

Comments
 (0)