Skip to content

feat(connectors): @gemstack/connectors kit + reference connector#91

Merged
suleimansh merged 3 commits into
mainfrom
feat/connectors-kit
Jun 30, 2026
Merged

feat(connectors): @gemstack/connectors kit + reference connector#91
suleimansh merged 3 commits into
mainfrom
feat/connectors-kit

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #87. Phase 0 of the connectors epic (#86).

New @gemstack/connectors package: the connector contract for AI orchestration, built on @gemstack/mcp.

What

  • defineConnector({ id, auth, tools }) — declare a connector to an external service: its auth requirement (none / pat / oauth) and its tools. Validates shape + fills defaults.
  • mountConnectors(connectors, { credentials }) — compose any number of connectors into a single @gemstack/mcp server class. Tools are namespaced by connector id (github_list-issues) so names never collide; credentials are resolved per connector at call time and handed to each tool via ctx.auth.
  • examples/connectors-quickstart — a runnable read-only reference connector to copy from, driven through McpTestClient.

Design

A connector only declares what it needs and what it does. It never touches env vars, OAuth, or a transport itself — the orchestrator that mounts it supplies credentials and chooses how to serve it. That split is what lets first-party and third-party connectors compose interchangeably. The mounted result is a plain @gemstack/mcp server, so it plugs into Mcp.web / Mcp.local / McpTestClient unchanged.

Verify

  • pnpm --filter @gemstack/connectors test — 8 tests (validation, namespacing, credential threading, annotations, collision guard).
  • pnpm --filter @gemstack/example-connectors-quickstart start — runs the reference connector end to end.

Next: @gemstack/connector-github (#88) builds on this.

The AI-vs-Next.js benchmark is moving to suleimansh/vike-data, where the
extension family it now measures (vike-auth, vike-data, vike-notifications,
vike-stripe) lives. Removes the benchmarks/ harness and both bench-app-*
examples, plus the better-sqlite3/sharp build approvals only they needed.
examples/mcp-quickstart and all packages are untouched; build stays green.
Phase 0 of the connectors epic. New @gemstack/connectors package: the
connector contract for AI orchestration.

- defineConnector({ id, auth, tools }) declares a connector to an
  external service (auth requirement + tools), validating shape + defaults.
- mountConnectors(connectors, { credentials }) composes any number into a
  single @gemstack/mcp server class, namespacing tools by connector id and
  resolving credentials per connector at call time.
- examples/connectors-quickstart: a runnable read-only reference connector
  to copy from, driven through McpTestClient.

Built on @gemstack/mcp, framework-agnostic. 8 kit tests + 3 example tests.
@suleimansh suleimansh added enhancement New feature or request priority: high Should be addressed soon labels Jun 30, 2026
@suleimansh suleimansh self-assigned this Jun 30, 2026
@suleimansh suleimansh merged commit b0430f9 into main Jun 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: high Should be addressed soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

connectors: Phase 0 — @gemstack/connectors kit (contract + reference connector)

1 participant