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.
http://localhost:3000/api
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| 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/raw | Execute raw SQL queries with parameter binding for complex operations |
| POST | /query/builder | Execute advanced queries using TypeORM QueryBuilder JSON syntax |
| GET | /metadata/{entityName} | Retrieve entity metadata including columns, relations, and indexes |
| GET | /migrations | List all available migrations with their execution status |
| POST | /migrations/run | Execute pending migrations to update database schema |
| POST | /migrations/revert | Revert the most recently executed migration |
| GET | /relations/{entityName}/{id}/{relationName} | Load specific relations for an entity instance with lazy loading |
| POST | /transaction | Execute multiple operations within a database transaction atomically |
| GET | /connection/status | Check database connection status and connection pool statistics |
| POST | /cache/clear | Clear query result cache for specific entities or all cached queries |
Sponsor this page
AvailableReach developers actively building with TypeORM. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →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
}'
Use TypeORM from Claude / Cursor / ChatGPT
TypeORM is a self-hosted protocol — it lives on a host you operate (default http://localhost:3000/api). A
hosted MCP gateway can't reach localhost on your machine, so the usual one-click setup doesn't apply.
These are the tools an MCP for TypeORM would expose:
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
Run an TypeORM MCP locally
The local-CLI version of these tools is on the way (npx @meru/rest-mcp --vendor=typeorm · BYO connection string · zero secrets sent to us). For now use the patterns below in your own MCP server, or self-host one from the IOX templates.