{
  "markdown": "# 🥬 Rett fra Bonden — Local Food Agent Network for Norway\n\n**Live:** https://rettfrabonden.com | **MCP Server:** https://rettfrabonden.com/mcp | **API Spec:** https://rettfrabonden.com/openapi.yaml\n\nRett fra Bonden is the discovery layer for local food in Norway. 1,371+ producers — farms, farm shops, REKO rings, farmers markets, and cooperatives — discoverable by AI agents and humans alike.\n\nNot an app. Not a webshop. **Infrastructure** — the DNS for food agents.\n\n## Use Rett fra Bonden\n\n### From Claude (remote MCP via Claude Connectors)\n\nThe recommended setup for Claude.ai users: connect the remote MCP server directly, no local install required.\n\n- **MCP Server URL:** `https://rettfrabonden.com/mcp`\n- **Transport:** Streamable HTTP (MCP protocol 2025-06-18)\n- **Authentication:** None required — the server is publicly accessible\n\nOnce connected, ask Claude things like:\n- *\"Finn økologiske grønnsaker nær Oslo som leverer hjem\"*\n- *\"Which dairy farms in Rogaland sell raw milk directly to consumers?\"*\n- *\"Compare three honey producers in Innlandet — who ships nationwide?\"*\n\n### From Claude Desktop (MCP stdio)\n\nIf you prefer a local install over remote:\n\n```json\n{\n  \"mcpServers\": {\n    \"lokal\": {\n      \"command\": \"npx\",\n      \"args\": [\"lokal-mcp\"]\n    }\n  }\n}\n```\n\n### From ChatGPT (Developer Mode / Custom GPT)\n\n**Developer Mode:** Add `https://rettfrabonden.com/mcp` as the MCP server URL.\n\n**Custom GPT:** Create a GPT with Actions pointing to `https://rettfrabonden.com/openapi.yaml`. Instructions in [`custom-gpt-instructions.md`](custom-gpt-instructions.md).\n\n### From your own agent (A2A / REST)\n\n```bash\n# Natural language search\ncurl \"https://rettfrabonden.com/api/marketplace/search?q=organic+vegetables+near+Oslo\"\n\n# Structured discovery\ncurl -X POST https://rettfrabonden.com/api/marketplace/discover \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"categories\":[\"vegetables\"],\"tags\":[\"organic\"],\"lat\":59.91,\"lng\":10.75,\"maxDistanceKm\":30}'\n\n# A2A JSON-RPC\ncurl -X POST https://rettfrabonden.com/a2a \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"method\":\"message/send\",\"params\":{\"message\":{\"role\":\"user\",\"parts\":[{\"type\":\"text\",\"text\":\"Find cheese near Bergen\"}]}},\"id\":\"1\"}'\n```\n\n## MCP Tools & Resources\n\nThe remote MCP endpoint at `/mcp` exposes four tools and two resources.\n\n| Tool | Purpose | Read/Write |\n|------|---------|------------|\n| `lokal_search` | Natural-language producer search (NO/EN). Auto-starts a conversation with top matches so sellers can respond. | Read + Write |\n| `lokal_discover` | Structured filter — categories, tags, geo-radius. Auto-starts conversations. | Read + Write |\n| `lokal_info` | Full producer profile — address, products, opening hours, certifications. | Read only |\n| `lokal_stats` | Platform-level metrics — total agents, cities covered. | Read only |\n\n| Resource URI | Mime | Description |\n|--------------|------|-------------|\n| `lokal://producers/overview` | `text/plain` | Aggregate view of producers by city |\n| `lokal://producers/{agentId}` | `application/json` | Detailed info about a specific producer |\n\n## HTTP API\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/mcp` | POST/GET/DELETE | MCP Streamable HTTP (remote MCP transport) |\n| `/api/marketplace/search?q=...` | GET | Natural language search (NO/EN) |\n| `/api/marketplace/discover` | POST | Structured filtering |\n| `/api/marketplace/agents/:id/info` | GET | Producer details |\n| `/api/stats` | GET | Platform statistics |\n| `/a2a` | POST | A2A JSON-RPC 2.0 |\n| `/.well-known/agent-card.json` | GET | A2A Agent Card |\n| `/.well-known/mcp/server-card.json` | GET | MCP Server Card (human + machine-readable metadata) |\n| `/openapi.yaml` | GET | OpenAPI 3.1 spec |\n| `/llms.txt` | GET | AI-discovery index |\n| `/privacy` | GET | Privacy policy (NO/EN) |\n\nFull spec: https://rettfrabonden.com/openapi.yaml\n\n## Architecture\n\n- **TypeScript + Express** on Fly.io\n- **SQLite** with WAL mode, persistent volume\n- **MCP 2025-06-18** over Streamable HTTP + stdio (remote + local)\n- **A2A v1.0.0** compliant (JSON-RPC 2.0 + Agent Card)\n- **Value-based matching** — no ads, no pay-to-rank\n- **1,386+ agents** across 374+ Norwegian cities\n\n## For producers\n\nYour farm/market might already be listed. Visit https://rettfrabonden.com to check, and claim your agent to update your info and respond to buyer queries.\n\n## Troubleshooting\n\n**\"The connector can't reach the server\"**\nCheck that your client is pointed at `https://rettfrabonden.com/mcp` (HTTPS, no trailing slash). The server uses the Streamable HTTP transport — stdio clients should use the `lokal-mcp` npm package instead.\n\n**\"CORS error in the browser\"**\nBrowser-based MCP clients must send an `Origin` header. The server allow-lists `https://claude.ai`, `https://www.claude.ai`, `https://chatgpt.com`, and `https://chat.openai.com`. If you're hosting your own agent on a different origin, open an issue and we'll add it.\n\n**\"tools/list returns an empty array\"**\nHit `POST /mcp` with a proper `initialize` request first and capture the `Mcp-Session-Id` response header. Subsequent calls must include that header — session IDs are sticky per connection.\n\n**\"Search returns no results for a Norwegian query\"**\nThe server handles both NO and EN, but accents matter. Use `økologisk` rather than `okologisk` for best relevance. Try widening with `lokal_discover` — it accepts lat/lng + radius instead of free text.\n\n**\"I claimed my agent but the dashboard is empty\"**\nClaims are verified by email. Check spam for the verification code from `kontakt@rettfrabonden.com`. The token is valid for 24 hours.\n\n**Rate limits**\nPublic endpoints allow 150 searches and 300 general API calls per 15-minute window. MCP `tools/call` counts against the search bucket. If your agent hits the limit, back off for 15 minutes — we don't block IPs, only throttle.\n\n**Still stuck**\nOpen an issue at https://github.com/slookisen/lokal/issues with the request payload (redact anything sensitive) and the response status code.\n\n## Privacy, Terms & Support\n\n- **Privacy policy:** https://rettfrabonden.com/privacy\n- **Terms of service:** https://rettfrabonden.com/terms\n- **Issues / support:** https://github.com/slookisen/lokal/issues\n\n## License\n\nMIT\n",
  "bytes": 6265,
  "sha": "00877badf5b5a4c845e29257374b7e8cc05f8ad57487c4d47dc829ecc64afdf5",
  "repo_slug": "slookisen/lokal",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_slookisen_lokal_mcp_baf95836/readme"
}