33 lines
803 B
C
33 lines
803 B
C
/*
|
|
* agent_mcp.h — MCP (Model Context Protocol) server endpoint
|
|
*
|
|
* Implements the MCP Streamable HTTP transport on top of our existing
|
|
* SoupServer. Exposes browser tools as MCP tools for AI assistants
|
|
* (Roo Code, Claude Code, Cursor, etc.).
|
|
*
|
|
* The endpoint is at http://localhost:PORT/mcp and accepts JSON-RPC
|
|
* POST requests. It uses the same agent_tools_dispatch() as the
|
|
* WebSocket endpoint — same code path, same tools.
|
|
*/
|
|
|
|
#ifndef AGENT_MCP_H
|
|
#define AGENT_MCP_H
|
|
|
|
#include <libsoup/soup.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
* Register the MCP handler at /mcp on the given SoupServer.
|
|
* Call this after soup_server_add_websocket_handler() in agent_server_start().
|
|
*/
|
|
void agent_mcp_register(SoupServer *server);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* AGENT_MCP_H */
|