Did you know ... Search Documentation:
Pack mcp -- prolog/mcp/servers/swipl_kernel.pl
PublicShow source

Loading this module registers MCP tools for exploring the SWI-Prolog C sources. Useful for an LLM coding assistant working on the kernel.

Tools registered:

  • c_grep -- regex search in `*.c and *.h` under the kernel tree
  • c_function_defs -- function definitions in a C source file

The tree to search is controlled by the setting

mcp_swipl_kernel:c_source_root

which defaults to /home/jan/src/swipl-devel/src . Override with e.g.

?- set_setting(mcp_swipl_kernel:c_source_root,
               '/path/to/swipl-devel/src').