Show HN: EnrichMCP – A Python ORM for Agents

https://news.ycombinator.com/rss Hits: 7
Summary

EnrichMCP The ORM for AI Agents - Turn your data model into a semantic MCP layer EnrichMCP is a Python framework that helps AI agents understand and navigate your data. Built on MCP (Model Context Protocol), it adds a semantic layer that turns your data model into typed, discoverable tools - like an ORM for AI. What is EnrichMCP? Think of it as SQLAlchemy for AI agents. EnrichMCP automatically: Generates typed tools from your data models from your data models Handles relationships between entities (users → orders → products) between entities (users → orders → products) Provides schema discovery so AI agents understand your data structure so AI agents understand your data structure Validates all inputs/outputs with Pydantic models with Pydantic models Works with any backend - databases, APIs, or custom logic Installation pip install enrichmcp # With SQLAlchemy support pip install enrichmcp[sqlalchemy] Show Me Code Option 1: I Have SQLAlchemy Models (30 seconds) Transform your existing SQLAlchemy models into an AI-navigable API: from enrichmcp import EnrichMCP from enrichmcp . sqlalchemy import include_sqlalchemy_models , sqlalchemy_lifespan , EnrichSQLAlchemyMixin from sqlalchemy . ext . asyncio import create_async_engine from sqlalchemy . orm import DeclarativeBase , Mapped , mapped_column , relationship engine = create_async_engine ( "postgresql+asyncpg://user:pass@localhost/db" ) # Add the mixin to your declarative base class Base ( DeclarativeBase , EnrichSQLAlchemyMixin ): pass class User ( Base ): __tablename__ = "users" id : Mapped [ int ] = mapped_column ( primary_key = True ) email : Mapped [ str ] = mapped_column ( unique = True ) status : Mapped [ str ] = mapped_column ( default = "active" ) orders : Mapped [ list [ "Order" ]] = relationship ( back_populates = "user" ) class Order ( Base ): __tablename__ = "orders" id : Mapped [ int ] = mapped_column ( primary_key = True ) user_id : Mapped [ int ] = mapped_column ( ForeignKey ( "users.id" )) total : Mapped...

First seen: 2025-06-19 18:09

Last seen: 2025-06-20 00:21