← Back to Discover

Simfinity.js

Simfinity.js is a GraphQL framework that generates database models, queries, mutations, relationships and optional MCP tools from GraphQL type definitions, on MongoDB or PostgreSQL.

Libraries & SDKsApp builders

What it does

Simfinity.js turns GraphQL object types into a connected system. You define a GraphQL object type and register it with simfinity.connect. You then call simfinity.createSchema. One registration adds list, detail, aggregation and CRUD operations. Describe embedded documents, references and collections, and Simfinity generates the resolvers. Queries support nested filters, logical expressions, sorting, pagination and aggregations. Authorization, validation and query scopes can be brought into the schema, using the context your application provides. Lifecycle hooks, custom mutations and state machines hold custom business logic. The generateMCPTools function creates typed MCP tools from the same GraphQL API on either database. A Barber example app shows the workflow on MongoDB and PostgreSQL.

Capabilities

  • Generates database models, GraphQL queries, mutations and relationships from one GraphQL schema.
  • Queries compose nested filters, logical expressions, sorting, pagination and aggregations.
  • Authorization, validation and query scopes can be defined in the schema.
  • Lifecycle hooks, custom mutations and state machines support custom business logic.
  • The generateMCPTools function generates typed MCP tools from the GraphQL API on either database.

When to use it

  • You want to build a GraphQL API on MongoDB or PostgreSQL from GraphQL type definitions.
  • You want your AI tools to reach your data through typed MCP tools generated from the same GraphQL API.
  • You want to add custom business logic through lifecycle hooks, custom mutations or state machines.