Deploy MCP Server
Database & ORM Bearer Token

TypeORM REST API

TypeScript and JavaScript ORM for SQL and NoSQL databases

TypeORM is a powerful Object-Relational Mapping (ORM) library that runs in Node.js and supports TypeScript and JavaScript. It enables developers to work with databases using object-oriented programming patterns while supporting multiple database systems including PostgreSQL, MySQL, MariaDB, SQLite, MS SQL Server, Oracle, and MongoDB. TypeORM provides features like Active Record and Data Mapper patterns, migrations, eager and lazy relations, and comprehensive TypeScript support.

Base URL http://localhost:3000/api

API Endpoints

MethodEndpointDescription
GET/entities/{entityName}Retrieve all records for a specific entity with optional filtering, sorting, and pagination
GET/entities/{entityName}/{id}Retrieve a single record by ID for a specific entity including relations
POST/entities/{entityName}Create a new record for the specified entity with validation
PUT/entities/{entityName}/{id}Update an existing record by ID with partial or full data
DELETE/entities/{entityName}/{id}Delete a record by ID and optionally cascade to related entities
POST/query/rawExecute raw SQL queries with parameter binding for complex operations
POST/query/builderExecute advanced queries using TypeORM QueryBuilder JSON syntax
GET/metadata/{entityName}Retrieve entity metadata including columns, relations, and indexes
GET/migrationsList all available migrations with their execution status
POST/migrations/runExecute pending migrations to update database schema
POST/migrations/revertRevert the most recently executed migration
GET/relations/{entityName}/{id}/{relationName}Load specific relations for an entity instance with lazy loading
POST/transactionExecute multiple operations within a database transaction atomically
GET/connection/statusCheck database connection status and connection pool statistics
POST/cache/clearClear query result cache for specific entities or all cached queries

Code Examples

# Retrieve all users with filtering
curl -X GET 'http://localhost:3000/api/entities/User?where={"isActive":true}&take=10&skip=0' \
  -H 'Authorization: Bearer your_api_token_here' \
  -H 'Content-Type: application/json'

# Create a new user
curl -X POST 'http://localhost:3000/api/entities/User' \
  -H 'Authorization: Bearer your_api_token_here' \
  -H 'Content-Type: application/json' \
  -d '{
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "isActive": true
  }'

Connect TypeORM to AI

Deploy a TypeORM MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to TypeORM through these tools:

query_entity Query any TypeORM entity with natural language filters, automatically translating to TypeORM QueryBuilder syntax
create_entity Create new database records with automatic validation and relationship handling based on entity definitions
generate_migration Analyze entity changes and automatically generate migration files to synchronize database schema
analyze_relationships Explore and visualize entity relationships, foreign keys, and join strategies for query optimization
execute_transaction Execute multiple database operations atomically within a transaction with automatic rollback on errors

Deploy in 60 seconds

Describe what you need, AI generates the code, and IOX deploys it globally.

Deploy TypeORM MCP Server →

Related APIs