
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@accelbyte/ags-api-mcp-server
Advanced tools
A simple Streamable HTTP-based MCP server with OAuth authorization
A simple Streamable HTTP-based MCP (Model Context Protocol) server built with TypeScript that issues Accelbyte AGS API requests on behalf of the authenticated user.
npm install -g pnpm)git clone <repository-url>
cd ags-api-mcp
pnpm install
pnpm run setup
This will create a .env file from the template.
.env:# Base URL for AccelByte environment, e.g. https://development.accelbyte.io
AB_BASE_URL=<your_base_url>
# OAuth Configuration (optional - defaults will be derived from AB_BASE_URL)
OAUTH_CLIENT_ID=<your_client_id> # Not needed for mcp-remote mode
OAUTH_CLIENT_SECRET=<redacted> # Not needed for mcp-remote mode
OAUTH_REDIRECT_URI=http://localhost:3334/oauth/callback # Required for mcp-remote
# Server Configuration
PORT=3000
NODE_ENV=development
Note: OAuth URLs (OAUTH_AUTHORIZATION_URL, OAUTH_TOKEN_URL) and OIDC configuration (JWKS_URI, JWT_ISSUER) will automatically be derived from AB_BASE_URL if not explicitly set.
pnpm run dev
pnpm run build
pnpm start
pnpm run watch
# Run the TypeScript unit tests (node:test via ts-node)
pnpm test
# Invoke the legacy integration harness
pnpm run test:integration
# Set up environment variables
pnpm run setup
# Test with environment variables
pnpm run test:env
# Process OpenAPI specs (filter APIs and clean up fields)
pnpm run process-specs
# With custom input folder
pnpm run process-specs -- /path/to/input/folder
# With custom input and output folders
pnpm run process-specs -- /path/to/input/folder /path/to/output/folder
The processing script performs the following cleanup operations:
host, externalDocs, and x-docs fieldsrealm field from x-versionThe server uses the following environment variables (configured in .env):
AB_BASE_URL - Base URL for AccelByte environment (e.g., https://development.accelbyte.io)PORT - Server port (default: 3000)NODE_ENV - Environment mode (development/production)LOG_LEVEL - Logging level (debug, info, warn, error, fatal)OAUTH_CLIENT_ID - OAuth client ID (not needed for mcp-remote mode)OAUTH_CLIENT_SECRET - OAuth client secret (not needed for mcp-remote mode)OAUTH_REDIRECT_URI - OAuth redirect URI (default: http://localhost:3334/oauth/callback)OAUTH_AUTHORIZATION_URL - OAuth authorization URL (default: {AB_BASE_URL}/iam/v3/oauth/authorize)OAUTH_TOKEN_URL - OAuth token URL (default: {AB_BASE_URL}/iam/v3/oauth/token)JWKS_URI - JWKS endpoint for token signature verification (default: {AB_BASE_URL}/iam/v3/oauth/jwks)JWT_ISSUER - Expected token issuer (default: {AB_BASE_URL})JWT_AUDIENCE - Expected token audience (default: 0f8b2a3ecb63466994d5e4631d3b9fe7)JWT_ALGORITHMS - Supported JWT algorithms (default: RS256)GET /auth/login - Initiate OAuth loginGET /oauth/callback - OAuth callback handlerGET /auth/logout - Logout and clear sessionPOST /mcp - Main MCP endpoint (requires authentication)GET /health - Server health statusThe server includes tools for AccelByte API interaction:
Get information about the authenticated token and user.
{
"name": "get_token_info",
"arguments": {}
}
The server also provides dynamically generated tools from OpenAPI specifications:
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {
"name": "example-client",
"version": "1.0.0"
}
}
}
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list"
}
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "get_token_info",
"arguments": {}
}
}
This MCP server uses a simplified OAuth 2.1 flow with static client credentials:
# Minimal configuration - URLs are automatically derived
AB_BASE_URL=https://development.accelbyte.io
Note: All OAuth and OIDC URLs are automatically derived from AB_BASE_URL. OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET are not needed in mcp-remote mode since mcp-remote handles OAuth using its own static credentials.
Configure mcp-remote to use the same static OAuth credentials:
{
"mcpServers": {
"ags-api-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:3000/mcp",
"3334",
"--host", "localhost",
"--static-oauth-client-info",
"{ \"client_id\": \"<your_client_id>\", \"client_secret\": \"<redacted>\" }"
]
}
}
}
Key Benefits:
src/
├── index.ts # Main server entry point
├── mcp-server.ts # MCP protocol implementation
├── oauth-middleware.ts # OAuth authentication middleware
└── tools/
└── static-tools.ts # Example MCP tools
StaticToolssrc/index.ts:mcpServer.registerTool('tool_name', toolInstance.method.bind(toolInstance));
mcpServer.registerTool('tool_name', handler, {
name: 'tool_name',
description: 'Tool description',
inputSchema: {
type: 'object',
properties: {
param1: { type: 'string', description: 'Parameter description' }
},
required: ['param1']
}
});
The MCP server can be deployed using Docker for easy containerization and deployment.
Build the Docker image from the project directory:
docker build -t ags-api-mcp-server .
.env file with your configuration:cp env.oidc.example .env
.env with your AccelByte environment details:# Base URL for AccelByte environment; REQUIRED
AB_BASE_URL=https://yourgame.accelbyte.io
# Server Configuration
PORT=3000
NODE_ENV=production
LOG_LEVEL=info
# Run in background
docker run -d \
--name ags-api-mcp-server \
--env-file .env \
-p 3000:3000 \
ags-api-mcp-server
# Or run interactively to see logs
docker run -it --rm \
--name ags-api-mcp-server \
--env-file .env \
-p 3000:3000 \
ags-api-mcp-server
docker run -d \
--name ags-api-mcp-server \
-e AB_BASE_URL=https://yourgame.accelbyte.io \
-e PORT=3000 \
-e NODE_ENV=production \
-e LOG_LEVEL=info \
-p 3000:3000 \
ags-api-mcp-server
# View logs
docker logs ags-api-mcp-server
# Follow logs in real-time
docker logs -f ags-api-mcp-server
# Stop and remove container
docker stop ags-api-mcp-server
docker rm ags-api-mcp-server
The Docker container includes a built-in health check that monitors the /health endpoint:
# Check container health status
docker ps
# Manual health check
curl http://localhost:3000/health
Test the server using curl or any HTTP client:
curl http://localhost:3000/health
curl -L http://localhost:3000/auth/login
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Cookie: auth_token=your_jwt_token" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
With mcp-remote, clean up the token caches under ~/.mcp-auth, e.g.
rm -rf ~/.mcp-auth
For issues and questions, please open an issue in the repository.
FAQs
A simple Streamable HTTP-based MCP server with OAuth authorization
We found that @accelbyte/ags-api-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.