diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2e4fcdc7f12c0dcef7a2c7add6b0e7892b9ac2b0..d95c4620d281693da9e69143c06db82e5796ac14 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,9 +29,9 @@ variables:
 image: $CI_REGISTRY_IMAGE
 
 stages:
+  - setup
   - code_style
   - linting
-  - setup
   - test
   - deploy
 
@@ -53,6 +53,14 @@ pylint:
     - make lint
   allow_failure: true
 
+mypy:
+  tags: [ docker ]
+  stage: linting
+  script:
+    - pip install mypy types-PyYAML types-jsonschema types-requests types-setuptools types-lxml types-python-dateutil
+    - make mypy
+  allow_failure: true
+
 # run unit tests
 unittest_py3.7:
   tags: [ docker ]
@@ -142,6 +150,7 @@ build-testenv:
   stage: setup
   only:
       - schedules
+      - web
   script:
     - cd unittests/docker
     - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
diff --git a/Makefile b/Makefile
index d15c830d8e4cf6e4bc0b519b9fa5b8cb5f224043..eb767dd4053a2b232d425126358cfb0fd23ffb1c 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ doc:
 install:
 	@echo "Not implemented yet, use pip for installation."
 
-check: style lint
+check: style lint mypy
 .PHONY: check
 
 style:
@@ -43,6 +43,10 @@ lint:
 	pylint --unsafe-load-any-extension=y -d all -e E,F src/linkahead/common
 .PHONY: lint
 
+mypy:
+	mypy src/linkahead
+.PHONY: mypy
+
 unittest:
 	tox -r
 .PHONY: unittest
diff --git a/tox.ini b/tox.ini
index 5282b0782bea1bc9515b9362e3ef2021f3f9cd11..9a862f698573c864921ab9998d1a6a8a07978126 100644
--- a/tox.ini
+++ b/tox.ini
@@ -7,6 +7,7 @@ deps = .
     pynose
     pytest
     pytest-cov
+    mypy
     jsonschema>=4.4.0
     setuptools
 commands=py.test --cov=caosdb -vv {posargs}
diff --git a/unittests/docker/Dockerfile b/unittests/docker/Dockerfile
index 9b848cf69c829408f3f3edd599323b6b0321e041..51a9006ff59aad81e3f2fc09b5d783518a07f06e 100644
--- a/unittests/docker/Dockerfile
+++ b/unittests/docker/Dockerfile
@@ -12,4 +12,4 @@ ARG COMMIT="dev"
 # TODO Rename to linkahead
 RUN git clone -b dev https://gitlab.indiscale.com/caosdb/src/caosdb-pylib.git linkahead-pylib && \
     cd linkahead-pylib && git checkout $COMMIT && pip3 install .
-RUN pip3 install recommonmark sphinx-rtd-theme
+RUN pip3 install recommonmark sphinx-rtd-theme mypy