Skip to content

Harden and polish: tests, CI, lint, publish metadata, docs - #1

Open
ryw wants to merge 1 commit into
mainfrom
harden-and-polish
Open

Harden and polish: tests, CI, lint, publish metadata, docs#1
ryw wants to merge 1 commit into
mainfrom
harden-and-polish

Conversation

@ryw

@ryw ryw commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

Makes the repo publish-ready and maintainable without changing the tool surface (all 5 tools behave identically).

  • Refactor for testability: new src/server.ts exports a createServer(tembo) factory with a structural TemboApi interface; a shared runTool helper replaces the 5× duplicated try/catch blocks; src/index.ts shrinks to a thin stdio entry point. Server version is now read from package.json instead of hardcoded. create_task keeps both prompt and description (published contract), with description marked as a deprecated alias.
  • Tests: 11 vitest tests drive the real server over the MCP SDK's InMemoryTransport against a mocked Tembo client — tool listing, arg mapping, zod defaults, description→prompt fallback, error paths.
  • Lint/format + CI: Biome (matching existing 4-space/single-quote style) and a GitHub Actions workflow (Node 20 + 22: biome, typecheck, build, test).
  • Publish/metadata: LICENSE (MIT) added and shipped in the tarball; repo URLs fixed from stale tembo-io/tembo-mcp to tembo/mcp; engines.node >=20; dependency floors bumped to match the lockfile; npm audit fix clears all 5 vulnerabilities (MCP SDK now resolves to 1.29.0, validated by the new tests); prepublishOnly gate; version bumped to 0.1.1.
  • Docs: README gains Claude Code install (claude mcp add), env var table, full create_task param table, tembo-mcp bin name note, and a Development section; new CLAUDE.md.

Verification

  • npm run check, npm run typecheck, npm run build, npm test all green (11/11)
  • Live stdio smoke test: initialize handshake + tools/list returns all 5 tools
  • Missing TEMBO_API_KEY → error + exit 1
  • npm pack --dry-run: tarball contains dist/, README, LICENSE; shebang intact

Note for reviewer

package.json now points at github.com/tembo/mcp (the actual git remote). Confirm that's the intended canonical public URL before the next npm publish.

🤖 Generated with Claude Code


Note

Low Risk
Changes are mostly refactor, tests, CI, and metadata; runtime tool contracts stay the same aside from version sourced from package.json.

Overview
Prepares @tembo-io/mcp for ongoing maintenance and npm publish without changing the five MCP tools’ outward behavior.

Server layout: Tool registration moves from src/index.ts into createServer(tembo) in new src/server.ts, backed by a structural TemboApi interface and shared runTool error/JSON handling. The bin entrypoint only wires env, the Tembo client, and stdio. Server version comes from package.json at runtime instead of a hardcoded string; description on create_task is documented as a deprecated alias for prompt.

Quality gates: Adds Vitest tests (tests/server.test.ts) over InMemoryTransport, Biome, a GitHub Actions matrix on Node 20/22 (biome, typecheck, build, test), and prepublishOnly running check + typecheck + test. Bumps to 0.1.1, adds MIT LICENSE to the tarball, engines.node >= 20, refreshed repo URLs and dependency floors (lockfile refresh includes MCP SDK 1.29.0).

Docs: README and new CLAUDE.md cover install (including Claude Code), env vars, tool params, and local dev/smoke-test steps.

Reviewed by Cursor Bugbot for commit 06843d5. Bugbot is set up for automated code reviews on this repo. Configure here.

- Extract createServer() factory (src/server.ts) with a structural
  TemboApi interface and shared runTool helper; slim src/index.ts to a
  thin stdio entry point
- Add 11 vitest tests driving the server over InMemoryTransport with a
  mocked Tembo client
- Add Biome lint/format config and GitHub Actions CI (Node 20/22:
  lint, typecheck, build, test)
- Add LICENSE (MIT), fix stale repo URLs, add engines.node >=20,
  bump dependency floors, clear npm audit vulnerabilities, add
  prepublishOnly gate, bump version to 0.1.1
- README: Claude Code install, env var + create_task param tables,
  development section; add CLAUDE.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant