NimbleBrain template for building MCP servers that wrap third-party REST APIs.
Replace every YOUR_* placeholder before shipping.
See README.md for setup instructions and ARCHITECTURE.md for a deep dive into the codebase.
manifest.json is the single source of truth for the version. Run make sync after editing it by hand.
make check # format + lint + typecheck + tests
make bundle # compile → prune dev deps → pack .mcpbTo bump the version:
make bump VERSION=0.2.0 # updates manifest.json and syncs package.json, server.json, src/constants.tsTest the stdio transport directly with MCP Inspector before bundling:
npm run build
YOUR_API_KEY_ENV_VAR=your_key npx @modelcontextprotocol/inspector node build/index.js --stdioOr test end-to-end via the bundle:
make bundle
mpak config set @nimblebraininc/YOUR_SERVER_NAME api_key=your_key_here
npx @modelcontextprotocol/inspector mpak run --local ./*.mcpbBuild and run the HTTP server in Docker, then connect MCP Inspector to it:
# 1. Create a .env file with your API key
echo "YOUR_API_KEY_ENV_VAR=your_key_here" > .env
# 2. Build the Docker image
npm run docker:build
# 3. Run the container (binds to localhost:3000)
npm run docker:run
# 4. In a second terminal, connect MCP Inspector
npm run inspect:httpThe container exposes POST/GET/DELETE /mcp (Streamable HTTP) and GET /health.
HOST defaults to 0.0.0.0 inside Docker; PORT defaults to 3000.
src/utils/types.ts— Zod schemas for each API response shapesrc/utils/apiClient.ts— rename class + error class, setBASE_URL, add one method per endpoint; also update the import inerrorResponse.tsto match the renamed error classsrc/utils/schemas.ts— Zod input schema for each toolsrc/utils/formatters.ts— one formatter per resource type (pure functions, no side-effects)src/handlers/— one file per tool (see Handler pattern in ARCHITECTURE.md)src/app.ts—server.registerTool()for each toolsrc/utils/config.ts— renameYOUR_API_KEY_ENV_VARsrc/constants.ts— setSERVER_NAMEonly; version is managed bymake syncmanifest.json+server.json— fill allTODOfields; runmake syncaftertests/— fixtures + testsskills/— oneSKILL.mdper user-facing workflow