nbrt-mcp
v0.3.0
Published
MCP tool for NBRT.
Downloads
1,018
Readme
nbrt-mcp
MCP server template for building Model Context Protocol (MCP) servers and tools.
Built with TypeScript, minimal dependencies, and focused on creating one-file-per-tool/resource prompt modules.
Features
- Small MCP server scaffold using
@modelcontextprotocol/sdk. - Example tools, prompts, and resources included (echo, summarizer, metro lookup helpers).
- TypeScript-first, fast iteration with
tsxin development andtsdownfor production builds.
Requirements
- Node.js (v18+ recommended)
- pnpm (or npm/yarn)
Install
Install dependencies:
pnpm installPublish and Run
Once published to npm, you can run the server directly with npx:
npx nbrt-mcpIf you prefer a global install:
npm install -g nbrt-mcpScripts
Available npm scripts (run with pnpm, npm run, or yarn):
pnpm dev— run the server over stdio (useful for local testing with Claude Desktop)pnpm build— compile todist/viatsdownpnpm test— run unit tests withvitestpnpm typecheck— runtsc --noEmitto type-check the project
These map to the entries in package.json.
Running
Start the server for local development:
pnpm devThe process listens on stdio and registers tools/resources with an MCP transport.
Project Structure
src/— source filessrc/tools/— one file per tool, each exportsregisterXxx(server)src/resources/— one file per resource, each exportsregisterXxx(server)src/prompts/— prompt handlers and helperssrc/lib/— shared helpers and APIs (metro API, stations, directions)src/server.ts— wires everything together viacreateServer()src/index.ts— stdio transport entry point
tests/— unit testsdata/— sample static data (e.g.,stations.json)
Contributing
- Follow the existing project structure: add one tool/resource per file and export a registration function.
- Keep modules small and focused.
- Run tests with
pnpm testbefore opening PRs.
