haven icon indicating copy to clipboard operation
haven copied to clipboard

[Feature Request] Public API

Open iocouto opened this issue 6 months ago • 4 comments

It would be extremely useful if a Haven blog exposed a public API that could be used by external tools - eg., integration and automation tools. A couple of example use-cases:

a) There is an increasing number of excellent frontend WebDev tools that plug into headless backends, and these tools often need a backend blog - like the amazing Webstudio.

b) AI agents and agent-based workflow automation used to be the domain of corporate enterprise. But now even end-user automation tools (like Zapier, Pabbly and Make) have added AI steps into their workflows, and tools like Taskade, AgenticFlow and Relevance have come down in price so much that everyone is interested in agentic workflows: I can easily develop an AI-based workflow where one AI agent researches topics, while another writes, and then it can all get automatically posted to my blog — and cross-posted to social media...

iocouto avatar Jun 25 '25 04:06 iocouto

Haven actually implements MicroPub with IndieAuth (including PKCE) for authentication.

These protocols are not quite as well-defined as I would have hoped--there are optional extensions that are de facto standards based on what the IndieWeb community has rallied around.

I haven't published anything about these APIs because I haven't found really good clients that I feel provide an excellent user experience. Of note, the https://micropub.rocks/ test suite does not support PKCE, so I cannot use it for testing. I also suspect there are some bugs with the Haven implementation of MicroPub as Quill doesn't seem to upload images correctly but I haven't been able to figure out why.

mawise avatar Jun 25 '25 13:06 mawise

@mawise having a standard REST API would probably make it easier for automation services and agentic workflow builders to use (and promote) Haven. To make sure Haven gets quickly added to all current AI workflow tools, offer it as an MCP Server: that means users don't even have to know what the API looks like...

iocouto avatar Jun 26 '25 00:06 iocouto

MCP isn't a high priority right now. Within ~6 months AI tool use will probably be able to dynamically adapt to any standard API

mawise avatar Jun 27 '25 13:06 mawise

MCP isn't a high priority right now. Within ~6 months AI tool use will probably be able to dynamically adapt to any standard API

Indeed, once we have a RESTful API, "converting it" into an MCP server is already easy enough, and with quite well documented strategies — there are even various libraries and online tools to help with the task already:

https://rajeshdhiman.medium.com/%EF%B8%8F-how-i-turned-a-rest-api-into-an-mcp-server-and-why-you-should-too-1d9566eeefb9

https://www.mcpfabric.com/blog/api-to-mcp

https://mcptoggle.substack.com/p/from-rest-to-mcp-converting-your

https://nordicapis.com/how-to-turn-any-api-into-an-mcp-server/

https://rapid-mcp.com

iocouto avatar Jun 28 '25 00:06 iocouto