We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/axelspringer/snyk-mcp-rest'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
setup.shβ’1.83 KiB
#!/bin/bash
# Snyk MCP REST Client Setup Script
# This script sets up the development environment for the project
set -e # Exit on error
echo "π Starting setup for snyk-mcp-rest..."
echo ""
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "β Error: Node.js is not installed."
echo "Please install Node.js from https://nodejs.org/"
exit 1
fi
NODE_VERSION=$(node -v)
echo "β Node.js version: $NODE_VERSION"
# Check if npm is installed
if ! command -v npm &> /dev/null; then
echo "β Error: npm is not installed."
exit 1
fi
NPM_VERSION=$(npm -v)
echo "β npm version: $NPM_VERSION"
echo ""
# Create res directory if it doesn't exist
mkdir -p res
# Download the OpenAPI spec
if command -v curl &> /dev/null; then
curl -sSL "$OPENAPI_URL" -o "$OPENAPI_FILE"
echo "β Downloaded OpenAPI spec to $OPENAPI_FILE"
elif command -v wget &> /dev/null; then
wget -q "$OPENAPI_URL" -O "$OPENAPI_FILE"
echo "β Downloaded OpenAPI spec to $OPENAPI_FILE"
else
echo "β Error: Neither curl nor wget is installed."
echo "Please install curl or wget to download the OpenAPI specification."
exit 1
fi
echo ""
# Install dependencies
echo "π¦ Installing dependencies..."
npm install
echo ""
echo "π¨ Generating API client from OpenAPI spec..."
npm run generate
echo ""
echo "ποΈ Building TypeScript code..."
npm run build
echo ""
echo "π§ͺ Running tests to verify setup..."
npm test
echo ""
echo "β Setup complete!"
echo ""
echo "Next steps:"
echo " 1. Create a .env file with your Snyk API credentials:"
echo " SNYK_API_KEY=your-api-key-here"
echo ""
echo " 2. Run the example:"
echo " npx ts-node examples/basic-usage.ts"
echo ""
echo " 3. Start developing!"
echo " npm run test:watch # Run tests in watch mode"
echo " npm run test:ui # Open test UI"
echo ""