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(), framework.WithMCPTools(mcptools.Register), // framework_docs_* over the embedded docs )
Dev MCP
gofastr dev hands the running app to your coding agent, whether Claude Code or Codex, over MCP: it reads routes, config, readiness and recent logs, the framework docs when the app registers them (generated apps do), 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, log_recent # + every CRUD entity's data tools (posts_list, posts_create, …) # + framework_docs_* when main.go has WithMCPTools(mcptools.Register) 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.txt GET /.well-known/agent-card.json GET /.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})