mirror of
https://github.com/mudler/LocalAGI.git
synced 2026-08-27 03:11:18 -04:00
391e007bc2
LocalAGI speaks MCP as a client, so an agent can use external tools, but nothing outside the process can create or configure an agent except the REST API and the Web UI that sits on it. The web server now also answers MCP at /mcp, with eight tools over the same agent pool the REST handlers use: list, read, create, update, delete, pause, start, and a schema tool that reports the connectors, actions, dynamic prompts and filters the instance provides. The endpoint mounts after the API key middleware, so MCP clients authenticate with the bearer token that already guards the REST API. It runs stateless and replies with JSON rather than an event stream, because each call is one request and one response, which is what survives the fasthttp adaptor. The create and update schemas come from state.AgentConfig by reflection, so they follow the struct as it grows. Reflection marks every field without omitempty as required, which would force a client to send all 58 of them, so both tools require only the agent name. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011wnxzYVrUZ7xtpqAGHM474