Registry / database / functional-models-orm-mcp

functional-models-orm-mcp

JSON →
library3.7.1jsnpmunverified

A functional-models-orm datastore provider that implements the Model Context Protocol (MCP) using @modelcontextprotocol/sdk (v3.7.1). Designed for frontend environments, it allows you to use functional-models ORM with MCP-compatible backends. This package wraps the ORM operations (CRUD, queries) as MCP tools, enabling seamless integration with MCP servers. Key differentiators: follows functional-models' functional paradigm, leverages MCP for standardized model access, and is specifically built for frontend usage where direct database access is limited. Release cadence is irregular; latest version 3.7.1.

databasedevops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ESM-only; CJS require may not work due to module type.

import { MCPDatastoreProvider } from 'functional-models-orm-mcp'

ESM-only.

import { createMCPClient } from 'functional-models-orm-mcp'

Default export is an object containing MCPDatastoreProvider and createMCPClient.

import MCP from 'functional-models-orm-mcp'

Demonstrates creating an MCP client, instantiating the provider, defining a model, and performing a create operation.

import { createMCPClient } from '@modelcontextprotocol/sdk/client/index.js'; import { MCPDatastoreProvider } from 'functional-models-orm-mcp'; import { createModel, DataTypes } from 'functional-models-orm'; const client = await createMCPClient({ transport: new StdioClientTransport({ command: 'my-mcp-server' }) }); const provider = new MCPDatastoreProvider({ client, modelNamePrefix: 'myapp' }); const User = createModel('User', { name: DataTypes.string, email: DataTypes.string }); const user = await User.create({ name: 'Alice', email: 'alice@example.com' }); console.log(user.name); // Alice await client.close();
Debug
Known footguns
breakingVersion 3.0.0 changed the constructor signature of MCPDatastoreProvider. The 'client' option is now required instead of 'connection'.
deprecatedThe 'createMCPClient' function from this package is deprecated in favor of using the client directly from @modelcontextprotocol/sdk.
gotchaOnly named exports are available; default export is an object. Attempting `import MCPDatastoreProvider from 'functional-models-orm-mcp'` will fail.
gotchaThe provider requires a running MCP server; otherwise, operations will throw transport errors.
breakingVersion 2.0.0 removed the `Connection` class. Use `@modelcontextprotocol/sdk`'s client directly.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
10 hits · last 30 days
gptbot
3
ahrefsbot
2
bingbot
1
mj12bot
1
Resources