Replies: 1 comment
-
FastMCP will automatically handle the The list is prepared from all the items marked with the respective decorators, e.g., Sounds like you want to create a "tables" resource, and possibly with a custom URI: @server.resource("sql_schema://tables")
def get_tables(...):
# ... fetch table list from PostgreSQL Later you could build a template (dynamic) resource for parameterized schema queries (get tables, get indeces, get views, etc.). But, note that not many MCP clients (including Claude Desktop & Code) support discovery of resources. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to implement the postgres mcp server in Fastmcp.(ref : https://github.com/modelcontextprotocol/servers/tree/main/src/postgres). I want to list all the tables in the database/schema in the list resource.
For that there should be some method like list_resource. I am not able to create resources at runtime, by querying the information_schema.
Can someone please direct me in the right direction ?
Beta Was this translation helpful? Give feedback.
All reactions