5 ms·
Show HN: EnrichMCP – A Python ORM for Agents
I've been working with the Featureform team on their new open-source project, [EnrichMCP][1], a Python ORM framework that helps AI agents understand and interact with your data in a structured, semantic way.
EnrichMCP is built on top of [MCP][2] and acts like an ORM, but for agents instead of humans. You define your data model using SQLAlchemy, APIs, or custom logic, and EnrichMCP turns it into a type-safe, introspectable interface that agents can discover, traverse, and invoke.
It auto-generates tools from your models, validates all I/O with Pydantic, handles relationships, and supports schema discovery. Agents can go from user → orders → product naturally, just like a developer navigating an ORM.
We use this internally to let agents query production systems, call APIs, apply business logic, and even integrate ML models. It works out of the box with SQLAlchemy and is easy to extend to any data source.
If you're building agentic systems or anything AI-native, I'd love your feedback. Code and docs are here: https://github.com/featureform/enrichmcp https://github.com/featureform/enrichmcp. Happy to answer any questions.
[1]: https://github.com/featureform/enrichmcp https://github.com/featureform/enrichmcp
[2]: https://modelcontextprotocol.io/introduction https://modelcontextprotocol.io/introduction
- knowsuchagency 1y agoSuper interesting idea. How feasible would it be to integrate this with Django?
- simba-k 1y agoVery! We had quite a few people do this at a hackathon we hosted this past weekend.
- knowsuchagency 1y agoThat's fantastic to hear. Did they configure django to use sqlalchemy as the ORM or were they able to make it work with django's?
- simba-k 1y agoCurrently would have to be done on the SQLAlchemy side, but someone asked to contribute django directly. Let me see if they are still planning to do that and create/link an issue if you want to keep up with it. You could also build an EnrichMCP server that calls your Django server manually
- aolfat 1y agoWoah, it generates the SQLAlchemy automatically? How does this handle auth/security?
- simba-k 1y agoYep, we can essentially convert from SQLAlchemy into an MCP server. Auth/Security is interesting in MCP. As of yesterday a new spec was released with MCP servers converted to OAuth resource servers. There's still a lot more work to do on the MCP upstream side, but we're keeping up with it and going to have a deeper integration to have AuthZ support once the upstream enables it.
- polskibus 1y agoThis looks very interesting but I’m not sure how to use it well. Would you mind sharing some prompts that use it and solve a real problem that you encountered ?
- simba-k 1y agoImagine you're building a support agent for DoorDash. A user asks, "Why is my order an hour late?" Most teams today would build a RAG system that surfaces a help center article saying something like, "Here are common reasons orders might be delayed." That doesn't actually solve the problem. What you really need is access to internal systems. The agent should be able to look up the order, check the courier status, pull the restaurant's delay history, and decide whether to issue a refund. None of that lives in documentation. It lives in your APIs and databases. LLMs aren't limited by reasoning. They're limited by access. EnrichMCP gives agents structured access to your real systems. You define your internal data model using Python, similar to how you'd define models in an ORM. EnrichMCP turns those definitions into typed, discoverable tools the LLM can use directly. Everything is schema-aware, validated with Pydantic, and connected by a semantic layer that describes what each piece of data actually means. You can integrate with SQLAlchemy, REST APIs, or custom logic. Once defined, your agent can use tools like get_order, get_restaurant, or escalate_if_late with no additional prompt engineering. It feels less like stitching prompts together and more like giving your agent a real interface to your business.
- skuenzli 1y agoThis is the motivating example I was looking for on the readme: a client making a request and an agent handling it using the MCP. Along with a log of the agent reasoning its way to the answer.
- simba-k 1y agoYes but the agent reasoning is going to use an LLM, I sometimes run our openai_chat_agent example just to test things out. Try giving it a shot, ask it to do something then ask it to explain its tool use. Obviously, it can (and sometimes will) hallucinate and make up why its using a tool. The thing is, we don't really have true LLM explainability so this is the best we can really do.
- revskill 1y agoDo you provide prisma alternative ?
- simba-k 1y agoNot sure exactly what you mean here. Prisma is an ORM for developers working with databases in TypeScript. EnrichMCP is more like an ORM for AI agents. It’s not focused on replacing Prisma in your backend stack, but it serves a similar role for agents that need to understand and use your data model. It's also Python.
- ljm 1y ago> agents query production systems How do you handle PII or other sensitive data that the LLM shouldn’t know or care about?
- traverseda 1y agoThat's an odd question. If you have a regular ORM how do you handle sensitive data that your user shouldn't know about? You add some logic or filters so that the user can only query their own data, or other data they have permission to access. It's also addressed directly in the README. https://github.com/featureform/enrichmcp?tab=readme-ov-file#-context--authentication https://github.com/featureform/enrichmcp?tab=readme-ov-file#... I know LLMs can be scary, but this is the same problem that any ORM or program that handles user data would deal with.
- hobofan 1y ago> You add some logic or filters so that the user can only query their own data, or other data they have permission to access. What you are talking about is essentially only row level security (which is important for tenant seperation), while in the case of integrating external service providers, you column level security is a more important factor. > I know LLMs can be scary, but this is the same problem that any ORM or program that handles user data would deal with. In most other progams you don't directly plug your database full of PII to an external service provider. In most other programs you don't have that same problem because the data takes a straight path from DB -> server -> user. The README repeats an example that makes the user's email available for an agent to query (enabling PII leakage), setting a bad precedent in a space that's already chock-full of vibe coders without any concern about data privacy.
- ethan_smith 1y agoYou could implement field-level access controls with attribute decorators that mask PII during serialization, similar to how SQLAlchemy's hybrid_property can transform data before it reaches the agent context.
- sagarpatil 1y agoInteresting…
- sgt 1y agoIs there anything like this, but for Java?
- hu3 1y agoIs this like GraphQL for MCPs?
- simba-k 1y agoYes, I think its a good comparison