We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/snyk/snyk-studio-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
# Copyright 2022 Snyk Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# project variables
PROJECT_NAME := studio-mcp
# build variables
.DEFAULT_GOAL = test
BUILD_DIR := build
DEV_GOARCH := $(shell go env GOARCH)
DEV_GOOS := $(shell go env GOOS)
GOPATH := $(shell go env GOPATH)
GOROOT := $(shell go env GOROOT)
VERSION := $(shell git show -s --format=%cd --date=format:%Y%m%d.%H%M%S)
COMMIT := $(shell git show -s --format=%h)
LDFLAGS_DEV := "-X 'github.com/snyk/studio-mcp/application/config.Development=true' -X 'github.com/snyk/studio-mcp/application/config.Version=v$(VERSION)-SNAPSHOT-$(COMMIT)'"
TOOLS_BIN := $(shell pwd)/.bin
OVERRIDE_GOCI_LINT_V := v2.6.1
GOLICENSES_V := v1.6.0
PACT_V := 2.4.2
TIMEOUT := "-timeout=45m"
## tools: Install required tooling.
.PHONY: tools
tools: $(TOOLS_BIN)/go-licenses $(TOOLS_BIN)/golangci-lint
$(TOOLS_BIN)/go-licenses:
@echo "==> Installing go-licenses"
@GOBIN=$(TOOLS_BIN) go install github.com/google/go-licenses@$(GOLICENSES_V)
$(TOOLS_BIN)/golangci-lint:
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/$(OVERRIDE_GOCI_LINT_V)/install.sh | sh -s -- -b $(TOOLS_BIN)/ $(OVERRIDE_GOCI_LINT_V)
## clean: Delete the build directory
.PHONY: clean
clean:
@echo "==> Removing '$(BUILD_DIR)' directory..."
@rm -rf $(BUILD_DIR)
## lint: Lint code with golangci-lint.
.PHONY: lint
lint: $(TOOLS_BIN)/golangci-lint
@echo "==> Linting code with 'golangci-lint'..."
@$(TOOLS_BIN)/golangci-lint run ./...
## lint: Lint code with golangci-lint.
.PHONY: lint-fix
lint-fix: $(TOOLS_BIN)/golangci-lint
@echo "==> Linting and fixing code with 'golangci-lint'..."
@$(TOOLS_BIN)/golangci-lint run --fix ./...
## test: Run all tests.
.PHONY: test
test:
@echo "==> Running unit tests..."
@mkdir -p $(BUILD_DIR)
go test $(TIMEOUT) -failfast -cover -coverprofile=$(BUILD_DIR)/coverage.out ./...
## generate: Regenerate generated files (e.g. mocks).
.PHONY: generate
generate:
@echo "==> Generating generated files..."
@go generate ./...
## build: Build binary for default local system's OS and architecture.
.PHONY: build
build:
@echo "==> Building binary..."
@echo " running go build for GOOS=$(DEV_GOOS) GOARCH=$(DEV_GOARCH)"
# workaround for missing .exe extension on Windows
ifeq ($(OS),Windows_NT)
@go build -o $(BUILD_DIR)/$(PROJECT_NAME).$(DEV_GOOS).$(DEV_GOARCH).exe \
-ldflags=$(LDFLAGS_DEV)
else
@go build -o $(BUILD_DIR)/$(PROJECT_NAME).$(DEV_GOOS).$(DEV_GOARCH) \
-ldflags=$(LDFLAGS_DEV)
endif
## build-debug: Build binary for debugging
.PHONY: build-debug
build-debug:
@make clean
@echo "==> Building binary..."
@echo " running go build with debug flags"
ifeq ($(OS),Windows_NT)
@go build -o $(BUILD_DIR)/$(PROJECT_NAME).exe \
-ldflags=$(LDFLAGS_DEV) \
-gcflags="all=-N -l"
else
@go build -o $(BUILD_DIR)/$(PROJECT_NAME) \
-ldflags=$(LDFLAGS_DEV)
-gcflags="all=-N -l"
endif
.PHONY: license-update
license-update: $(TOOLS_BIN)/go-licenses
@echo "==> Updating license information..."
@rm -rf 'licenses'
@GOROOT=$(GOROOT) $(TOOLS_BIN)/go-licenses save ./pkg/mcp --save_path="licenses" --ignore "github.com/snyk/studio-mcp"
.PHONY: licenses
licenses: $(TOOLS_BIN)/go-licenses
@GOROOT=$(GOROOT) $(TOOLS_BIN)/go-licenses report ./pkg/mcp --ignore github.com/snyk/studio-mcp
help: Makefile
@echo "Usage: make <command>"
@echo ""
@echo "Commands:"
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'