Built for two kinds of agents
Two kinds of agents, two layers of MCP. In production, the agents your users bring call your data with the same login and permissions the users have. While you build, gofastr dev hands your coding agent the running app.
Production MCP tools
Turn on MCP and every CRUD entity gets tools an agent can call. The tools run through the same auth, owner, and tenant checks as your HTTP API — an agent gets exactly the access its user has, and nothing more.
fwApp := framework.NewUIHostApp(host, framework.WithConfig(framework.AppConfig{Name: "app"}), framework.WithMCP(), // entities get MCP tools at /mcp framework.WithMCPIntrospection(),)
Dev MCP
gofastr dev hands your coding agent — Claude Code, Codex — the running app over MCP: it reads routes, config, readiness, embedded docs, and recent logs, and it can write app data through the same entity tools your API serves. It's livereload for agents; opt out with GOFASTR_DEV_MCP=0.
# GOFASTR_DEV=1 mounts the dev MCP tools for your coding agent:# app_routes, app_config, app_readiness, framework_docs_*, log_recent# + every CRUD entity's data tools (posts_list, posts_create, …)gofastr dev
Auto llm.md
Every screen and every entity ships an llm.md automatically — a plain-text description an agent reads to understand the page or the API. On by default; opt one out with NoLLMMD.
Discovery endpoints
Turn on the agent-ready host options and your app serves the files agent scanners look for — an llms.txt and the .well-known endpoints — so an agent can find what your app does.
GET /llms.txtGET /.well-known/agent-card.jsonGET /.well-known/agent.json
Local semantic search
battery/semantic indexes a corpus locally and answers similarity queries — no external API key, works offline.
idx, _ := semantic.Open(semantic.Options{ Embedder: semantic.NewStubEmbedder(128), Keyword: semantic.NewMemoryKeyword(),})idx.Add(ctx, docs...)hits, _ := idx.Query(ctx, semantic.Query{Text: "how do hooks work", K: 5, Hybrid: true})