Installation

Guide

How to install the NSF Awards MCP server from source, check that it runs, update it, and remove it.

Status
stable
Trust tier
unverified
Generated
claude-code/claude-opus-5-5, 2026-12-05
Tags
installationsetupnodebuild

This guide installs the NSF Awards MCP server (version 2.0.0) from source on macOS, Linux or Windows, checks that the build runs, and covers updates and removal. The server is a Node.js program. An MCP client starts it (stdio) or connects to it by URL (Streamable HTTP). After you install it, go to Connecting clients.

The package is not published to npm. You install it from the git repository, or you build the Docker image (see Deployment).1 The NSF Award API is public, so you need no API key or account.

Prerequisites

Requirement Notes
Node.js 20 or later package.json declares "engines": { "node": ">=20" }.2 The Docker image and CI use Node 22.1 Check with node --version.
npm and git npm comes with Node.js.
Network access to https://www.research.gov The server calls the NSF Award API there. No key is needed.
Docker (optional) Only to build and run the container image.

You can install Node.js from nodejs.org, with a package manager (brew install node, winget install OpenJS.NodeJS.LTS, or your Linux distribution’s NodeSource packages), or with a version manager such as nvm.1

Install from source

git clone https://github.com/tyson-swetnam/nsf-awards-mcp.git
cd nsf-awards-mcp
npm install
npm run build        # compiles src/ to build/

npm run build runs tsc and writes the compiled server to build/. The entry file is build/index.js ("main": "build/index.js").2

Note the absolute path of build/index.js. MCP clients need it:

  • macOS and Linux: realpath build/index.js
  • PowerShell: Resolve-Path build\index.js

The quick start script

quickstart.sh in the repository root does the same steps: it runs npm install if node_modules is missing, runs npm run build if build/ is missing, and prints a Claude Desktop config entry with the absolute path of build/index.js filled in.3 The script accepts Node.js 18 or later, but the package needs 20 or later, so check node --version yourself.2

bash quickstart.sh

Check that it runs

Start the server by hand:

node build/index.js

In stdio mode the server writes one log line to stderr and then waits for an MCP client on stdin:1

info: Starting NSF Awards MCP server {"timestamp":"...","transport":"stdio","version":"2.0.0"}

Press Ctrl+C to stop it. Nothing is written to stdout, because stdout carries the MCP protocol in stdio mode.4 npm start runs the same command (node build/index.js).2

To check the HTTP side and the version together:1

MCP_TRANSPORT=http PORT=3917 node build/index.js &
sleep 1
curl http://127.0.0.1:3917/health     # {"status":"ok","version":"2.0.0"}
kill %1

The server picks HTTP when the command line contains --http or when MCP_TRANSPORT is http; otherwise it uses stdio.5 See HTTP transport for the endpoints and settings.

Tests and live checks

Command What it does
npm test Runs the offline Jest suite. The NSF API is mocked, so no network is needed.
npm run validate:live Builds, then starts build/index.js over stdio, completes a handshake on both protocol eras (2025-11-25 and 2026-07-28), checks that tools/list has the five tools with output schemas, and calls each tool once against the real NSF API. It exits 1 on any failure.6
npm run test:live Builds, then runs the slower live Jest suite with NSF_LIVE=1.2

See Testing for the test suites in detail.

Install with Docker instead

docker build -t nsf-awards-mcp .
docker run -i --rm nsf-awards-mcp

The image runs node build/index.js (stdio) by default, so docker run needs -i to keep stdin open.7 See Deployment for image defaults, HTTP mode and Docker Compose, and Connecting clients for the client entry that starts the container.

Update

cd /path/to/nsf-awards-mcp
git pull
npm install
npm run build

Then restart your MCP client. For Docker, build the image again (docker build -t nsf-awards-mcp .).1

Version 2.0.0 changed the tool output. If you upgrade from 1.x, read Migrating from 1.x.8

Uninstall

  1. Remove the nsf-awards entry from your MCP client config.
  2. Delete the repository directory.
  3. If you built the image, run docker rmi nsf-awards-mcp.1

Next steps

  1. Installation guide (INSTALL.md) ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7

  2. package.json (version, scripts, engines) ↩ ↩2 ↩3 ↩4 ↩5

  3. Quick start script ↩

  4. Logger configuration (src/utils/logger.ts) ↩

  5. Server entry point (src/index.ts) ↩

  6. Live smoke check of the built server ↩

  7. Dockerfile ↩

  8. Project README ↩

Sources

  1. Installation guide (INSTALL.md) install-guide
  2. Project README readme
  3. package.json (version, scripts, engines) package-json
  4. Server entry point (src/index.ts) entry-point
  5. Logger configuration (src/utils/logger.ts) logger
  6. Quick start script quickstart
  7. Live smoke check of the built server validate-live
  8. Dockerfile dockerfile