Create an MCP Server from an API | OpenAPI with FastMCP

preview_player
Показать описание
Build an MCP Server from OpenAPI Spec - This will save you hours! The official docs mention the API to MCP capability but I had to work it all out. The examples you may see online typically have a very minimal hard coded JSON example, not an actual API schema like we use here with the fully fledged “Petstore” API. This is very cool, check out what it can do.

This is hot off the press, so apologies for errors or omissions, but it's so cool I wanted to share asap.

TL;DR
use FastMCP from OpenAPI

- chapters -
00:00 intro
03:19 FastMCP code
07:06 add the code (imports)
09:51 logging
10:14 main function
11:41 add http client
21:57 mcp inspector
25:06 modify live data
28:22 fastmcp docs

Links:

📝 If you want a fast VPS server with Python installed check out :

Thumbs up yeah? (cos Algos..)

📑 MCP from API
📑 MCP Server
📑 MCP Protocol
📑 FastMCP Python

#mcp #openapi #pythonprogramming
Рекомендации по теме
Комментарии
Автор

thanks for this, very interesting. i will add it as a Pipe for OpenWebUI on a project I was considering doing differently. Thanks. have you the code in a gitrepo?

FranciscoMonteiro
Автор

Hi Any recommendation on how can I do authentication, against our own JWKS token validator, and pass the request further down by using proxy concept?

amitmalhotra
join shbcf.ru