Skip to content

Commit 5c40b71

Browse files
gocamilletayrriblealyssahurshDMallare
authored
feat(add-mcp): Add MCP Server Template and Improve Existing Templates (#77)
* feat(add-mcp): add start-with-mcp template * feat(add-mcp): add start-with-mcp template * feat(add-mcp): add start-with-mcp apollo and vscode configurations * feat(add-mcp): add the mcp augmentation to rover-init-starters * feat(add-mcp): include mcp template to manifest * feat(add-mcp): update mcp dockerfile * feat(add-mcp): update mcp env template * feat(add-mcp): update mcp gitignore and remove unused template * feat(add-mcp): update manifest * feat(add-mcp): add example connectors and queries for 80% of known MCP use cases * feat(add-mcp): Update templates and docs to be more MCP engineer focused * feat(add-mcp): update example tools and remove platform-specific ai client references * feat(add-mcp): remove claude desktop config file * feat(add-mcp): refactor configuration files * feat(add-mcp): add latest mcp server build to dockerfile * feat(add-mcp): add latest mcp server build to dockerfile * feat(add-mcp): update endpoint for rover development * feat(add-mcp): re-include the claude-desktop-config file for quick setup * feat(add-mcp): re-name claude desktop config file * feat(add-mcp): update environment and docker template * feat(add-mcp): update claude desktop configuration file * feat(add-mcp): refine config file * feat(add-mcp): Update mcp config files * feat(add-mcp): Remove extra docs and example directory * Renaming schema files, capitalizing getting started files, pulling in hackathon improvements (#74) * Remove start-with-rest/supergraph.yaml (#50) #50 * Renaming schema file and updating READMEs and getting-started.mds (#52) * reworking readme and getting-started + renaming schema file * reworking readme and getting-started + renaming schema file for typescript example * actually renaming schema file * simplify typescript readme * Add .env to .gitignore (#53) * simplifying working with schema and renaming getting started * refactoring to rename files and remove unnecessary --------- Co-authored-by: Alyssa Hursh <[email protected]> Co-authored-by: Danielle Mallare <[email protected]> * feat(add-mcp): update the name for MCP README * feat(add-mcp): update copy for MCP README * feat(add-mcp): Add and update vscode configuration files for mcp workflow * feat(add-mcp): add graphos credentials to mcp config * feat(add-mcp): add security warning for mcp config files * feat(add-mcp): revert the addition of credentials to mcp config * feat(add-mcp): Update mcp dockerfile * feat(add-mcp): Update MCP config with validation enabled * feat: Adding `.vscode/settings.json` and `./vscode/tasks.json` (#75) * feat(mcp-template): add start-with-mcp template * feat(mcp-template): add start-with-mcp template * feat(mcp-template): add start-with-mcp apollo and vscode configurations * WIP: add the mcp augmentation to rover-init-starters * WIP: include mcp template to manifest * WIP (mcp): update mcp dockerfile * WIP (mcp): update mcp env template * WIP (mcp): update mcp gitignore and remove unused template * WIP (mcp): update manifest * WIP (mcp): add example connectors and queries for 80% of known MCP use cases * WIP (0-to-mcp): Update templates and docs to be more MCP engineer focused * WIP (mcp): update example tools and remove platform-specific ai client references * WIP (mcp): remove claude desktop config file * WIP (mcp): refactor configuration files * WIP (mcp): add latest mcp server build to dockerfile * WIP (mcp): add latest mcp server build to dockerfile * WIP (mcp): update endpoint for rover development * WIP (mcp): re-include the claude-desktop-config file for quick setup * WIP (mcp): re-name claude desktop config file * WIP (mcp): update environment and docker template * WIP (mcp): update claude desktop configuration file * WIP (mcp): refine config file * WIP (mcp): Update mcp config files * WIP (mcp): Remove extra docs and example directory * Renaming schema files, capitalizing getting started files, pulling in hackathon improvements (#74) * Remove start-with-rest/supergraph.yaml (#50) #50 * Renaming schema file and updating READMEs and getting-started.mds (#52) * reworking readme and getting-started + renaming schema file * reworking readme and getting-started + renaming schema file for typescript example * actually renaming schema file * simplify typescript readme * Add .env to .gitignore (#53) * simplifying working with schema and renaming getting started * refactoring to rename files and remove unnecessary --------- Co-authored-by: Alyssa Hursh <[email protected]> Co-authored-by: Danielle Mallare <[email protected]> * WIP (mcp): update the name for MCP README * WIP (mcp): update copy for MCP README * WIP (mcp): Add and update vscode configuration files for mcp workflow * WIP (mcp): add graphos credentials to mcp config * WIP (mcp): add security warning for mcp config files * WIP (mcp): revert the addition of credentials to mcp config * WIP (mcp): Update mcp dockerfile * WIP (mcp): Update MCP config with validation enabled * setting up templatized settings.json * including 5001 port * adding tasks and settings to all templates and updating mcp server to 5050 --------- Signed-off-by: camillelawrence <[email protected]> Co-authored-by: Camille Lawrence <[email protected]> Co-authored-by: Alyssa Hursh <[email protected]> Co-authored-by: Danielle Mallare <[email protected]> Co-authored-by: camillelawrence <[email protected]> * feat(add-mcp): Resolve gitleaks errors * feat(add-mcp): Add the add-mcp tests to github workflow * feat(add-mcp): Ensure tests run on the add-mcp directory * chore: prepare v2.0.0 release - Separate v1.0.0 (2025-05-12) and v2.0.0 (2025-09-30) changelog entries - Add MCP template features to v2.0.0 changelog - Document breaking changes from file renames in v2.0.0 - Update package.json to v2.0.0 for breaking changes * feat(add-mcp): Add a list of agent rules * feat(add-mcp): Update gitleaks file * feat(add-mcp): Update gitleaks file * feat(add-mcp): Update gitleaks file --------- Signed-off-by: camillelawrence <[email protected]> Co-authored-by: Taylor Jones <[email protected]> Co-authored-by: Alyssa Hursh <[email protected]> Co-authored-by: Danielle Mallare <[email protected]>
1 parent c4f64ae commit 5c40b71

34 files changed

+1204
-173
lines changed

.github/workflows/templates-test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,19 @@ jobs:
2020
cache: 'npm'
2121

2222
- name: Install dependencies
23-
run: npm ci
23+
run: npm i
2424

2525
- name: Test TypeScript template
2626
run: |
2727
echo "Testing TypeScript template..."
28-
npm run test:template start-with-typescript "npm ci" "npm test"
28+
npm run test:template start-with-typescript "npm i" "npm test"
2929
3030
- name: Test REST template
3131
run: |
3232
echo "Testing REST template..."
33-
npm run test:template start-with-rest "echo \"REST template test coming soon\""
33+
npm run test:template start-with-rest "echo \"REST template test coming soon\""
34+
35+
- name: Test MCP template
36+
run: |
37+
echo "Testing MCP template..."
38+
npm run test:template add-mcp "echo \"Testing MCP augmentation template\""

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
cache: 'npm'
2121

2222
- name: Install dependencies
23-
run: npm ci
23+
run: npm i
2424

2525
- name: Run manifest validation
2626
run: |

.gitleaks.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Gitleaks configuration for allowlisting detected secrets
2+
# These secrets were detected in files that no longer exist but the commits remain
3+
4+
[[rules]]
5+
id = "curl-auth-header"
6+
[rules.allowlist]
7+
commits = [
8+
"37bbb045e7c4cbda32ed9894e53475553da83a0b",
9+
"dd01efc558aac6cb3724f46cc5b97a124dde78e3",
10+
"0ddbd71c1d29609e9c9901fe9ca1d41ac92fdf9a",
11+
"0d722f28d74020dd8a09f2f7b736fd39e745c4ab",
12+
"5035981f16d73efc604e91694cd9f8daa904d19c",
13+
"9e1c6ae02233a1f5d2578fed8cbca4788454e7ca",
14+
"4cd4925cc010f68c913a72a3fa89fe08ac0b17d6",
15+
"7c0de7af3c23f56d379c488c1ea1b056b158818d",
16+
"61996d7dcbe79a6688eb51ced0db65161729eaf2"
17+
]
18+
19+
[[rules]]
20+
id = "apollo-graphos-api-key"
21+
[rules.allowlist]
22+
commits = [
23+
"37bbb045e7c4cbda32ed9894e53475553da83a0b",
24+
"dd01efc558aac6cb3724f46cc5b97a124dde78e3",
25+
"0ddbd71c1d29609e9c9901fe9ca1d41ac92fdf9a",
26+
"0d722f28d74020dd8a09f2f7b736fd39e745c4ab",
27+
"5035981f16d73efc604e91694cd9f8daa904d19c",
28+
"9e1c6ae02233a1f5d2578fed8cbca4788454e7ca",
29+
"4cd4925cc010f68c913a72a3fa89fe08ac0b17d6",
30+
"61996d7dcbe79a6688eb51ced0db65161729eaf2"
31+
]

CHANGELOG.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,29 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [v1] - 2025-05-12
5+
## [v2.0.0] - 2025-09-30
6+
7+
### Added
8+
- **NEW**: MCP (Model Context Protocol) server template (`add-mcp/`)
9+
- Enables AI assistants to access GraphQL APIs
10+
- Includes Docker support and VSCode configuration
11+
- Quick GraphQL-to-AI integration setup
12+
- Enhanced `.gitignore` files across templates
13+
- `.vscode/settings.json` and `.vscode/tasks.json` configuration files
14+
15+
### Breaking Changes
16+
- **BREAKING**: Standardized template file naming:
17+
- `products.graphql``schema.graphql`
18+
- `getting-started.md``GETTING_STARTED.md`
19+
- Migration guide: Update your template references to use new file names
20+
21+
## [v1.0.0] - 2025-05-12
622

723
### Added
824
- start-with-typescript template
925
- Schema validation and print_depth support in manifest
1026
- Template test workflow and schema validation in CI
11-
- Community link in getting-started.md
27+
- Community link in GETTING_STARTED.md
1228

1329
### Changed
1430
- Updated folder structure and manifest fields to use `commands` array

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This document outlines the process for contributing new templates to the rover-i
1818
- Ensure the name is descriptive of the "starting" experience (e.g., `start-with-typescript`). Use kebab-case for folder names.
1919

2020
2. Required Artifacts (must-have items for every starter):
21-
- **Getting started documentation**: A `getting-started.md` file (or custom name, see `start_point_file` below). This file should explain what the starter is, how to use it, and any educational context.
21+
- **Getting started documentation**: A `GETTING_STARTED.md` file (or custom name, see `start_point_file` below). This file should explain what the starter is, how to use it, and any educational context.
2222
- **Project files**: All files needed for the starter to build and run (e.g., `package.json`, source files, configs).
2323
- **Test files**: Include tests to verify the starter works as intended.
2424
- **Manifest fields mapping**: Ensure your starter provides the following, which will be referenced in `manifest.json`:
@@ -42,11 +42,11 @@ This document outlines the process for contributing new templates to the rover-i
4242
"id": "typescript",
4343
"display_name": "Start with TypeScript",
4444
"path": "start-with-typescript",
45-
"commands": ["npm ci", "npm run dev"],
45+
"commands": ["npm i", "npm run dev"],
4646
"language": "TypeScript",
4747
"federation_version": "=2.10.0",
4848
"max_schema_depth": 5,
49-
"test_commands": ["npm ci", "npm test"],
49+
"test_commands": ["npm i", "npm test"],
5050
"routing_url": "http://localhost:4001",
5151
"print_depth": 2
5252
}
@@ -74,11 +74,11 @@ Each template must include the following in `manifest.json`:
7474
| routing_url | String | URL where the subgraph is exposed |
7575
| max_schema_depth | Int (optional) | Maximum depth for GraphQL file discovery (defaults to 5) |
7676
| print_depth | Int (optional) | Controls file display depth during init execution |
77-
| start_point_file | String (optional) | Custom name for the "getting started" documentation file (defaults to `getting-started.md`) |
77+
| start_point_file | String (optional) | Custom name for the "getting started" documentation file (defaults to `GETTING_STARTED.md`) |
7878

7979

8080
Required files:
81-
- Getting started documentation (default: `getting-started.md`)
81+
- Getting started documentation (default: `GETTING_STARTED.md`)
8282
- All necessary project files (`package.json`, source files, etc.)
8383
- Test files to verify the starter works
8484

@@ -87,7 +87,7 @@ Required files:
8787
When making breaking changes to existing templates:
8888

8989
1. Clearly document the changes in your PR description.
90-
2. Update the template's getting-started documentation to reflect the changes.
90+
2. Update the template's GETTING_STARTED documentation to reflect the changes.
9191
3. If removing or updating `manifest.json` fields:
9292
- Document any removed or changed fields.
9393
- Provide migration steps if applicable.
@@ -110,7 +110,7 @@ When making breaking changes to existing templates:
110110
- Follow the existing code style in the repository.
111111
- Ensure all files are properly formatted.
112112
- Run linting tools (e.g., ESLint, Prettier) before submitting your PR.
113-
- Maintain consistent documentation style in getting-started files.
113+
- Maintain consistent documentation style in GETTING_STARTED files.
114114
- Follow the established naming conventions for template folders (kebab-case).
115115
- Reference the repository's style guide if available.
116116

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

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Apollo MCP Server Configuration - Local Development
2+
# This configuration connects your GraphQL API to AI assistants via MCP
3+
4+
# Working local configuration:
5+
overrides:
6+
mutation_mode: all
7+
operations:
8+
source: collection
9+
id: default # localhost:4000 in browser → Sandbox → Collections → Create operations for MCP tools
10+
# Docs: https://www.apollographql.com/docs/apollo-mcp-server/define-tools
11+
introspection:
12+
introspect:
13+
enabled: true # Required for AI to understand your schema
14+
search:
15+
enabled: true
16+
execute:
17+
enabled: true
18+
validate:
19+
enabled: true
20+
transport:
21+
type: streamable_http
22+
port: 5050 # MCP server port
23+
endpoint: http://localhost:4000 # Your GraphQL API endpoint
24+
25+
# =============================================================================
26+
# Configuration Details
27+
# =============================================================================
28+
29+
name: "${PROJECT_NAME} GraphQL API"
30+
description: "GraphQL API for ${PROJECT_NAME}"
31+
32+
# Essential settings for local development:
33+
# - mutations enabled for full API access
34+
# - introspection enabled for schema discovery
35+
# - tools loaded from operation collections
36+
# - connects to GraphQL API on port 4000
37+
38+
# To customize:
39+
# 1. Create operation collections in Apollo Studio Sandbox
40+
# 2. Update endpoint to match your GraphQL server URL
41+
# 3. Run: docker build -f mcp.Dockerfile -t my-mcp-server .
42+
# 4. Run: docker run -p 5050:5050 --env-file .env my-mcp-server
43+
44+
# Environment variables (optional):
45+
# GRAPHQL_ENDPOINT - override endpoint URL
46+
# MCP_PORT - override MCP server port (default: 5050)
47+
# PROJECT_NAME - project identifier for AI assistant

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Apollo MCP Server Configuration - Staging Environment
2+
# This staging configuration provides settings with enhanced security
3+
4+
# Working staging configuration:
5+
overrides:
6+
mutation_mode: all
7+
require_confirmation: true # Confirmation required for mutations in staging
8+
operations:
9+
source: collection
10+
id: default # GraphQL endpoint in browser → Sandbox → Collections → Create operations for MCP tools
11+
# Docs: https://www.apollographql.com/docs/apollo-mcp-server/define-tools
12+
introspection:
13+
introspect:
14+
enabled: true # Enabled for testing (disable for production)
15+
search:
16+
enabled: true
17+
execute:
18+
enabled: true
19+
validate:
20+
enabled: true
21+
transport:
22+
type: streamable_http
23+
port: 5050 # MCP server port
24+
endpoint: "${STAGING_GRAPHQL_ENDPOINT}" # Your staging GraphQL API endpoint
25+
26+
# Authentication headers for staging
27+
headers:
28+
Authorization: "Bearer ${APOLLO_KEY}"
29+
X-Environment: "staging"
30+
Content-Type: "application/json"
31+
32+
# =============================================================================
33+
# Configuration Details
34+
# =============================================================================
35+
36+
name: "${PROJECT_NAME} GraphQL API (Staging)"
37+
description: "Staging environment for ${PROJECT_NAME} GraphQL API"
38+
39+
# Enhanced security settings for staging:
40+
# - mutations require confirmation
41+
# - authentication with staging API key
42+
# - reduced timeouts for reliability
43+
# - introspection enabled for testing
44+
45+
# Key staging differences from local:
46+
# - Authentication required via APOLLO_KEY
47+
# - Mutation confirmation enabled for safety
48+
# - Production-appropriate logging and monitoring
49+
# - Stricter rate limiting and validation
50+
51+
# To deploy staging:
52+
# 1. Create operation collections in Apollo Studio Sandbox
53+
# 2. Set STAGING_GRAPHQL_ENDPOINT to your staging GraphQL URL
54+
# 3. Set APOLLO_KEY for authentication
55+
# 4. Run: docker build -f mcp.Dockerfile -t my-mcp-staging .
56+
# 5. Run: docker run -p 5050:5050 --env-file .env.staging my-mcp-staging
57+
58+
# Environment variables for staging:
59+
# STAGING_GRAPHQL_ENDPOINT - staging GraphQL endpoint
60+
# APOLLO_KEY - API key for staging authentication
61+
# PROJECT_NAME - project identifier
62+
# MCP_PORT - MCP server port (default: 5050)

add-mcp/.env.template

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Apollo MCP Server Environment Configuration
2+
#
3+
# SETUP: Create your .env file from this template
4+
#
5+
# Copy command (works on macOS, Linux, and Windows):
6+
# cp .env.template .env
7+
#
8+
# NEVER commit .env to version control!
9+
10+
# Your project name
11+
PROJECT_NAME="{{PROJECT_NAME}}"
12+
13+
# Your GraphQL API endpoint
14+
GRAPHQL_ENDPOINT="{{GRAPHQL_ENDPOINT}}"
15+
16+
# Apollo API key (if your endpoint requires authentication)
17+
# Get from: https://studio.apollographql.com/user-settings/api-keys
18+
APOLLO_KEY="{{APOLLO_KEY}}"
19+
20+
# Apollo Graph Reference (Graph ID@Variant)
21+
APOLLO_GRAPH_REF="{{APOLLO_GRAPH_REF}}"
22+
23+
# MCP Server Configuration
24+
MCP_ENABLE=1
25+
MCP_PORT=5050
26+
27+
# Optional: Environment and logging
28+
NODE_ENV="development"
29+
LOG_LEVEL="info"

add-mcp/.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Node modules
9+
node_modules/
10+
11+
# Mac OS
12+
.DS_Store
13+
14+
# Environment variables
15+
.env
16+
.env.*
17+
!.env.template
18+
19+
# Docker volumes and caches
20+
.docker/
21+
22+
# IDE files
23+
.vscode/
24+
.idea/
25+
26+
# Temporary files
27+
*.tmp
28+
*.temp
29+
30+
# Generated files
31+
dist/
32+
build/

0 commit comments

Comments
 (0)