Flowcore Local Read Model MCP server for DuckDB

Flowcore Local Read Model MCP server for DuckDB

mcp-flowcore-platform•byflowcore-io

An MCP server that creates and manages local read models in DuckDB, fed with events from the Flowcore Platform.

License: Not specified•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Initializes a DuckDB database for the read model, either in-memory or file-based.
  • •Creates projection tables in the DuckDB database using supplied SQL.
  • •Registers JavaScript projector functions that transform Flowcore events into database records.
  • •Runs SQL queries on the DuckDB database and reports active event streams.

BEST FOR

  • •Building a local read model from Flowcore Platform events for analysis.
  • •Streaming Flowcore events over a date range into a target table with a custom projector.

ABOUT MCP-FLOWCORE-PLATFORM

Flowcore Local Read Model MCP server for DuckDB is cataloged as an MCP server attributed to flowcore-io. An MCP server that creates and manages local read models in DuckDB, fed with events from the Flowcore Platform. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Flowcore Local Read Model MCP server for DuckDB are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Can the read model be stored in memory instead of a file?

Yes, the database is in-memory when no file path is provided.

How is authentication handled with the Flowcore Platform?

You provide either a username or a Personal Access Token.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 0c50ef4f8658 · 采集于 2026-11-13 10:15:43 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Flowcore Local Read Model MCP

This MCP (Model Context Protocol) server allows you to create and manage local read models using DuckDB, fed with events from the Flowcore Platform. It provides a set of tools to initialize a database, create tables, project events, and query the resulting data.

Installation

npm install @flowcore/local-read-model-mcp

Usage

To use this MCP, you need to provide either a username or a Personal Access Token (PAT) for authentication with the Flowcore Platform.

npx @flowcore/local-read-model-mcp --username <your-username>
# or
npx @flowcore/local-read-model-mcp --pat <your-pat>

Environment Variables

VariableTypeDescriptionDefaultRequired
USERNAMEstringYour Flowcore username-✓
PATstringYour Flowcore Personal Access Token-✓

Available Tools

1. Database Management

Initialize DuckDB

Initializes a DuckDB database for the read model. You can choose between in-memory or file-based storage.

initialize_duckdb({
    file: "/path/to/database.db" // Optional, uses in-memory if not provided
})

Close DuckDB

Closes the database connection and stops any active event stream projections.

close_duckdb()

2. Table Management

Create Projection Table

Creates a new table in the DuckDB database using SQL.

create_projection_table({
    createTableSQL: `
        CREATE TABLE my_table (
            id INTEGER PRIMARY KEY,
            created_at TIMESTAMP NOT NULL,
            amount DECIMAL(10,2),
            status VARCHAR(50) DEFAULT 'pending'
        );
    `
})

3. Event Projection

Create Event Projector

Creates and registers a JavaScript function that transforms Flowcore events into database records.

create_event_projector({
    name: "my_projector",
    absoluteFilePath: "/path/to/projector.cjs"
})

Example projector function (projector.cjs):

function projectEvent(event) {
    return {
        id: event.id,
        timestamp: new Date(event.timestamp).toISOString(),
        amount: Number.parseFloat(event.amount).toFixed(2),
        status: String(event.status).toLowerCase()
    };
}

module.exports = projectEvent;

Start Event Stream Projection

Starts streaming events from Flowcore and projecting them to the database.

start_event_stream_projection({
    tenant: "your-tenant",
    dataCore: "your-datacore",
    flowTypeName: "your-flow-type",
    eventTypeName: "your-event-type",
    startDate: "2024-01-01T00:00:00Z",
    endDate: "2024-01-31T23:59:59Z",
    projectorName: "my_projector",
    targetTable: "my_table",
    maxParallelism: 100 // Optional, default is 100
})

Stop Event Stream Projection

Stops a specific event stream projection.

stop_event_stream_projection({
    streamId: "stream-123"
})

4. Querying and Monitoring

Query Database

Execute SQL queries on the DuckDB database.

query_database({
    query: "SELECT * FROM my_table WHERE status = 'pending' LIMIT 10;"
})

Get Stream Information

Get information about a specific event stream projection.

get_stream_info({
    streamId: "stream-123"
})

Get All Streams

Get information about all active event stream projections.

get_all_streams()

Best Practices

Table Creation

  1. Use appropriate data types and formats:

    • TIMESTAMP: ISO 8601 format (YYYY-MM-DD HH:MM:SS.SSS)
    • DATE: ISO format (YYYY-MM-DD)
    • TIME: 24-hour format (HH:MM:SS.SSS)
    • DECIMAL/NUMERIC: Specify precision and scale
    • VARCHAR: Always specify length limit
  2. Follow naming conventions:

    • Use lowercase for table and column names
    • Use snake_case naming convention
    • Include appropriate indexes
    • Consider partitioning for large tables

Event Projectors

  1. Handle data type conversions properly
  2. Implement error handling for malformed input
  3. Return null for unmappable fields
  4. Use pure functions without side effects
  5. Handle null/undefined values gracefully

Example Workflow

Here's a complete example of setting up a local read model:

// 1. Initialize the database
initialize_duckdb({ file: "my_read_model.db" })

// 2. Create a table
create_projection_table({
    createTableSQL: `
        CREATE TABLE events (
            event_id VARCHAR(100) PRIMARY KEY,
            timestamp TIMESTAMP NOT NULL,
            type VARCHAR(50),
            data JSON
        );
    `
})

// 3. Create and register a projector
create_event_projector({
    name: "event_projector",
    absoluteFilePath: "./projector.cjs"
})

// 4. Start streaming events
start_event_stream_projection({
    tenant: "my-tenant",
    dataCore: "my-datacore",
    flowTypeName: "my-flow",
    eventTypeName: "my-events",
    startDate: "2024-01-01T00:00:00Z",
    endDate: "2024-01-31T23:59:59Z",
    projectorName: "event_projector",
    targetTable: "events"
})

// 5. Query the results
query_database({
    query: "SELECT * FROM events ORDER BY timestamp DESC LIMIT 10;"
})

// 6. Close the database when done
close_duckdb()

License

[Add your license information here]

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Flowcore Local Read Model MCP server for DuckDB from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-flowcore-platform)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage