<https://docs.linkeddatahub.com/get-started/agents/>
        a       <https://w3id.org/atomgraph/linkeddatahub/document-hierarchy#Item>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>
                <https://docs.linkeddatahub.com/get-started/agents/#content>;
        <http://purl.org/dc/terms/created>
                "2026-10-25T17:34:18.974Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
        <http://purl.org/dc/terms/creator>
                <https://admin.linkeddatahub.com/acl/agents/01fe43e2-f80e-4312-b37e-86063a80e4f9/#this>;
        <http://purl.org/dc/terms/description>
                "Give an AI agent such as Claude Code or Cursor access to a LinkedDataHub instance, with the ldh Claude Code plugin or over MCP with Web-Algebra";
        <http://purl.org/dc/terms/modified>
                "2026-10-27T12:16:47.034Z"^^<http://www.w3.org/2001/XMLSchema#dateTime>;
        <http://purl.org/dc/terms/title>
                "Connect an agent";
        <http://rdfs.org/sioc/ns#has_container>
                <https://docs.linkeddatahub.com/get-started/>;
        <http://www.w3.org/ns/auth/acl#owner>
                <https://admin.linkeddatahub.com/acl/agents/01fe43e2-f80e-4312-b37e-86063a80e4f9/#this> .

<https://docs.linkeddatahub.com/get-started/agents/#content>
        a       <https://w3id.org/atomgraph/linkeddatahub#XHTML>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#value>
                "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <p class=\"ldh-body-lg\">Give an AI agent such as Claude Code or Cursor access to a LinkedDataHub instance, with the ldh Claude Code plugin or over MCP with Web-Algebra</p>\n    <p>Agents use the same HTTP API as the browser and the <a href=\"../../reference/command-line-interface/\">CLI</a>, and act as a WebID: an agent can read and\n        write only what its WebID is authorized to. There are two ways to connect one. The <a href=\"#claude-code-plugin\">Claude Code plugin</a> gives Claude Code\n        skills for building on LinkedDataHub with the <samp>ldh</samp> CLI. <a href=\"#mcp\">Web-Algebra</a> exposes LinkedDataHub operations to any\n        <a href=\"https://modelcontextprotocol.io/\" target=\"_blank\">Model Context Protocol</a> (MCP) client as tools: creating containers and items, adding views,\n        queries and charts, reading and writing RDF, and running SPARQL. Either way, an agent can build a working application in a dataspace:\n        its classes, containers, views and charts are documents like any other.</p>\n    <p>The conventions agents should follow when writing to LinkedDataHub are in\n        <a href=\"https://github.com/AtomGraph/LinkedDataHub/blob/master/AGENTS.md\" target=\"_blank\">AGENTS.md</a>. To ask questions about the data in a document\n        from the browser instead, use the <a href=\"../../user-guide/use-the-assistant/\">assistant</a>.</p>\n    <div>\n        <h2 id=\"claude-code-plugin\">Claude Code plugin</h2>\n        <p>The <a href=\"https://github.com/AtomGraph/LinkedDataHub/tree/master/plugins/ldh\" target=\"_blank\"><samp>ldh</samp> plugin</a> ships with LinkedDataHub.\n            Its marketplace is the LinkedDataHub repository, so Claude Code is told about it once and then installs the plugin from it. In Claude Code:</p>\n        <pre>/plugin marketplace add AtomGraph/LinkedDataHub\n/plugin install ldh@linkeddatahub</pre>\n        <p>The skills drive the <samp>ldh</samp> CLI, so they need a LinkedDataHub instance, the owner's WebID certificate and the CLI on the <samp>PATH</samp>\n            (see <a href=\"../../reference/command-line-interface/#install\">installing the CLI</a>). Claude loads a skill by itself when a request matches what it\n            covers. To call one explicitly, type <samp>/ldh:</samp> followed by its name.</p>\n        <table>\n            <caption class=\"ac-vh\">Skills of the ldh plugin</caption>\n            <thead>\n                <tr>\n                    <th scope=\"col\">Skill</th>\n                    <th scope=\"col\">Covers</th>\n                </tr>\n            </thead>\n            <tbody>\n                <tr>\n                    <th scope=\"row\"><samp>ldh:dataspace</samp></th>\n                    <td>Provisioning a new dataspace on a self-hosted instance: the configuration files, the restart, and checking that it is up</td>\n                </tr>\n                <tr>\n                    <th scope=\"row\"><samp>ldh:dataset</samp></th>\n                    <td>The namespace ontology and its install, CSV and RDF imports, federation with remote SPARQL endpoints, and building a large dataset standalone and bulk-loading it</td>\n                </tr>\n                <tr>\n                    <th scope=\"row\"><samp>ldh:app</samp></th>\n                    <td>Documents, blocks, views and charts, and an app kept as a directory and installed with <samp>ldh push</samp></td>\n                </tr>\n                <tr>\n                    <th scope=\"row\"><samp>ldh:package</samp></th>\n                    <td>A reusable <a href=\"../../reference/administration/packages/\">package</a>: an ontology and an XSLT stylesheet, published to a registry and imported with <samp>ldh packages add</samp></td>\n                </tr>\n            </tbody>\n        </table>\n        <p>A request can span several skills, and Claude uses them in turn:</p>\n        <blockquote><p>Here are products.csv and categories.csv. Model them with schema.org, import them into the inventory dataspace, and make each category's page list its products.</p></blockquote>\n    </div>\n    <div>\n        <h2 id=\"mcp\">Web-Algebra over MCP</h2>\n        <p><a href=\"https://github.com/AtomGraph/Web-Algebra\" target=\"_blank\">Web-Algebra</a> expresses LinkedDataHub operations, SPARQL queries and Linked Data\n            reads as plans that run as one unit, and its MCP server offers them as tools. Any MCP client can use it.</p>\n    <div>\n        <h3 id=\"prerequisites\">Prerequisites</h3>\n        <ul>\n            <li>A running LinkedDataHub instance. The examples below assume the default <a href=\"../setup/\">local setup</a> at <samp>https://localhost:4443/</samp>.</li>\n            <li>The WebID certificate the agent will act as. For your own instance that is the owner certificate, <samp>ssl/owner/cert.pem</samp>, with the password from\n                <samp>secrets/owner_cert_password.txt</samp>. The agent can do whatever that WebID is authorized to do.</li>\n            <li><a href=\"https://docs.astral.sh/uv/getting-started/installation/\" target=\"_blank\">uv</a>, which runs Web-Algebra without a separate install step.</li>\n        </ul>\n    </div>\n    <div>\n        <h3 id=\"claude-code\">Claude Code</h3>\n        <p>Register Web-Algebra as an MCP server, run from the LinkedDataHub directory:</p>\n        <pre>claude mcp add web-algebra \\\n  --env CERT_PEM_PATH=\"$PWD/ssl/owner/cert.pem\" \\\n  --env CERT_PASSWORD=\"$(cat secrets/owner_cert_password.txt)\" \\\n  -- uv run --with web-algebra python -m web_algebra</pre>\n        <p>Start <samp>claude</samp> and check that <samp>/mcp</samp> lists <samp>web-algebra</samp> as connected.</p>\n    </div>\n    <div>\n        <h3 id=\"cursor-and-claude-desktop\">Cursor and Claude Desktop</h3>\n        <p>Both read an <samp>mcpServers</samp> entry: <samp>~/.cursor/mcp.json</samp> for Cursor, <samp>claude_desktop_config.json</samp> for Claude Desktop.\n            Use absolute paths and the literal password, since these files are not run by a shell.</p>\n        <pre>{\n  \"mcpServers\": {\n    \"web-algebra\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"--with\", \"web-algebra\", \"python\", \"-m\", \"web_algebra\"],\n      \"env\": {\n        \"CERT_PEM_PATH\": \"/path/to/LinkedDataHub/ssl/owner/cert.pem\",\n        \"CERT_PASSWORD\": \"your-owner-cert-password\"\n      }\n    }\n  }\n}</pre>\n        <p>If the client cannot find <samp>uv</samp>, replace <samp>\"uv\"</samp> with its absolute path, as printed by <samp>which uv</samp>.</p>\n    </div>\n    <div>\n        <h3 id=\"http-transport\">Streamable HTTP transport</h3>\n        <p>Clients that connect to an MCP URL instead of launching a process can use Web-Algebra's HTTP server:</p>\n        <pre>CERT_PEM_PATH=\"$PWD/ssl/owner/cert.pem\" \\\nCERT_PASSWORD=\"$(cat secrets/owner_cert_password.txt)\" \\\nuv run --with web-algebra uvicorn web_algebra.server:app</pre>\n        <p>The MCP URL is <samp>http://127.0.0.1:8000/mcp</samp>. For Claude Code:\n            <code>claude mcp add --transport http web-algebra http://127.0.0.1:8000/mcp</code>.</p>\n        <div class=\"ac-alert va-warning\" role=\"status\">\n            <span class=\"ac-alert-ic\"><span aria-hidden=\"true\" class=\"msi outline\">warning</span></span>\n            <div class=\"ac-alert-body\">\n                <p class=\"ac-alert-text\">The HTTP server does not authenticate its callers, and it holds your WebID certificate. Anyone who can reach the port acts as you.\n                    Keep it bound to <samp>127.0.0.1</samp>, which is the default, and do not expose it on a network.</p>\n            </div>\n        </div>\n    </div>\n    </div>\n    <div>\n        <h2 id=\"try-it\">Try it</h2>\n        <p>Ask the agent for something small that it has to declare rather than code. With the <a href=\"https://github.com/AtomGraph/LinkedDataHub-Apps/tree/master/demo/northwind-traders\" target=\"_blank\">Northwind Traders</a> demo installed, for example:</p>\n        <blockquote><p>Create a container for new offers in my dataspace, add a 20% discount offer for three Beverages products, and add a chart of the offer prices.</p></blockquote>\n        <p>Then open <samp>https://localhost:4443/</samp> in the browser. The container, the items and the chart are there, and you can keep editing them by hand —\n            the agent and you work on the same documents.</p>\n    </div>\n</div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
