Live data from Hacker News

Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers

github.com

11–20 of 29 posts

Re: Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers

#11
post #7

Since you're framing this as a learning resource, here are a couple things I see: Your views are not following a single convention: some of them return dictionaries, some return base JSONResponse objects, and others return properly defined Pydantic schemas. I didn't run the code, but I'd venture to guess your generated documentation is not comprehensive, nor is it cohesive. I'd also further extend this into your agen…

Do you have any recommendations for articles or example projects of what a good Python project (that isn't django based) looks like in 2025? Seeing things like pydantic derived types leak everywhere seems wrong from my Java background.

pydantic types are designed to be shipped. Just make sure you strip any security stuff or PII. Pydantic and JSON work very very well together.

Re: Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers

#12
post #10

Earlier quoted context omitted.

Do you have any recommendations for articles or example projects of what a good Python project (that isn't django based) looks like in 2025? Seeing things like pydantic derived types leak everywhere seems wrong from my Java background.

Ooh, great question. I don't have a good link. I would say that most of the concepts that I'm expressing come from personal experience and an interest in optimizing my own codebases for maintainability. Pydantic is often misunderstood, and developers who aren't familiar with typesafe-python love to try to raise criticisms of it. But the way that you should think about it is that it's essentially a replacement for a b…

Exactly this. From SQL Alchemy to pydantic model, from pydantic model to pydantic dto, from pydantic dto to json/protobuf/binary to ship over the wire…

Re: Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers

#13
post #8

I've been very happy with pydantic-ai, it blows the rest of the python ai ecosystem out of the water

Are you using Pydantic AI for structured output? If so, have you also tried instructor?

I personally just switched to https://docs.boundaryml.com/guide/comparisons/baml-vs-pydant...

just feels a bit more polished. especially testing part.

Re: Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers

#14
post #8

I've been very happy with pydantic-ai, it blows the rest of the python ai ecosystem out of the water

Are you using Pydantic AI for structured output? If so, have you also tried instructor?

`outlines` (https://github.com/dottxt-ai/outlines) is very good and supported by vLLM as a backend structured output provider (https://docs.vllm.ai/en/v0.8.2/features/structured_outputs.h...) for both local and remote LLMs. vLLM is probably the best open source tooling for the inference side right now.

Re: Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers

#15
post #10

Earlier quoted context omitted.

Ooh, great question. I don't have a good link. I would say that most of the concepts that I'm expressing come from personal experience and an interest in optimizing my own codebases for maintainability. Pydantic is often misunderstood, and developers who aren't familiar with typesafe-python love to try to raise criticisms of it. But the way that you should think about it is that it's essentially a replacement for a b…

Exactly this. From SQL Alchemy to pydantic model, from pydantic model to pydantic dto, from pydantic dto to json/protobuf/binary to ship over the wire…

Okay, so seeing pydantic types used in every part of an app not just the API layer is normal.

Re: Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers

#16
post #8

I've been very happy with pydantic-ai, it blows the rest of the python ai ecosystem out of the water

Are you using Pydantic AI for structured output? If so, have you also tried instructor?

I did look at instructor and probably for structured output pydantic-ai and instructor are about the same, but pydantic-ai supports a ton of other stuff that isn't part of instructor's feature set. For me killer apps were the ability to serialize/deserialize conversations as json; frictionless tool-calling; and ability to mock the LLM client for testing.

Re: Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers

#17

Earlier quoted context omitted.

Exactly this. From SQL Alchemy to pydantic model, from pydantic model to pydantic dto, from pydantic dto to json/protobuf/binary to ship over the wire…

Okay, so seeing pydantic types used in every part of an app not just the API layer is normal.

Yes. It’s the only way to ensure typing in a dynamic typed world. You can attrs, you can validate, but pydantic does it all.

Re: Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers

#20

This is a great repo, I was looking for something like this! I believe MCP and A2A will probably remain and others will build on top of them actually

Thanks a lot, I believe too that MCP and A2A are not going anywhere anytime soon. Although both of them need more features and security hardening in order to really survive in production like or enterprise environments.
Post reply on HN