Convex's compatibility
Can someone provide more clarity about these issues:
- Is it possible to talk to the Convex database in natural language?
- Quite a few people have been showing the power of Postgres with natural language.
- Here is a demo- where AI automatically generates relevant queries and give output- https://vercel.com/templates/next.js/natural-language-postgres
- Seems doable on the surface, it’s just that the AI needs to be given the context of Queries and Mutations related to Convex. Is there a better way to do it?
- Related to this only, is Convex compatible with the emerging protocols which link to external data and systems like Model Context Protocol(MCP) by Anthropic?
- They have mentioned about Postgres support here- https://modelcontextprotocol.io/introduction
- Seems like such kind of interactions will become a lot more prevalent in the near future.
- Does Convex already support Realtime API support for Open AI over Websockets?
- Although the entire Convex database is reactive, but not sure about this one.
Natural Language Postgres
An Next.js application that allows you to query a PostgreSQL database with natural language.
Model Context Protocol
Introduction - Model Context Protocol
Get started with the Model Context Protocol (MCP)
12 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Also, any plans for potential integration with the new emerging Typescript AI framework like mastra.ai?
Anyone?
@codebird the short and honest answer is, we don't know yet. Convex works really well as a generation target for a lot of AI tools due to the well-specified semantics. people are building businesses based on this. but new platforms are emerging quickly. @mikeysee (new on our team) is passionate about this area, so he's going to spend more time getting caught up and ahead on these emerging AI integrations
Thank you
Hey @codebird wow the field sure is moving fast! I thought I was pretty connected into things but I havent even heard of mastra.ai. I have made a task to spend some time to deep dive into it tho as it looks super interesting.
As for:
Related to this only, is Convex compatible with the emerging protocols which link to external data and systems like Model Context Protocol(MCP) by Anthropic?@Omar one of our Community Champions might be a good person to talk to about that. I personally havent done any but I know he has been tinkering with it lately.
Does Convex already support Realtime API support for Open AI over Websockets?I personally havent done anything yet with the Realtime API but I really would like to. Are you asking is Convex able to open a websocket from an action?
Is it possible to talk to the Convex database in natural language?It definitely is possible to use Cursor or Copilot or one of these to generate Convex query code, quite a lot of us already do do this and it works pretty well again @Omar or @Matt Luo might be able to offer some more specific tips to help with getting the best out of the codegen there. Currently the dashboard doesn't directly allow you to prompt then generate queries like you show in that postgres example tho that would be a pretty cool feature!
Oh hmm, that seems to be more of an app rather than something about postgres itself
Community member could build natural language function writer as a Chrome extension
Related to this only, is Convex compatible with the emerging protocols which link to external data and systems like Model Context Protocol(MCP) by Anthropic?
Yes it is, here's a reference implementation: https://github.com/handfuloflight/convex-mcp-server
GitHub
GitHub - handfuloflight/convex-mcp-server
Contribute to handfuloflight/convex-mcp-server development by creating an account on GitHub.
Took a look at mastra, totally possible to have a Convex adapter in through a ConvexEngine class but doubtless much rearchitecting required
I think if you're building on Convex you can learn more about how they've implemented things to inform your implementations, that's what I'm going to do.
Yes, opening a secure websocket connection from an action without exposing .env variables as such. Check out this recent OpenAI real time demo by Supabase- https://www.youtube.com/watch?v=envrsJ8VfAU&t=260s or this with Elevenlabs https://x.com/thorwebdev/status/1864618365110899157 where the real time websocket connection is intact for the duration of the call. Would be nice to see its code implementation.
Supabase
YouTube
3 new things you can do with SupaCharged Edge Functions
Supabase Functions v3 now supports websocket connections, temporary file storage and background tasks. In this video, Jon Meyers demonstrates how to proxy websocket requests through a Supabase Edge Function to OpenAI's Realtime API to protect keys and secrets, and how to store a large zip file temporarily and continue processing after a response...
Thor 雷神 ⚡️ (@thorwebdev) on X
📀 @elevenlabsio just launched their conversational AI product, allowing you to set up voice agents with your own voice 🤯
Took me less than 10mins to set up, and is easily integrated with @supabase Auth & Edge Functions 🔥
Demo & code 👇
Twitter
This natural language workflow is bound to get more integrated especially for financial/accounting tables. Some people have raised a lot of funding on this use case itself in the Finance sector. But they are probably using raw SQL queries under the hood.
Thank you for sharing. While going throught the MCP docs, it looked like that Convex would not be compatible with MCP, as they listed support just for Postgres/SQLite. Good to see that Convex can also be integrated such open source Protocols. Would look more into it.
I think that support was for reference implementations they already had available, not that there is any fundamental reason why it wouldn't be compatible