Open-source project
MapServer/MapServer avatar
MapServer/MapServer

MapServer: a CGI program and a configuration file instead of a GIS stack

Source code of the MapServer project. Please submit pull requests to the 'main' branch.

1,229 stars419 forksCNOASSERTION

At a glance

What is it?
MapServer is a C project for building web based GIS applications, and its basic form is a CGI program driven by a mapfile that answers spatial requests such as maps, scalebars and point, area and feature queries. The programming is optional for most of the configuration, and the same application can be extended through MapScript bindings in Python, PHP, Java, C# and Perl.
Who is it for?
MapServer fits a team that needs a standards compliant map service on a small server, with a configuration file doing most of the work and a C core that is cheap to run and has been in production for decades.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The basic system is one binary and one configuration file

MapServer is a system for developing web-based GIS applications, and the description of the basic system is worth reading slowly because it explains the whole philosophy of the project.

The basic system consists of a CGI program that can be configured to respond to a variety of spatial requests, like making maps, scalebars, and point, area and feature queries. Virtually all aspects of an application, from the web interface to the map appearance, can be developed without any programming.

That last sentence is the design decision. MapServer is not a library you call from a web framework. It is a server with a configuration file, and the configuration file is where the map lives: the layers, the styling, the scale bars, the queries. For the large class of applications that are a map with a couple of interactive layers, that is the entire requirement, and a configuration file is something a GIS analyst can write and a web server can serve.

For the more ambitious user, the same application can be enhanced using Python, PHP, Java, JavaScript or many other web technologies. The README's phrase for the audience is precise: for the more ambitious user. The tool is not designed to make the ambitious case easy, it is designed to not get in the way of the simple case.

The project is written in C, and the site is mapserver.org. The metadata published for this repository names a custom licence with a LICENSE.md at the root, and the last push was on 2026-10-19.

MapScript is how you add a programming language

The scripting layer is called MapScript, and the build system is where you can see exactly which languages exist.

The Makefile in the repository defines a path for each language's binding, with variables for the PHP, Python, Java, C# and Perl modules, and it defines three sets of CMake flags, one per binding family, which are otherwise near identical. The Python set turns on the client WMS, client WFS, KML and SOS support, the Python binding, thread safety, FriBidi, FastCGI, Exempi, RSVG, curl and HarfBuzz, with a release build type and an install prefix of /tmp/install-mapserver. The PHP set is the same with Python turned off and PHPNG turned on, and the third set turns on C# and Perl as well.

So the shape of the project is a C core with thin language bindings, and the build matrix is the honest description of which bindings are still being exercised in continuous integration.

The thread safety flag is worth noticing, because it is the difference between a server you can run behind a web server and one you cannot. And the C# entry in that third flag set is interesting given the age of the project, since it suggests the binding set has been kept current rather than frozen at the point where MapScript was first written.

For anyone evaluating the project, the practical question is not whether MapScript exists but which of these languages the binding is maintained for, and the build flags answer that.

OGC services, and a long list of data backends

The topic list on the repository is the fastest way to see the standards surface, and it is a long one: ogc, ogc-api, ogc-services, wms, wfs, wcs, sos, gml, plus gdal and the FOSS4G and OSGeo affiliations.

So MapServer speaks the OGC web service family, and the topics also name OGC API, which is the newer generation of the same specifications, and GML for the encoding. The Makefile flags confirm this from the other side, with WITH_CLIENT_WMS, WITH_CLIENT_WFS and WITH_SOS as separate switches, and KML as a fourth, which is a client side capability rather than an OGC service.

The data side is broader than the service side, and the credits section is where you find out who wrote what. GDAL and OGR support and significant WMS support were provided by DM Solutions Group with funding support from the Canadian Government's GeoConnections Program and the Canadian Forest Service. PostGIS spatial database support was provided by Dave Blasby of Refractions Research. PDF support was developed by Jeff Spielberg and Jamie Wall of Market Insite Group. Oracle Spatial support was developed by Rodrigo Cabral of CTTMAR and UNIVALI in Brazil. Raster support was developed by Pete Olson of the State of Minnesota Land Management Information Center and maintained by Frank Warmerdam, who also wrote the Shapelib code that parts of the tree are derived from.

That list is the honest answer to how much of MapServer is one thing versus an accumulation of contributions. The core and the CGI model are the original design. PostGIS, Oracle, PDF, raster and the client WMS support are features added by people who needed them, which is why the data backend you happen to use determines how well supported it is.

Building it means choosing feature flags

MapServer is built with CMake, and the repository carries both a Makefile and a CMakeLists.txt, with INSTALL.md and INSTALL_CMAKE.md for the two paths.

The Makefile is where the build matrix is visible, because each of the three flag sets lists the features that configuration compiles in. The shared ones are the OGC clients and the KML and SOS support, then the language bindings, then a set of capability switches.

bash
-DWITH_CLIENT_WMS=1 \
			  -DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1

The rest of that line is the set of optional capabilities, with thread safety, the FriBidi text layout library, FastCGI, Exempi for metadata, RSVG for SVG rendering, curl for remote data, and the fuzzer. A fourth variant adds the MSSQL2008 option and a coverage variant passes the coverage flags through the compiler and linker.

Two of those deserve comment because they change what you can deploy. FastCGI is how the CGI program avoids being started per request, and without it a busy map server forks a process for every tile request. Thread safety is what lets a single process serve concurrent requests safely.

The repository also carries a fuzzers/ directory, which is a serious signal about how the code is tested, and a pre-commit configuration, a.clang-format and a.flake8, so the formatting and linting rules are enforced rather than suggested. The build also installs into /tmp/install-mapserver, which is the kind of detail that only makes sense if the build is expected to run in continuous integration, and the ci/ directory and the AppVeyor configuration are there for exactly that.

Autotests in strict mode, and a suite of its own

The test side of MapServer is a project in its own right, and the Makefile shows the entry point.

bash
AUTOTEST_OPTS?=--strict_mode

The msautotest/ directory at the top level is the test suite, and the strict mode option is the default, which means the tests fail on anything that is not strictly correct rather than warning and continuing. For a server that parses files supplied by users and answers standards compliant requests, that is the right default.

The suite covers the mapfile behaviour, which is the configuration language and therefore the public interface of the project, and it runs the same way a user would: by configuring a mapfile and checking the response. The variable for the extra options exists so that a developer can turn strict mode off while debugging a single case.

The other test directories are worth naming. The tests/ directory sits alongside msautotest/ and holds the unit level tests, fuzzers/ holds the fuzz targets, and the scripts/ directory holds the tooling around them. The Zenodo DOI badge and the CITATION.cff file are there for the academic citation of a release, which is what an organisation that has had NASA funding since the 1990s tends to need.

For a project that started in the 1990s, the test infrastructure is the most modern part of it, and it was clearly rewritten rather than inherited.

The history is written into the credits

The credits section of the README is unusual in how much it says, and it is the clearest account of what MapServer is and how it got here.

MapServer was originally written by Stephen Lime. Major funding for development has been provided by NASA through cooperative agreements with the University of Minnesota Department of Forest Resources, and portions of the code are copyright the State of Minnesota Land Management Information Center from 1998. Portions are derived from Shapelib, copyright Frank Warmerdam from 1995 to 1999, and supporting packages are covered by their own copyrights.

So the lineage is: a university and an agency wrote a CGI program for serving forest data, it grew into a general web GIS engine, and a series of contractors and researchers extended it in the directions their own work needed. DM Solutions Group appears repeatedly, with the PHP and MapScript work and the GDAL and WMS support, and the Canadian funding agencies appear alongside them, which is a pattern you only see in infrastructure that has been continuously useful to somebody for thirty years.

That history also explains the technical profile. A CGI program with a configuration file is a very different design from a modern GIS stack, and it survived because it is cheap to deploy, easy to configure, and slow to change in ways that break users.

The funding and the copyright notices also mean that the licensing is layered, which is why the repository points at a LICENSE.md rather than naming a standard licence, and why the README says supporting packages are covered by their own copyrights.

Where to send a change, and what the releases look like

The repository description says to submit pull requests to the main branch, and the default branch is main, so that instruction is current rather than a leftover.

The issue tracker is where bug reports and enhancement submissions go, and the README asks that if you make changes or enhancements yourself, you let them know so that they might be incorporated into future releases. That is a very old-fashioned sentence and it points at how the project works: a patch that is not submitted may sit in someone's tree for years, and the request is not to send a pull request but to tell the project.

There is a user mailing list, linked from the community page, which is where questions about using the software go as opposed to defects in it.

The documentation lives in a separate repository, MapServer-documentation, and the README asks you to use it for filing documentation tickets and changes, which keeps the documentation history separate from the code history and lets the docs be versioned against releases.

The release names follow a rel-8-6-x pattern, with 8.6.6 on 2026-09-06, 8.6.5 on 2026-07-10 and 8.6.4 on 2026-06-02, so the patch releases arrive every couple of months. There is also a MIGRATION_GUIDE.md at the root, which tells you what changed between versions, a HISTORY.md for the longer record, and a SECURITY.md for the disclosure process.

Editorial conclusion

MapServer fits a team that needs a standards compliant map service on a small server, with a configuration file doing most of the work and a C core that is cheap to run and has been in production for decades. It does not fit a team that wants an application framework rather than a server, since the whole model is a CGI program answering requests, and it does not fit a project whose data lives in a modern cloud-native stack without a bridge, because the deployment story is a web server with a module rather than a container that scales horizontally. Verify three things before you commit: that the OGC services you need are enabled in your build, since the feature flags in the Makefile show WMS, WFS, SOS and KML as separate switches, that the data backend you have is on the list, since PostGIS, Oracle Spatial and shapefile support come from different contributors, and that you are on a release rather than the branch, since the tags follow the rel-8-6-x pattern and the default branch is main.

Frequently asked questions

What is MapServer and how does a basic application work?

It is a system for developing web based GIS applications whose basic system consists of a CGI program that can be configured to respond to a variety of spatial requests, like making maps, scalebars, and point, area and feature queries. Virtually all aspects of an application, from the web interface to the map appearance, can be developed without any programming.

Which languages can I use to extend a MapServer application?

The README says applications can be enhanced using Python, PHP, Java, JavaScript or many other web technologies, through the MapScript layer. The Makefile shows the binding build paths for PHP, Python, Java, C# and Perl, with separate CMake flag sets for the Python, PHP and combined binding builds.

Which OGC services does MapServer support?

The repository topics name OGC, OGC API, OGC services, WMS, WFS, WCS, SOS and GML, and the build flags show the OGC clients, the KML client and the SOS support as separate switches, alongside thread safety, FriBidi, FastCGI, Exempi, RSVG and curl.

How is MapServer built and tested?

With CMake, following INSTALL.md or INSTALL_CMAKE.md. The Makefile sets the feature flags per binding, and the msautotest/ directory holds the test suite, which runs with AUTOTEST_OPTS set to --strict_mode by default, alongside a tests/ directory, a fuzzers/ directory and a ci/ directory.

Where do I report bugs and documentation problems?

Bug reports and enhancement submissions go to the MapServer issue tracker, and if you make changes or enhancements yourself the README asks you to let the project know. Documentation tickets and changes belong in the separate MapServer-documentation repository, and usage questions go to the user mailing list linked from the community page.

Official sources

  1. Issues
  2. MapServer/MapServer on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/mapserver-mapserver.svg)](https://hysenlabs.com/projects/mapserver-mapserver)

Was this useful?