Connecting clients
Guide
How to register the server with Claude Desktop, Claude Code, Cursor, Cline and other MCP clients, over stdio, through Docker, or by URL over HTTP.
An MCP client needs one of two things to use this server: the command that starts it (stdio, the default), or the URL of a running server (Streamable HTTP). Most desktop and CLI clients use stdio. They start node build/index.js as a child process and talk to it on stdin and stdout.1
The server supports MCP protocol revisions 2025-11-25 (clients that open with initialize) and 2026-07-28 (clients that open with server/discover), so older and newer clients both work without configuration.1 Build the server first (Installation); every stdio entry below points at build/index.js.
Standard stdio entry
Nearly every client (Claude Desktop, Cursor, Cline, Chatbox and others) accepts this mcpServers entry in its MCP config file:1
{
"mcpServers": {
"nsf-awards": {
"command": "node",
"args": ["/absolute/path/to/nsf-awards-mcp/build/index.js"],
"env": { "LOG_LEVEL": "info" }
}
}
}
- The path must be absolute, and
build/index.jsmust exist (runnpm run build). - On Windows, use forward slashes:
"C:/Users/you/nsf-awards-mcp/build/index.js". - If the client cannot find
node, put the full path of Node incommand(which nodeon macOS and Linux,where.exe nodeon Windows). envis optional. See Configuration for the variables, for exampleLOG_LEVEL,NSF_API_TIMEOUT_MSandNSF_API_MAX_RETRIES.2
The server writes its logs to stderr only, so they never mix with the protocol on stdout. Clients usually show stderr in their MCP server log.3
Claude Desktop
Add the standard entry to the config file:1
| OS | Config file |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
Quit and reopen Claude Desktop (a reload is often not enough), then check that “nsf-awards” lists 5 tools.1
Claude Code
The repository has a project-scoped .mcp.json. When you start Claude Code in the repository directory, it reads this file and offers to enable the project server:1
{
"mcpServers": {
"nsf-awards": {
"type": "stdio",
"command": "node",
"args": ["build/index.js"],
"env": {
"NODE_ENV": "production",
"LOG_LEVEL": "info"
}
}
}
}
The path is relative, so this entry works only from the repository root, after npm run build.4 Because it sets NODE_ENV=production, the server also writes logs/error.log and logs/combined.log under the working directory.3
From any other directory, add the server with the CLI:1
claude mcp add nsf-awards -- node /absolute/path/to/nsf-awards-mcp/build/index.js
# or, against a server already running over HTTP:
claude mcp add --transport http nsf-awards http://127.0.0.1:3000/mcp
Cursor, Cline and other clients
Put the standard entry in the client’s MCP config file:1
| Client | Where the entry goes |
|---|---|
| Cursor | .cursor/mcp.json in a project, or ~/.cursor/mcp.json |
| Cline | Its “Configure MCP Servers” settings file |
| Others | See the client’s documentation for the file location |
Docker
A client can start the container instead of Node. Build the image first (docker build -t nsf-awards-mcp ., see Deployment):1 2
{
"mcpServers": {
"nsf-awards": {
"command": "docker",
"args": ["run", "-i", "--rm", "nsf-awards-mcp"]
}
}
}
The -i flag is required, because the container speaks MCP on stdin and stdout.2 To pass settings, add -e NAME=value arguments before the image name, for example "-e", "LOG_LEVEL=debug".
HTTP clients
A client that connects by URL uses http://<host>:<port>/mcp. The default is http://127.0.0.1:3000/mcp, once the server runs in HTTP mode:1
MCP_TRANSPORT=http node build/index.js # or: node build/index.js --http
The server chooses HTTP when the command line contains --http or when MCP_TRANSPORT=http.5 By default it listens on loopback only and accepts only localhost, 127.0.0.1 and [::1] as the Host header.6 To connect from another machine or from a browser-based client, read HTTP transport first: it explains HOST, MCP_ALLOWED_HOSTS and MCP_ALLOWED_ORIGINS.
Check the connection
After you connect, the client should list five tools: search_nsf_awards, search_by_institution, search_by_pi, get_award_details and get_project_outcomes, and two resource templates, nsf://award/{id} and nsf://award/{id}/outcomes.7 Try prompts such as these:1
Find active NSF awards about wildfire in Arizona over $500,000
Show NSF awards to the University of New Mexico that expire in 2026
Get the abstract and publications for NSF award 2632685
Summarize the outcomes of award 1114898
The README suggests these as well. The third uses search_by_pi with includeCoPIs; put a real name in place of
the placeholder:7
Find recent NSF awards about wildfire in Arizona
List active NSF awards to the University of New Mexico over $1 million
Which awards has <first name> <last name> led or been a Co-PI on?
Summarize the Project Outcomes Report for award 1114898
If the tools do not appear, see Troubleshooting.
Next steps
- Overview and the tool pages for what each tool accepts and returns.
- Server instructions and protocol details for what the server sends to clients at connection time.