open-index/open-npm huggingface dataset:
npm package: @modelfetch/aws-lambda
Description: AWS Lambda runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/aws-lambda`

[![npm version](https://img.shields.io/npm/v/@modelfetch/aws-lambda)](https://www.npmjs.com/package/@modelfetch/aws-lambda)
[![npm license](https://img.shields.io/npm/l/@modelfetch/aws-lambda)](https://www.npmjs.com/package/@modelfetch/aws-lambda)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/aws-lambda)

Deploy MCP servers to AWS Lambda.

## Installation

```bash
npm install @modelfetch/aws-lambda
```

## Usage

```typescript
import handle from "@modelfetch/aws-lambda";
import server from "./server"; // Import your McpServer

// Export as an AWS Lambda streaming handler
export const handler: AWSLambda.LambdaFunctionURLHandler = handle(server);
```

## API Reference

### `handle(server)`

Creates an AWS Lambda streaming handler from an [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
npm package: @modelfetch/azure-functions
Description: Azure Functions runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/azure-functions`

[![npm version](https://img.shields.io/npm/v/@modelfetch/azure-functions)](https://www.npmjs.com/package/@modelfetch/azure-functions)
[![npm license](https://img.shields.io/npm/l/@modelfetch/azure-functions)](https://www.npmjs.com/package/@modelfetch/azure-functions)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/azure-functions)

Deploy MCP servers to Azure Functions.

## Installation

```bash
npm install @modelfetch/azure-functions
```

## Usage

```typescript
import handle from "@modelfetch/azure-functions";
import server from "./server.js"; // Import your McpServer

// Run as an Azure Functions app
handle(server);
```

## API Reference

### `handle(server)`

Starts the MCP server

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
npm package: @modelfetch/bun
Description: Bun runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/bun`

[![npm version](https://img.shields.io/npm/v/@modelfetch/bun)](https://www.npmjs.com/package/@modelfetch/bun)
[![npm license](https://img.shields.io/npm/l/@modelfetch/bun)](https://www.npmjs.com/package/@modelfetch/bun)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/bun)

Run fast MCP servers with Bun.

## Installation

```bash
bun add @modelfetch/bun
```

## Usage

### Start The Server

```typescript
import handle from "@modelfetch/bun";
import server from "./server.ts"; // Import your McpServer

// Run as a Bun HTTP server
handle(server);
```

### Get Listening Address

```typescript
import handle, { getListeningAddress } from "@modelfetch/bun";
import server from "./server.ts"; // Import your McpServer

// Run as a Bun HTTP server
const bunServer = handle(server);

// Print listening address
console.log(`The MCP server is listening at ${getListeningAddress(bunServer)}`);
```

### Specify Custom Port

```typescript
import handle, { getListeningAddress } from "@modelfetch/bun";
import server from "./server.ts"; // Import your McpServer

// Run as a Bun HTTP server
const bunServer = handle(server, {
  // Customize server options
  port: 8080,
});

// Print listening address
console.log(`The MCP server is listening at ${getListeningAddress(bunServer)}`);
```

## API Reference

### `handle(server, options?)`

Starts the MCP server

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
- **options**: Optional [`Bun.ServeOptions`](https://bun.sh/reference/bun/ServeOptions)

### `getListeningAddress(server)`

Gets listening address from the [`Bun.Server`](https://bun.sh/reference/bun/Server) instance

- **server**: Required [`Bun.Server`](https://bun.sh/reference/bun/Server) instance returned by the `handle()` function
npm package: @modelfetch/cloudflare
Description: Cloudflare runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/cloudflare`

[![npm version](https://img.shields.io/npm/v/@modelfetch/cloudflare)](https://www.npmjs.com/package/@modelfetch/cloudflare)
[![npm license](https://img.shields.io/npm/l/@modelfetch/cloudflare)](https://www.npmjs.com/package/@modelfetch/cloudflare)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/cloudflare)

Deploy MCP servers to Cloudflare.

## Installation

```bash
npm install @modelfetch/cloudflare
```

## Usage

```typescript
import handle from "@modelfetch/cloudflare";
import server from "./server"; // Import your McpServer

// Export as a Cloudflare Worker fetch handler
export default {
  fetch: handle(server),
} satisfies ExportedHandler<Env>;
```

## API Reference

### `handle(server)`

Creates a Cloudflare Worker fetch handler from an [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
npm package: @modelfetch/core
Description: Core utilities for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/core`

[![npm version](https://img.shields.io/npm/v/@modelfetch/core)](https://www.npmjs.com/package/@modelfetch/core)
[![jsr version](https://img.shields.io/jsr/v/@modelfetch/core)](https://jsr.io/@modelfetch/core)
[![npm license](https://img.shields.io/npm/l/@modelfetch/core)](https://www.npmjs.com/package/@modelfetch/core)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs)

**⚠️ Warning:** This is an internal package. DO NOT use this package directly.

**💡 Tip:** Use one of our runtime packages instead:

- [@modelfetch/node](https://www.npmjs.com/package/@modelfetch/node) for Node.js
- [@modelfetch/next](https://www.npmjs.com/package/@modelfetch/next) for Next.js
- [@modelfetch/bun](https://www.npmjs.com/package/@modelfetch/bun) for Bun
- [@modelfetch/deno](https://www.npmjs.com/package/@modelfetch/deno) for Deno
- [@modelfetch/vercel](https://www.npmjs.com/package/@modelfetch/vercel) for Vercel
- [@modelfetch/cloudflare](https://www.npmjs.com/package/@modelfetch/cloudflare) for Cloudflare
- [@modelfetch/netlify](https://www.npmjs.com/package/@modelfetch/netlify) for Netlify
- [@modelfetch/fastly](https://www.npmjs.com/package/@modelfetch/fastly) for Fastly
- [@modelfetch/gcore](https://www.npmjs.com/package/@modelfetch/gcore) for Gcore
- [@modelfetch/aws-lambda](https://www.npmjs.com/package/@modelfetch/aws-lambda) for AWS Lambda
- [@modelfetch/azure-functions](https://www.npmjs.com/package/@modelfetch/azure-functions) for Azure Functions
npm package: @modelfetch/deno
Description: Deno runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/deno`

[![npm version](https://img.shields.io/npm/v/@modelfetch/deno)](https://www.npmjs.com/package/@modelfetch/deno)
[![jsr version](https://img.shields.io/jsr/v/@modelfetch/deno)](https://jsr.io/@modelfetch/deno)
[![npm license](https://img.shields.io/npm/l/@modelfetch/deno)](https://www.npmjs.com/package/@modelfetch/deno)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/deno)

Run secure MCP servers with Deno.

## Installation

```bash
deno add jsr:@modelfetch/deno
```

## Usage

### Start The Server

```typescript
import handle from "@modelfetch/deno";
import server from "./server.ts"; // Import your McpServer

// Run as a Deno HTTP server
handle(server);
```

### Get Listening Address

```typescript
import handle, { getListeningAddress } from "@modelfetch/deno";
import server from "./server.ts"; // Import your McpServer

// Run as a Deno HTTP server
handle(server, {
  onListen: (addr) => {
    // Print listening address
    console.log(`The MCP server is listening at ${getListeningAddress(addr)}`);
  },
});
```

### Specify Custom Port

```typescript
import handle, { getListeningAddress } from "@modelfetch/deno";
import server from "./server.ts"; // Import your McpServer

// Run as a Deno HTTP server
handle(server, {
  // Customize server options
  port: 8080, // Customize server port
  onListen: (addr) => {
    // Print listening address
    console.log(`The MCP server is listening at ${getListeningAddress(addr)}`);
  },
});
```

## API Reference

### `handle(server, options?)`

Starts the MCP server

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
- **options**: Optional [`Deno.ServeOptions`](https://docs.deno.com/api/deno/~/Deno.ServeOptions)

### `getListeningAddress(addr)`

Gets listening address from the server [`Deno.Addr`](https://docs.deno.com/api/deno/~/Deno.Addr)

- **addr**: Required server [`Deno.Addr`](https://docs.deno.com/api/deno/~/Deno.Addr) from the `onListen` callback
npm package: @modelfetch/fastly
Description: Fastly runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/fastly`

[![npm version](https://img.shields.io/npm/v/@modelfetch/fastly)](https://www.npmjs.com/package/@modelfetch/fastly)
[![npm license](https://img.shields.io/npm/l/@modelfetch/fastly)](https://www.npmjs.com/package/@modelfetch/fastly)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/fastly)

Deploy MCP servers to Fastly.

## Installation

```bash
npm install @modelfetch/fastly
```

## Usage

```typescript
import handle from "@modelfetch/fastly";
import server from "./server"; // Import your McpServer

// Run as a Fastly Compute service
handle(server);
```

## API Reference

### `handle(server)`

Starts the MCP server

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
npm package: @modelfetch/gcore
Description: Gcore runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/gcore`

[![npm version](https://img.shields.io/npm/v/@modelfetch/gcore)](https://www.npmjs.com/package/@modelfetch/gcore)
[![npm license](https://img.shields.io/npm/l/@modelfetch/gcore)](https://www.npmjs.com/package/@modelfetch/gcore)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/gcore)

Deploy MCP servers to Gcore.

## Installation

```bash
npm install @modelfetch/gcore
```

## Usage

```typescript
import handle from "@modelfetch/gcore";
import server from "./server"; // Import your McpServer

// Run as a Gcore FastEdge HTTP application
handle(server);
```

## API Reference

### `handle(server)`

Starts the MCP server

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
npm package: @modelfetch/netlify
Description: Netlify runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/netlify`

[![npm version](https://img.shields.io/npm/v/@modelfetch/netlify)](https://www.npmjs.com/package/@modelfetch/netlify)
[![jsr version](https://img.shields.io/jsr/v/@modelfetch/netlify)](https://jsr.io/@modelfetch/netlify)
[![npm license](https://img.shields.io/npm/l/@modelfetch/netlify)](https://www.npmjs.com/package/@modelfetch/netlify)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/netlify)

Deploy MCP servers to Netlify.

## Installation

```bash
deno add jsr:@modelfetch/netlify
```

## Usage

```typescript
import handle from "@modelfetch/netlify";
import server from "./server.ts"; // Import your McpServer

// Export as a Netlify Edge Function handler
export default handle(server);
```

## API Reference

### `handle(server)`

Creates a Netlify Edge Function handler from an [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
npm package: @modelfetch/next
Description: Next.js runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/next`

[![npm version](https://img.shields.io/npm/v/@modelfetch/next)](https://www.npmjs.com/package/@modelfetch/next)
[![npm license](https://img.shields.io/npm/l/@modelfetch/next)](https://www.npmjs.com/package/@modelfetch/next)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/next)

Run flexible MCP servers with Next.js.

## Installation

```bash
npm install @modelfetch/next
```

## Usage

### Next.js App Router

```typescript
import handle from "@modelfetch/next";
import server from "./server"; // Import your McpServer

const handler = handle(server);

// Export as Next.js App Router API route handlers
export const GET = handler;
export const POST = handler;
export const DELETE = handler;
```

### Use Node.js Runtime

```typescript
import handle from "@modelfetch/next";
import server from "./server"; // Import your McpServer

const handler = handle(server);

// Export as Next.js App Router API route handlers
export const GET = handler;
export const POST = handler;
export const DELETE = handler;

// Use Node.js runtime (default)
export const runtime = "nodejs";
```

### Use Edge Runtime

```typescript
import handle from "@modelfetch/next";
import server from "./server"; // Import your McpServer

const handler = handle(server);

// Export as Next.js App Router API route handlers
export const GET = handler;
export const POST = handler;
export const DELETE = handler;

// Use Edge runtime
export const runtime = "edge";
```

## API Reference

### `handle(server)`

Creates a Next.js App Router API route handler from an [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
npm package: @modelfetch/node
Description: Node.js runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/node`

[![npm version](https://img.shields.io/npm/v/@modelfetch/node)](https://www.npmjs.com/package/@modelfetch/node)
[![npm license](https://img.shields.io/npm/l/@modelfetch/node)](https://www.npmjs.com/package/@modelfetch/node)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/node)

Run simple MCP servers with Node.js.

## Installation

```bash
npm install @modelfetch/node
```

## Usage

### Start The Server

```typescript
import handle from "@modelfetch/node";
import server from "./server"; // Import your McpServer

// Run as a Node.js HTTP server
handle(server);
```

### Get Listening Address

```typescript
import handle, { getListeningAddress } from "@modelfetch/node";
import server from "./server"; // Import your McpServer

// Run as a Node.js HTTP server
handle(server, (addressInfo) => {
  // Print listening address
  console.log(
    `The MCP server is listening at ${getListeningAddress(addressInfo)}`,
  );
});
```

### Specify Custom Port

```typescript
import handle, { getListeningAddress } from "@modelfetch/node";
import server from "./server"; // Import your McpServer

// Run as a Node.js HTTP server
handle(
  server,
  // Print listening address
  (addressInfo) => {
    console.log(
      `The MCP server is listening at ${getListeningAddress(addressInfo)}`,
    );
  },
  // Customize server options
  { port: 8080 },
);
```

## API Reference

### `handle(server, callback?, options?)`

Starts the MCP server

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
- **callback**: Optional listening callback that receives the server [`AddressInfo`](https://nodejs.org/api/net.html#serveraddress)
- **options**: Optional configuration object
  - **port**: Custom port number (default: `3000`)
  - **hostname**: Custom hostname (default: `"localhost"`)
  - **createServer**: Custom server factory from `node:http`, `node:https`, or `node:http2`
  - **serverOptions**: Custom server options from `node:http`, `node:https`, or `node:http2`

### `getListeningAddress(addressInfo)`

Gets listening address from the server [`AddressInfo`](https://nodejs.org/api/net.html#serveraddress)

- **addressInfo**: Required server [`AddressInfo`](https://nodejs.org/api/net.html#serveraddress) from the listening callback
npm package: @modelfetch/supabase
Description: Supabase runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/supabase`

[![npm version](https://img.shields.io/npm/v/@modelfetch/supabase)](https://www.npmjs.com/package/@modelfetch/supabase)
[![jsr version](https://img.shields.io/jsr/v/@modelfetch/supabase)](https://jsr.io/@modelfetch/supabase)
[![npm license](https://img.shields.io/npm/l/@modelfetch/supabase)](https://www.npmjs.com/package/@modelfetch/supabase)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/supabase)

Deploy MCP servers to Supabase.

## Installation

```bash
deno add jsr:@modelfetch/supabase
```

## Usage

```typescript
import handle from "@modelfetch/supabase";
import server from "./server.ts"; // Import your McpServer

// Run as a Supabase Edge Function
Deno.serve(handle("mcp-server", server));
```

## API Reference

### `handle(name, server)`

Starts the MCP server

- **name**: Required Supabase Edge Function name
- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
npm package: @modelfetch/vercel
Description: Vercel runtime adapter for MCP servers built with ModelFetch
Author: Minh-Phuc Tran
Latest version: 1.0.13

# `@modelfetch/vercel`

[![npm version](https://img.shields.io/npm/v/@modelfetch/vercel)](https://www.npmjs.com/package/@modelfetch/vercel)
[![npm license](https://img.shields.io/npm/l/@modelfetch/vercel)](https://www.npmjs.com/package/@modelfetch/vercel)
[![docs](https://img.shields.io/badge/docs-modelfetch.com-blue)](https://www.modelfetch.com/docs/runtime/vercel)

Deploy MCP servers to Vercel.

## Installation

```bash
npm install @modelfetch/vercel
```

## Usage

### Next.js App Router

```typescript
import handle from "@modelfetch/vercel";
import server from "./server"; // Import your McpServer

const handler = handle(server);

// Export as Next.js App Router API route handlers
export const GET = handler;
export const POST = handler;
export const DELETE = handler;
```

### Use Node.js or Fluid Compute

```typescript
import handle from "@modelfetch/vercel";
import server from "./server"; // Import your McpServer

const handler = handle(server);

// Export as Next.js App Router API route handlers
export const GET = handler;
export const POST = handler;
export const DELETE = handler;

// Use Node.js or Fluid Compute (default)
export const runtime = "nodejs";
```

### Use Edge Runtime

```typescript
import handle from "@modelfetch/vercel";
import server from "./server"; // Import your McpServer

const handler = handle(server);

// Export as Next.js App Router API route handlers
export const GET = handler;
export const POST = handler;
export const DELETE = handler;

// Use Edge runtime
export const runtime = "edge";
```

## API Reference

### `handle(server)`

Creates a Vercel-compatible Next.js App Router API route handler from an [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance

- **server**: Required [`McpServer`](https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#server) instance from [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk)
npm package: @modelforms/fontawesome-vuetify
Description: @modelforms/fontawesome-vuetify
Author: datamit
Latest version: 3.9.3

@modelforms/fontawesome-vuetify

#Install

```bash
pnpm add @modelforms/fontawesome-vuetify
```

#Quick start

1. Create GridModel and DataModel

```ts
import { GridModel } from '@modelforms/fontawesome-vuetify';

class UserModel {
    name: string;
    phone: any[] = []
}

export const testForm: GridModel<UserModel> = {
  model: new UserModel(),
  rows: [
  {
    colSize: 12,
    cols: [
      {
        name: "name",
        type: "text",
        rules: {
          rules: [(v) => v?.length <= 3 || "Not longer than 3!"]
        },
        label: "Name",
        size: 12,
      }
    ]
  },
  {
    colSize: 12,
    cols: [
      {
        name: "Description",
        type: "area",
        label: "Description",
        size: 6,
      },
      {
        name: "phone",
        type: "complete",
        label: "Phone",
        size: 12,
        complete: {
            items : [],
            itemValue: [],
            title: "title"
        }
      }
    ]
  }]
}
```

2. Import FormPlate

```ts
<template>
    <FormPlate 
        :form="form" 
        @submit="submit($event)"/>

</template>

<script lang="ts">
    import { FormPlate } from '@modelforms/fontawesome-vuetify';

    export default {

        components: {
            FormPlate: FormPlate
        },
        data() {
            return {
                form: testForm
            }
        },
        methods:{
            submit(event){
                console.log(event);
            }
        }
    }
</script>
```

#Documentation

The basic control types are text, number, date, complete, area, file and password.

The FormPlate component is designed with a built-in GridModelHandler that manages GridModel data steps, populates GridModel data, clears values on data changes and populates complete control items.

Grid model value fields have a rules with corresponding client validation messages.

The main event is submit with data model as argument.

Licence 

MIT
npm package: @modelfoxdotdev/modelfox
Description: - [Watch the Video](https://www.modelfox.dev) - [Read the Docs](https://www.modelfox.dev/docs)
Author: ModelFox
Latest version: 0.8.0

# ModelFox for JavaScript

- [Watch the Video](https://www.modelfox.dev)
- [Read the Docs](https://www.modelfox.dev/docs)

The ModelFox JavaScript package makes it easy to make predictions with your ModelFox machine learning model from JavaScript.

## Setup

### Node.js

```
$ npm install @modelfoxdotdev/modelfox
```

```javascript
let modelfox = require("@modelfoxdotdev/modelfox")
```

### Deno

```javascript
import modelfox from "https://js.modelfox.dev/deno"
```

### Bundler

If you are using a bundler that supports WebAssembly modules such as Webpack >= 4, you can use the package from npm.

```
$ npm install @modelfoxdotdev/modelfox
```

```javascript
import modelfox from "@modelfoxdotdev/modelfox"
```

### Browser

If you are targeting a modern browser with support for ES Modules, WebAssembly, and top-level await, you can import the modelfox library from https://js.modelfox.dev.

```javascript
import modelfox from "https://js.modelfox.dev"
```

## Usage

```javascript
let model = new modelfox.Model("./heart_disease.modelfox")

let input = {
	age: 63,
	gender: "male",
	// ...
}

let output = model.predict(input)
```

For more information, [read the docs](https://www.modelfox.dev/docs).

## Examples

The source for this package contains a number of examples in the `examples` directory. Each example has a `README.md` explaining how to run it.
npm package: @modelfusion/cost-calculator
Description: A calculator for the API usage costs of AI models (text, image, speech, transcription, etc.) for OpenAI and other providers.
Author: Lars Grammel
Latest version: 0.1.0

# @modelfusion/cost-calculator

See documentation at [ModelFusion](https://modelfusion.dev/guide/experimental/cost-calculation).

Calls to generative models such as OpenAI's API can get expensive quickly. To keep track of your costs and to enable you to understand them, ModelFusion contains cost calculation functionality. You can use it to log the costs of [runs](https://modelfusion.dev/guide/util/run) or even implement budgeting that automatically aborts a run when it exceeds a certain cost.

> ⚠️ Cost calculation is currently only supported for OpenAI models. It depends on the current pricing of the API. The cost calculation can be inaccurate when the pricing changes or when there are e.g. aborted calls.

### Example

```ts
import { DefaultRun, generateText, openai } from "modelfusion";
import {
  OpenAICostCalculator,
  calculateCost,
} from "@modelfusion/cost-calculation";

const run = new DefaultRun();

const text = await generateText({
  model: openai.CompletionTextGenerator({
    model: "gpt-3.5-turbo-instruct",
    temperature: 0.7,
    maxGenerationTokens: 500,
  }),
  prompt: "Write a short story about a robot learning to love:\n\n",
  run, // pass in the run into the model calls
});

// calculate the overall cost of the run for the successful calls:
const cost = await calculateCost({
  calls: run.getSuccessfulModelCalls(),
  costCalculators: [new OpenAICostCalculator()],
});

console.log(`Cost: ${cost.formatAsDollarAmount({ decimals: 4 })}`);
```

## Supported Providers

- OpenAI
npm package: @modelfusion/google-custom-search-tool
Description: Google Custom Search tool for ModelFusion
Author: Lars Grammel
Latest version: 0.10.0

# Google Custom Search Tool for ModelFusion

[Google Custom Search](https://developers.google.com/custom-search/v1/overview) lets you create programmable search engines that are limited to a subset of the web (e.g. a domain or a set of domains) and access the results via an API.

## Requirements

- [ModelFusion](https://modelfusion.dev) v0.9.0 or higher

## Setup

1. Create a [Google Custom Search Engine](https://cse.google.com/cse/all).
2. Record the Search Engine ID.
3. Get an [API Key](https://developers.google.com/custom-search/v1/introduction). You will need to create a Google Cloud Platform project and enable the Custom Search API.
4. Install the Google custom search tool for ModelFusion:

   ```
   npm i @modelfusion/google-custom-search-tool
   ```

5. Add `GOOGLE_CUSTOM_SEARCH_API_KEY` with your API key to your environment variables or `.env` file.

## Usage

### Creating a Custom Google Search Tool

```ts
import { GoogleCustomSearchTool } from "@modelfusion/google-custom-search-tool";

const searchWikipedia = new GoogleCustomSearchTool({
  name: "search_wikipedia",
  description: "Search Wikipedia pages using a query",
  searchEngineId: "76fe2b5e95a3e4215", // replace with your search engine id
  maxResults: 5,
});
```

You can then use the tool with `runTool` or `executeTool`:

```ts
const result = await executeTool(searchWikipedia, {
  query: "Pablo Picasso",
});
```
npm package: @modelfusion/mathjs-tool
Description: Math.js tool for ModelFusion
Author: Lars Grammel
Latest version: 0.1.1

# Math.js Tool for ModelFusion

[Math.js](https://mathjs.org) is a JavaScript library for evaluating mathematical expressions.

## Requirements

- [ModelFusion](https://modelfusion.dev) v0.106.0 or higher

## Usage

```ts
import { MathJsTool } from "@modelfusion/mathjs-tool";

const mathTool = new MathJsTool({
  name: "math",
});
```

You can then use the tool with `useTool` or `executeTool`:

```ts
const result = await executeTool(mathTool, {
  expression: "2 + 2",
});
```
npm package: @modelfusion/mediawiki-search-tool
Description: MediaWiki search tool for ModelFusion
Author: Lars Grammel
Latest version: 0.1.0

# MediaWiki Search Tool for ModelFusion

Searches MediaWiki instances, such as Wikipedia, using their `opensearch` API endpoint.

## Installation

```sh
npm install @modelfusion/mediawiki-search-tool
```

## Usage

```ts
import { MediaWikiSearchTool } from "@modelfusion/mediawiki-search-tool";

const searchWikipedia = new MediaWikiSearchTool({
  url: "https://en.wikipedia.org/w/api.php",
  name: "search_wikipedia",
  description: "Search Wikipedia pages using a query",
  profile: "fuzzy",
  maxResults: 5,
});
```

You can then use the tool with `useTool` or `executeTool`:

```ts
const result = await executeTool(searchWikipedia, {
  query: "Albert Einstein",
});
```
npm package: @modelfusion/pinecone
Description: Pinecone vector DB for ModelFusion
Author: Lars Grammel
Latest version: 0.4.0

# @modelfusion/pinecone

[Pinecone](https://www.pinecone.io/) vector database integration for [ModelFusion](https://github.com/lgrammel/modelfusion).

## Usage

See [Pinecone integration guide](https://modelfusion.dev/integration/vector-index/pinecone)
npm package: @modelfusion/serpapi-tool
Description: SerpAPI tools for ModelFusion
Author: Lars Grammel
Latest version: 0.11.0

# SerpAPI WebSearch Tool for ModelFusion

[SerpAPI](https://serpapi.com/) is a service that provides search results from Google, Bing, and other search engines.
Currently only the Google search is supported as a tool.

## Requirements

- [ModelFusion](https://modelfusion.dev) v0.106.0 or higher

## Setup

1. Sign up at [SerpAPI](https://serpapi.com/) and get an API key.

2. Install the SerpAPI tools for ModelFusion:

   ```
   npm i @modelfusion/serpapi-tool
   ```

3. Add your SERPAPI_API_KEY to your environment variables or `.env` file.

## Usage

### Creating a SerpAPI Google Search Tool

```ts
import { SerpapiGoogleWebSearchTool } from "@modelfusion/serpapi-tool";

const websearchTool = new SerpapiGoogleWebSearchTool({
  name: "websearch",
  description: "Search the web.",
  num: 3,
});
```

You can then use the tool with `runTool` or `executeTool`:

```ts
const result = await executeTool(websearchTool, {
  query: "modelfusion",
});
```
npm package: @modelfusion/serpapi-tools
Description: SerpAPI tools for ModelFusion
Author: Lars Grammel
Latest version: 0.9.0

# SerpAPI WebSearch Tools for ModelFusion

[SerpAPI](https://serpapi.com/) is a service that provides search results from Google, Bing, and other search engines.
Currently only the Google search is supported as a tool.

## Requirements

- [ModelFusion](https://modelfusion.dev) v0.9.0 or higher

## Setup

1. Sign up at [SerpAPI](https://serpapi.com/) and get an API key.

2. Install the SerpAPI tools for ModelFusion:

   ```
   npm i @modelfusion/serpapi-tools
   ```

3. Add your SERPAPI_API_KEY to your environment variables or `.env` file.

## Usage

### Creating a SerpAPI Google Search Tool

```ts
import { SerpapiGoogleWebSearchTool } from "@modelfusion/serpapi-tools";

const websearchTool = new SerpapiGoogleWebSearchTool({
  name: "websearch",
  description: "Search the web.",
  num: 3,
});
```

You can then use the tool with `useTool` or `executeTool`:

```ts
const result = await executeTool(websearchTool, {
  query: "modelfusion",
});
```

## Development

### Setup

```sh
npm i
npm link modelfusion
```
npm package: @modelfusion/sqlite-vss
Description: SQLite VSS Vector DB for ModelFusion
Author: Lars Grammel
Latest version: 0.4.0

# @modelfusion/sqlite-vss

[SQLite VSS (Vector Similarity Search)](https://github.com/asg017/sqlite-vss) integration for [ModelFusion](https://github.com/lgrammel/modelfusion).

## Usage

See the [integration guide](https://modelfusion.dev/integration/vector-index/sqlite-vss)
npm package: @modelfusion/vercel-ai
Description: ModelFusion stream for Vercel AI SDK
Author: Lars Grammel
Latest version: 1.1.0

# @modelfusion/vercel-ai

[ModelFusion](https://github.com/lgrammel/modelfusion) streams for the [Vercel AI SDK](https://github.com/vercel/ai).

## Usage

`ModelFusionTextStream(result: AsyncIterable<string>, callbacks?: AIStreamCallbacksAndOptions)`

You can call `ModelFusionTextStream` with the result from [streamText](https://modelfusion.dev/guide/function/generate-text#streamtext). This stream is compatible with the Vercel AI SDK and supports the callbacks and stream data features.

To convert Vercel AI SDK messages to ModelFusion messages, use the `asChatMessages` helper.

## Example: Ollama & Next.js

This is an example for a Next.js app router API route. It uses the ModelFusion [Ollama](https://github.com/jmorganca/ollama) integration. For a full example app, check out the [Next.js, Vercel AI SDK, Ollama & ModelFusion starter](https://github.com/lgrammel/modelfusion-ollama-nextjs-starter).

```ts
// app/api/chat/route.ts
import { asChatMessages, ModelFusionTextStream } from "@modelfusion/vercel-ai";
import { Message, StreamingTextResponse } from "ai";
import { ollama, streamText } from "modelfusion";

export const runtime = "edge";

export async function POST(req: Request) {
  const { messages }: { messages: Message[] } = await req.json();

  // Use ModelFusion to call Ollama:
  const textStream = await streamText(
    ollama.ChatTextGenerator({ model: "llama2:chat" }).withChatPrompt(),
    {
      system:
        "You are an AI chat bot. " +
        "Follow the user's instructions carefully.",

      // map Vercel AI SDK Message to ModelFusion ChatMessage:
      messages: asChatMessages(messages),
    }
  );

  // Return the result using the Vercel AI SDK:
  return new StreamingTextResponse(
    // Convert the text stream to a Vercel AI SDK compatible stream:
    ModelFusionTextStream(
      textStream,
      // optional callbacks:
      {
        onStart() {
          console.log("onStart");
        },
        onToken(token) {
          console.log("onToken", token);
        },
        onCompletion: () => {
          console.log("onCompletion");
        },
        onFinal(completion) {
          console.log("onFinal", completion);
        },
      }
    )
  );
}
```
npm package: @modelgeek/japanese-holidays
Description: 日本の祝日を扱うための TypeScript ライブラリ
Author: Model Geek
Latest version: 0.1.1

# japanese-holidays

[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
[![npm version](https://img.shields.io/npm/v/@modelgeek/japanese-holidays)](https://www.npmjs.com/package/@modelgeek/japanese-holidays)

日本の祝日を扱うための TypeScript ライブラリです。

## 特徴

* **同期的に動作** — 外部 API やデータベースへの通信なしに祝日を判定できます。
* **常に最新** — 内閣府の祝日データが更新されると、新しいバージョンが自動的に公開されます。
* **コンパクト** — バンドラーの Tree Shaking により、使用する関数のみがバンドルに含まれます。
* **直感的** — date-fns に似た、関数ベースのシンプルなインターフェースを提供します。
* **高速** — 祝日の判定は定数時間で完了するため、ループ内でも安心して使用できます。

## インストール

```bash
npm install @modelgeek/japanese-holidays
```

## 使い方

```typescript
import { isHoliday, getHolidayName, isBusinessDay } from '@modelgeek/japanese-holidays';

// 祝日・土日かどうかを判定
isHoliday('2025-01-01');  // true（元日）
isHoliday('2025-01-04');  // true（土曜日）
isHoliday('2025-01-06');  // false（平日）

// 祝日名を取得
getHolidayName('2025-01-01');  // '元日'
getHolidayName('2025-01-06');  // undefined

// 営業日かどうかを判定
isBusinessDay('2025-01-06');  // true
isBusinessDay('2025-01-01');  // false
```

日付は `YYYY-MM-DD` 形式の文字列または `Date` オブジェクトで指定できます。
内部では JST（日本標準時）として解釈されます。

## API

### 祝日判定

| 関数 | 説明 |
|---|---|
| `isNationalHoliday(date)` | 国民の祝日かどうかを判定する |
| `getHolidayName(date)` | 祝日名を返す（祝日でなければ `undefined`） |
| `isWeekend(date)` | 土曜日または日曜日かどうかを判定する |
| `isHoliday(date)` | 祝日または土日かどうかを判定する |

### 営業日計算

| 関数 | 説明 |
|---|---|
| `isBusinessDay(date)` | 営業日（祝日・土日以外）かどうかを判定する |
| `addBusinessDays(date, days)` | 指定した営業日数を加算した日付を返す |
| `subBusinessDays(date, days)` | 指定した営業日数を減算した日付を返す |
| `getNextBusinessDay(date)` | 翌営業日を返す |
| `getPreviousBusinessDay(date)` | 前営業日を返す |
| `countBusinessDays(start, end)` | 期間内の営業日数をカウントする |
| `getLastBusinessDayOfMonth(date)` | 月末の最終営業日を返す |
| `getLastBusinessDayOfWeek(date)` | 週の最終営業日（金曜日）を返す |

## 仕組み

### データの同梱

祝日データはライブラリ内に静的に含まれています。実行時に外部との通信は発生しません。

### 自動更新

内閣府が公開する CSV データを GitHub Actions で毎日チェックし、差分があればパッケージの新バージョンを自動で公開します。

また、ユーザーのプロジェクト向けに GitHub Actions ワークフローを提供しています。新バージョンが公開されると、依存を更新する PR が自動的に作成されます。

### Tree Shaking によるサイズ最適化

単一のエントリポイントから全機能を提供します。バンドラーの Tree Shaking により、使用する関数のみが最終的なバンドルに含まれます。

### 高速な検索

日付（JST の `YYYY-MM-DD` 形式）をキーとする Map でデータを保持しており、線形探索を行わず定数時間で判定できます。

## コントリビューター向け

[開発ガイド](docs/development.md) を参照してください。

## ライセンス

[MIT](LICENSE)
npm package: @modelica/fmi-data
Description: Code and associated type definitions for FMI related data
Author: Michael M. Tiller
Latest version: 0.14.5

# `@modelica/fmi-data`

FMI standard for "Functional Mockup Interface".  It is a standard developed
by the [Modelica Association](http://modelica.org) to support interoperability
between simulation tools.  More information about FMI can be found on the
[FMI web site](http://fmi-standard.org).

This package defines various types definitions used to describe FMI capabilities
and compabitility between tools.  By creating these common type definitions, we can
then use these definitions across UI code, scripts and servers.  In this way,
they all have a common representation of the underlying data being exchanged.

This package includes code for processing and manipulating FMI related data as well
to support querying and rendering.  The code in this repository **does not** use
any `Node.js` related packages so it can be used both for front-end as well as
back-end applications.

The code and definitions can be installed with the following command:

```
yarn add @modelica/fmi-data
```