npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@technodotventures/smartware-connectors

v0.1.0

Published

Connector infrastructure for Smartware-powered apps: MCP client pool, Docker runtime, OAuth token management, connection grants, and audit logging.

Readme

@smartware/connectors

Connector infrastructure for Smartware-powered apps.

Provides everything an app needs to connect to external services: OAuth token management, MCP client pool with Docker runtime, connection grants and audit logging, and a registry of integration definitions.

Install

npm install @smartware/connectors

Peer dependencies (your app must provide):

  • @modelcontextprotocol/sdk ^1.29.0
  • better-sqlite3 ^12.0.0

Quick start

import {
  type ConnectorEnv,
  ensureConnectorSchema,
  listIntegrations,
  getIntegration,
  listMcpTools,
  callMcpTool,
  getFreshAccessToken,
  shutdownMcpClients,
} from '@smartware/connectors';

// 1. Define your env (your app's config layer provides these values)
const env: ConnectorEnv = {
  dataDir: './data',
  mcpClientEnabled: true,
  mcpDockerCommand: 'docker',
  mcpPortBase: 5100,
};

// 2. Initialize the database schema
import Database from 'better-sqlite3';
const db = new Database('./data/app.db');
ensureConnectorSchema(db);

// 3. Use the integration registry
const integrations = listIntegrations();
const drive = getIntegration('google-drive');

// 4. Call MCP tools via Docker-managed servers
const tools = await listMcpTools(env, 'google-drive');
const result = await callMcpTool(env, 'google-drive', 'search_files', { query: 'meeting notes' });

// 5. Clean up on shutdown
await shutdownMcpClients(env);

Architecture

@smartware/connectors
├── ConnectorEnv              Config interface (dataDir, mcpClientEnabled, etc.)
├── Integration Registry      Service definitions (OAuth endpoints, fields, scopes)
├── Integration Config        File-based credential storage (JSON, 0o600)
├── MCP Clients
│   ├── Registry              Docker image definitions
│   ├── Docker Runtime        Container lifecycle (start, stop, readiness)
│   ├── Client Pool           MCP SDK client management + tool calls
│   └── Health                Docker + container health checks, prewarm
├── Connections
│   ├── OAuth Refresh         Token refresh for Google, GitHub, Slack, Notion, Linear
│   ├── Grants                Per-actor tool access grants (glob patterns, expiry)
│   ├── Grant Requests        Approval workflow for grant requests
│   └── Audit                 MCP tool call audit logging
├── External MCP              User-configured stdio/HTTP MCP servers
└── Schema                    SQLite table definitions (connection_grants, mcp_tool_calls, etc.)

Extending the registry

Apps can register their own integrations at runtime:

import { registerIntegration, registerMcpProvider, registerTokenEndpoint } from '@smartware/connectors';

// Add a custom OAuth provider
registerIntegration({
  id: 'my-service',
  name: 'My Service',
  authType: 'oauth',
  availability: 'ready',
  oauth: {
    authorizeUrl: 'https://my-service.com/oauth/authorize',
    tokenUrl: 'https://my-service.com/oauth/token',
    scopes: ['read', 'write'],
  },
  fields: [
    { key: 'client_id', label: 'Client ID' },
    { key: 'client_secret', label: 'Client Secret', secret: true },
  ],
});

// Register its token refresh endpoint
registerTokenEndpoint('my-service', 'https://my-service.com/oauth/token');

// Register a custom MCP Docker provider
registerMcpProvider({
  id: 'my-service',
  image: 'ghcr.io/my-org/my-mcp-server',
  digest: 'sha256:abc123...',
  containerPort: 5000,
  mcpPath: '/mcp/',
});

Subpath exports

// Everything
import { ... } from '@smartware/connectors';

// Just MCP client pool + Docker + registry
import { ... } from '@smartware/connectors/mcp-clients';

// Just grants, audit, OAuth
import { ... } from '@smartware/connectors/connections';

// Just external MCP server management
import { ... } from '@smartware/connectors/mcp';

Design principles

  • No process.env reads — apps pass ConnectorEnv, the package never reads env vars directly
  • No framework dependency — pure TypeScript, works with Fastify, Express, Hono, or bare Node
  • Peer dependencies — apps bring their own @modelcontextprotocol/sdk and better-sqlite3 versions
  • Runtime-extensible — registerIntegration(), registerMcpProvider(), registerTokenEndpoint() let apps add providers without forking

Smartware ecosystem

  • Smartware — the memory protocol and reference implementation.
  • Smartware MCP Servers — Docker-packaged MCP service adapters managed by this runtime.

License

MIT