Add an MCP server for askgod at <askgod_server_address>/mcp.#9
Add an MCP server for askgod at <askgod_server_address>/mcp.#9
<askgod_server_address>/mcp.#9Conversation
2b3a570 to
fe84c16
Compare
|
@stgraber Le lint semble chialer sur des fichiers que j'ai pas touchés, sais-tu pourquoi? |
|
@Res260 try rebasing now. I've just pushed a whole bunch of fixes to modernize things and sort out all the newer lint. |
2b402c2 to
43f79a0
Compare
|
@stgraber everything should be good now |
|
Other than the API change mentioned above, this is going to need quite a few updates:
On the styling front, our normal pattern for commands is to have them start with a capital letter and end with a period. It looks like all the newly introduced comments fail to follow the existing pattern. We've also recently been putting I also am quite concerned about having validation logic duplicated in both the REST and MCP endpoints, especially things like scoreboard filtering or the validity of a team who's attempting to submit a flag. As someone with zero interest in the MCP stuff, I'm not likely to remember to update that code so we may well end up with submissions allowed under MCP which aren't on REST, that would be bad. My preference would be for the MCP stuff to put together a regular http.Request and call the REST endpoint internally so it would be guaranteed to go through the exact same logic as a normal REST query. If that's impractical, then the logic should be extracted from the REST endpoint and be put somewhere that can be called from both REST and MCP with neither of the handlers performing any additional validation on the submitted data. I also think that the trolling/nagging logic probably ought to be configurable. Oh and speaking of configuration, the entire MCP stuff should be an optional feature that needs to be enabled in the server configuration. |
53a5e31 to
5ae26c3
Compare
|
Update: J'ai refactor le tout. Le au lieu de
Still todo, je ferai à la fin quand le review sera fini, idem pour les signoff
De quelle commande on parle? Je sais pas si c'est encore pertinent suite au refactor.
Fixed
Done, c'est en effet plus clean
Retiré altogether
Done Donc j'attend le review final et je retravaille les commits |
|
Ça me prend le re-shuffle des commits pour pouvoir faire le review. Je review toujours commit par commit dans l'ordre et m'attend généralement à ce que le codebase soit compilable à chacun de ces points pour pouvoir être capable de bisect dans le future sans avoir une batch de commits brisés qui font skipper le bisect. |
…e `COPY` step. docker-compose: restart askgod-server on failure seed-data: fix seeded IPs so they work with Docker Signed-off-by: Émilio Gonzalez <little.moon6016@fastmail.com>
Signed-off-by: Émilio Gonzalez <little.moon6016@fastmail.com>
Signed-off-by: Émilio Gonzalez <little.moon6016@fastmail.com>
…rver Signed-off-by: Émilio Gonzalez <little.moon6016@fastmail.com>
…od history` Signed-off-by: Émilio Gonzalez <little.moon6016@fastmail.com>
… to `askgod submit` (based on various AI Agent’s environment variables, this can be disabled using `--no-ai-autodetect` or using the `ASKGOD_DISABLE_AGENT_AUTODETECT` environment variable). Signed-off-by: Émilio Gonzalez <little.moon6016@fastmail.com>
It has only one tool: Submit a flag. The MCP server is disabled by default and can be enabled with `mcp: true` in the askgod config. Internally, it uses the REST method calls to limit code duplication to a minimum. Signed-off-by: Émilio Gonzalez <little.moon6016@fastmail.com>
|
@stgraber C’est fait! J’ai également retiré le refactor de la méthode qui retournait le Team selon le IP, les diffs sont pas mal plus clean sans ce refactor. |
Signed-off-by: Émilio Gonzalez <little.moon6016@fastmail.com>
Signed-off-by: Émilio Gonzalez <little.moon6016@fastmail.com>
Add an MCP server for askgod at
<askgod_server_address>/mcp.It has two methods: one to submit flags and one to list the scoreboard.
The list scoreboard method contains a small prompt injection to troll the players.
A new column is added to the
scorestable:source. Its purpose is to track if the flag was submitted using the REST API or using MCP.The
askgod admin list-scoresaudaskgod historycommands were changed to display the source of each flag.Note: This PR was mainly vibecoded using Claude Code, but I reviewed all of it. However, I'm not a golang expert so a thorough review would be appreciated.