{"id":32633783,"url":"https://github.com/stackloklabs/apollo-mcp-auth-demo","last_synced_at":"2026-07-02T19:32:37.425Z","repository":{"id":320576625,"uuid":"1082579040","full_name":"StacklokLabs/apollo-mcp-auth-demo","owner":"StacklokLabs","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-20T09:55:36.000Z","size":38,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-20T11:33:01.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StacklokLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-24T13:01:04.000Z","updated_at":"2025-11-20T09:55:40.000Z","dependencies_parsed_at":"2025-10-24T16:14:02.577Z","dependency_job_id":"7f630aed-f10f-40a8-b8ed-0a4b40455441","html_url":"https://github.com/StacklokLabs/apollo-mcp-auth-demo","commit_stats":null,"previous_names":["stackloklabs/apollo-mcp-auth-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StacklokLabs/apollo-mcp-auth-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fapollo-mcp-auth-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fapollo-mcp-auth-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fapollo-mcp-auth-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fapollo-mcp-auth-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StacklokLabs","download_url":"https://codeload.github.com/StacklokLabs/apollo-mcp-auth-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fapollo-mcp-auth-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35060907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-30T23:55:43.642Z","updated_at":"2026-07-02T19:32:37.417Z","avatar_url":"https://github.com/StacklokLabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apollo GraphQL Gateway Demo\n\nDemo example of an Apollo Server acting as a GraphQL gateway/proxy with Okta OAuth authentication and MCP server integration.\n\n## Setup\n\n1. Copy the environment template and configure Okta:\n```bash\ncp .env.example .env\n# Edit .env with your OKTA_DOMAIN and OKTA_ISSUER\n```\n\n2. Install dependencies and start the server:\n```bash\nnpm install\nnpm start\n```\n\n## Authentication\n\nConfigure via `REQUIRE_AUTH` environment variable:\n- `REQUIRE_AUTH=true` - All requests require valid Okta JWT tokens (default)\n- `REQUIRE_AUTH=false` - Authentication is optional (testing only)\n\n## Apollo MCP Server\n\nRun the Apollo MCP server with ToolHive to expose GraphQL operations as AI tools:\n\n```bash\n# Source your environment variables\nsource .env\n\nthv run \\\n  --debug \\\n  --foreground \\\n  --transport streamable-http \\\n  --name apollo \\\n  --target-port 5000 \\\n  --proxy-port 8000 \\\n  --volume $(pwd)/mcp-server-data/apollo-mcp-config.yaml:/config.yaml \\\n  --volume $(pwd)/mcp-server-data:/data \\\n  --oidc-audience mcpserver \\\n  --resource-url http://localhost:8000/mcp \\\n  --oidc-issuer ${OKTA_ISSUER} \\\n  --oidc-jwks-url ${OKTA_ISSUER}/v1/keys \\\n  --token-exchange-audience 'backend' \\\n  --token-exchange-client-id ${OKTA_CLIENT_ID} \\\n  --token-exchange-client-secret ${OKTA_CLIENT_SECRET} \\\n  --token-exchange-scopes 'backend-api:read' \\\n  --token-exchange-url ${OKTA_ISSUER}/v1/token \\\n  apollo-mcp-server \\\n  -- /config.yaml\n```\n\nThe MCP server will be available at `http://localhost:8000/mcp`.\n\n### Available MCP Tools\n\n- `GetCountry` - Fetch a specific country by code\n- `GetAllCountries` - Fetch all countries\n- `GetEuropeanCountries` - Fetch all European countries\n- `GetCountriesByContinent` - Fetch countries by continent code\n\n### Adding New Tools\n\nCreate `.graphql` files in `mcp-server-data/operations/`. Each operation becomes an MCP tool.\n\n## Kubernetes Deployment\n\nThis project includes Kubernetes manifests with ToolHive operator integration.\n\n### Prerequisites\n\n- Kubernetes cluster\n- [ToolHive Operator](https://github.com/stacklok/toolhive) installed\n- [ngrok Operator](https://github.com/ngrok/ngrok-operator) installed (for external access)\n- OAuth provider configured (e.g., Okta)\n\n### Quick Start\n\n1. **Configure the manifests** - Replace placeholder values in `k8s/*.yaml` files with your OAuth configuration\n\n2. **Deploy:**\n   ```bash\n   kubectl apply -f k8s/\n   ```\n\n3. **Verify:**\n   ```bash\n   kubectl get pods -n apollo\n   kubectl get mcpserver -n apollo\n   ```\n\nSee [k8s/README.md](k8s/README.md) for detailed deployment instructions, configuration options, and troubleshooting.\n\n### Architecture\n\n```\nClient → ngrok → MCP Proxy → Token Exchange → MCP Server → Apollo Gateway → Countries API\n```\n\n## Docker\n\nBuild the container image:\n\n```bash\ndocker build -t apollo-gateway .\n```\n\nThe image is automatically built and published to `ghcr.io/stackloklabs/apollo-mcp-auth-demo` on every push to main.\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackloklabs%2Fapollo-mcp-auth-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackloklabs%2Fapollo-mcp-auth-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackloklabs%2Fapollo-mcp-auth-demo/lists"}