Token导航 LogoToken导航TokenDH.com
Apollo MCP Auth Demo logo
安全风控未说明官方级别未说明来源级核验

Apollo MCP Auth Demo

MCP Server

Apollo GraphQL网关演示项目,提供OAuth认证和MCP服务器集成功能,适用于API聚合和工具化场景。

工具数

4

提示词数

0

GitHub Stars

0

资源数

0
JavaScript微服务安全

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

StacklokLabs

提供方

StacklokLabs

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Apollo GraphQL Gateway Demo

Demo example of an Apollo Server acting as a GraphQL gateway/proxy with Okta OAuth authentication and MCP server integration.

Setup

  1. Copy the environment template and configure Okta:
cp .env.example .env
# Edit .env with your OKTA_DOMAIN and OKTA_ISSUER
  1. Install dependencies and start the server:
npm install
npm start

Authentication

Configure via REQUIRE_AUTH environment variable:

  • REQUIRE_AUTH=true - All requests require valid Okta JWT tokens (default)
  • REQUIRE_AUTH=false - Authentication is optional (testing only)

Apollo MCP Server

Run the Apollo MCP server with ToolHive to expose GraphQL operations as AI tools:

# Source your environment variables
source .env

thv run \
  --debug \
  --foreground \
  --transport streamable-http \
  --name apollo \
  --target-port 5000 \
  --proxy-port 8000 \
  --volume $(pwd)/mcp-server-data/apollo-mcp-config.yaml:/config.yaml \
  --volume $(pwd)/mcp-server-data:/data \
  --oidc-audience mcpserver \
  --resource-url http://localhost:8000/mcp \
  --oidc-issuer ${OKTA_ISSUER} \
  --oidc-jwks-url ${OKTA_ISSUER}/v1/keys \
  --token-exchange-audience 'backend' \
  --token-exchange-client-id ${OKTA_CLIENT_ID} \
  --token-exchange-client-secret ${OKTA_CLIENT_SECRET} \
  --token-exchange-scopes 'backend-api:read' \
  --token-exchange-url ${OKTA_ISSUER}/v1/token \
  apollo-mcp-server \
  -- /config.yaml

The MCP server will be available at http://localhost:8000/mcp.

Available MCP Tools

  • GetCountry - Fetch a specific country by code
  • GetAllCountries - Fetch all countries
  • GetEuropeanCountries - Fetch all European countries
  • GetCountriesByContinent - Fetch countries by continent code

Adding New Tools

Create .graphql files in mcp-server-data/operations/. Each operation becomes an MCP tool.

Kubernetes Deployment

This project includes Kubernetes manifests with ToolHive operator integration.

Prerequisites

Quick Start

  1. Configure the manifests - Replace placeholder values in k8s/*.yaml files with your OAuth configuration
  1. Deploy:
   kubectl apply -f k8s/
  1. Verify:
   kubectl get pods -n apollo
   kubectl get mcpserver -n apollo

See k8s/README.md for detailed deployment instructions, configuration options, and troubleshooting.

Architecture

Client → ngrok → MCP Proxy → Token Exchange → MCP Server → Apollo Gateway → Countries API

Docker

Build the container image:

docker build -t apollo-gateway .

The image is automatically built and published to ghcr.io/stackloklabs/apollo-mcp-auth-demo on every push to main.

License

Apache 2.0

目录标签

目录标签

JavaScript微服务安全GraphQL网关本地部署OAuth认证API聚合工具化

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

oauth

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明oauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP