{"_id":"@comunica/mcp-sparql-solid","_rev":"2-c536b1583926a81bba88d28dc07105eb","name":"@comunica/mcp-sparql-solid","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@comunica/mcp-sparql-solid","version":"1.0.0","keywords":["mcp","agentic","comunica","sparql","solid","authentication","engine","query","update","sparql engine","sparql query","sparql update","sparql 1.1","sparql 1.2"],"license":"MIT","_id":"@comunica/mcp-sparql-solid@1.0.0","maintainers":[{"name":"joachimvh","email":"joachimvh@gmail.com"},{"name":"rubensworks","email":"rubensworks@gmail.com"},{"name":"rubenverborgh","email":"ruben@verborgh.org"},{"name":"dexagod","email":"dedecker.ruben@gmail.com"},{"name":"jeswr","email":"jmwright.045@gmail.com"}],"homepage":"https://comunica.dev/","bugs":{"url":"https://github.com/comunica/comunica-feature-mcp/issues"},"bin":{"comunica-mcp-sparql-solid":"bin/mcp.js"},"dist":{"shasum":"4e750dd86b825f003e16c7126b66d84128c67829","tarball":"https://registry.npmjs.org/@comunica/mcp-sparql-solid/-/mcp-sparql-solid-1.0.0.tgz","fileCount":12,"integrity":"sha512-q3xtHpI3ce4hkU6lHbw6RTl3XnnCtVosINd285iGguqnXw2WLHns3SjPAfDspTnJptl2BixuHP5eIRtQhWj0Bg==","signatures":[{"sig":"MEUCIG2OcN9L+jL3yYak9uS90GnnG6UWxL5yyd8fMigcH+V+AiEA/IhVBxg27bJ/Qraa6FflRZZPAVkpqIQrvGqqUg0iCWo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25577},"main":"lib/index.js","funding":{"url":"https://opencollective.com/comunica-association","type":"opencollective"},"gitHead":"8a35a73d61cf1066bb1181761884d84d3b932932","scripts":{"build":"yarn run build:ts","build:ts":"node \"../../node_modules/typescript/bin/tsc\""},"typings":"lib/index","_npmUser":{"name":"rubensworks","email":"rubensworks@gmail.com"},"repository":{"url":"git+https://github.com/comunica/comunica-feature-mcp.git","type":"git","directory":"engines/mcp-sparql-solid"},"_npmVersion":"lerna/9.0.3/node@v22.14.0+arm64 (darwin)","description":"An MCP server for executing SPARQL queries over Solid data pods with authentication support","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"yargs":"^17.7.2","@types/yargs":"^17.0.0","@comunica/utils-mcp":"^1.0.0","solid-node-interactive-auth":"^1.0.2","@comunica/query-sparql-solid":"^5.0.1","@rubensworks/solid-client-authn-isomorphic":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-sparql-solid_1.0.0_1770818639528_0.8088343786679686","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@comunica/mcp-sparql-solid","version":"1.1.0","description":"An MCP server for executing SPARQL queries over Solid data pods with authentication support","license":"MIT","funding":{"type":"opencollective","url":"https://opencollective.com/comunica-association"},"homepage":"https://comunica.dev/","repository":{"type":"git","url":"git+https://github.com/comunica/comunica-feature-mcp.git","directory":"engines/mcp-sparql-solid"},"bugs":{"url":"https://github.com/comunica/comunica-feature-mcp/issues"},"keywords":["mcp","agentic","comunica","sparql","solid","authentication","engine","query","update","sparql engine","sparql query","sparql update","sparql 1.1","sparql 1.2"],"sideEffects":false,"main":"lib/index.js","typings":"lib/index","publishConfig":{"access":"public"},"bin":{"comunica-mcp-sparql-solid":"bin/mcp.js"},"scripts":{"build":"yarn run build:ts","build:ts":"node \"../../node_modules/typescript/bin/tsc\""},"dependencies":{"@comunica/query-sparql-solid":"^5.0.1","@comunica/utils-mcp":"^1.1.0","@rubensworks/solid-client-authn-isomorphic":"^2.0.0","@types/yargs":"^17.0.0","solid-node-interactive-auth":"^1.0.2","yargs":"^17.7.2"},"gitHead":"4d3c6e5233ec89ceeb45bd2a478652e7f74d5cd2","_id":"@comunica/mcp-sparql-solid@1.1.0","_nodeVersion":"22.23.2","_npmVersion":"lerna/9.0.7/node@v22.23.2+arm64 (darwin)","dist":{"integrity":"sha512-eb+ITx3R11J4faIwqk6WUsAeRcDoT29iQP06Og0s6rR733O1cYGAhvDqTIf2sY+m7SUSrYKyS5dojwfof+nasQ==","shasum":"f5613e6c93da8327333629577e7df58d78764517","tarball":"https://registry.npmjs.org/@comunica/mcp-sparql-solid/-/mcp-sparql-solid-1.1.0.tgz","fileCount":12,"unpackedSize":27791,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIARbLKrHZ0LPzFJDFHdlUtMjXFTVIk5mB+kKGytt79g3AiAamtLzFT6TI5VxomBZRLQbEzYHVRHWHBLUv/sS7hDEgQ=="}]},"_npmUser":{"name":"rubensworks","email":"rubensworks@gmail.com"},"directories":{},"maintainers":[{"name":"joachimvh","email":"joachimvh@gmail.com"},{"name":"rubensworks","email":"rubensworks@gmail.com"},{"name":"rubenverborgh","email":"ruben@verborgh.org"},{"name":"dexagod","email":"dedecker.ruben@gmail.com"},{"name":"jeswr","email":"jmwright.045@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-sparql-solid_1.1.0_1788267466546_0.6496282194499079"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-11T14:03:59.334Z","modified":"2026-09-01T12:57:47.555Z","1.0.0":"2026-02-11T14:03:59.680Z","1.1.0":"2026-09-01T12:57:46.680Z"},"bugs":{"url":"https://github.com/comunica/comunica-feature-mcp/issues"},"license":"MIT","homepage":"https://comunica.dev/","keywords":["mcp","agentic","comunica","sparql","solid","authentication","engine","query","update","sparql engine","sparql query","sparql update","sparql 1.1","sparql 1.2"],"repository":{"type":"git","url":"git+https://github.com/comunica/comunica-feature-mcp.git","directory":"engines/mcp-sparql-solid"},"description":"An MCP server for executing SPARQL queries over Solid data pods with authentication support","maintainers":[{"name":"joachimvh","email":"joachimvh@gmail.com"},{"name":"rubensworks","email":"rubensworks@gmail.com"},{"name":"rubenverborgh","email":"ruben@verborgh.org"},{"name":"dexagod","email":"dedecker.ruben@gmail.com"},{"name":"jeswr","email":"jmwright.045@gmail.com"}],"readme":"# Comunica MCP SPARQL Solid\n\n[![npm version](https://badge.fury.io/js/%40comunica%2Fmcp-sparql-solid.svg)](https://www.npmjs.com/package/@comunica/mcp-sparql-solid)\n\nComunica MCP SPARQL Solid is an [MCP server](https://modelcontextprotocol.io/) for allowing AI agents to execute SPARQL queries over [Solid](https://solidproject.org/) data pods with authentication support.\n\nSolid (Social Linked Data) is a specification for decentralized data storage and personal data management. This MCP server enables authenticated access to private Solid pods.\n\nIt's main distinguishing features are the following:\n\n* Improves the accuracy of your AI agent's answers by leveraging the power of SPARQL and Knowledge Graphs.\n* Execute [SPARQL 1.2](https://www.w3.org/TR/sparql12-query/) queries over Solid data pods.\n* Interactive authentication with Solid identity providers.\n* Access both public and private Solid resources.\n* Query over federated Solid pods with single sign-on.\n\n**[Learn more about Comunica on our website](https://comunica.dev/).**\n\n_Internally, this is a [Comunica module](https://comunica.dev/) that is configured with modules to execute SPARQL queries over Solid pods through MCP._\n\n## Supported by\n\nComunica is a community-driven project, sustained by the [Comunica Association](https://comunica.dev/association/).\nIf you are using Comunica, [becoming a sponsor or member](https://opencollective.com/comunica-association) is a way to make Comunica sustainable in the long-term.\n\nOur top sponsors are shown below!\n\n<a href=\"https://opencollective.com/comunica-association/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/comunica-association/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/comunica-association/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/comunica-association/sponsor/1/avatar.svg\"></a>\n<a href=\"https://opencollective.com/comunica-association/sponsor/2/website\" target=\"_blank\"><img src=\"https://opencollective.com/comunica-association/sponsor/2/avatar.svg\"></a>\n<a href=\"https://opencollective.com/comunica-association/sponsor/3/website\" target=\"_blank\"><img src=\"https://opencollective.com/comunica-association/sponsor/3/avatar.svg\"></a>\n\n## Usage examples\n\nAfter connecting this MCP server to your AI agent (see some examples on how to do this below),\nyour agent can SPARQL query Solid data pods, including private resources.\n\nFor example, use it to ask:\n\n> Use Comunica SPARQL Solid to query my personal Solid pod and find all my contacts.\n\n### Prompt suggestions\n\nIf you want your agent to always use SPARQL for higher accuracy in answers, you can tell it the following:\n\n> When looking up data from Solid pods, always prefer using SPARQL queries as this is more precise.\n> Solid pods may contain private data that requires authentication, so make sure to use the authenticated query engine.\n> Since SPARQL queries can take a while to execute, start producing an approximate answer yourself and show it to me if the SPARQL query takes more than 1 second, but then make the answer more concrete based on the SPARQL query once it finalized, as it will be more accurate.\n\n## Installation\n\nComunica requires [Node.JS](http://nodejs.org/) 14.0 or higher and is tested on OSX and Linux.\n\nThe easiest way to install the client is by installing it from NPM as follows:\n\n```bash\n$ [sudo] npm install -g @comunica/mcp-sparql-solid\n```\n\nAlternatively, you can install from the latest GitHub sources.\nFor this, please refer to the README of the [Comunica monorepo](https://github.com/comunica/comunica).\nIf you do so, the following examples require replacing `comunica-mcp-sparql-solid` with `node engines/mcp-sparql-solid/bin/mcp.js`.\n\n## Important: HTTP Mode Only\n\n**Note:** Due to the interactive nature of Solid authentication, this MCP server only supports HTTP mode. Stdio mode is not available as it cannot handle the interactive login flow required for Solid authentication.\n\n## Connect this MCP server to your agent\n\nBelow, a non-exhaustive list of examples is given to connect this MCP server to your agent.\n\n### Claude Desktop\n\nAfter installing, you need to run the MCP server in HTTP mode:\n\n#### HTTP Mode with Authentication\n\nFirst, start the server manually:\n\n```bash\n$ comunica-mcp-sparql-solid --mode http --port 3123\n```\n\nThis will prompt you to authenticate with your Solid identity provider. Follow the interactive login instructions in your terminal.\n\nThen, add the following entry to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"comunica-sparql-solid\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"mcp-remote\",\n        \"http://localhost:3123/mcp\",\n        \"--allow-http\"\n      ]\n    }\n  }\n}\n```\n\nThen, you can ask Claude something like the following:\n\n> Using Comunica SPARQL Solid, can you show me information about myself based on my profile?\n\n#### Custom Identity Provider\n\nYou can specify a custom Solid identity provider using the `--idp` flag:\n\n```bash\n$ comunica-mcp-sparql-solid --mode http --port 3123 --idp https://login.inrupt.com/\n```\n\n#### Disable Authentication\n\nIf you only need to query public Solid resources, you can disable authentication:\n\n```bash\n$ comunica-mcp-sparql-solid --mode http --port 3123 --idp void\n```\n\n#### Default Sources\n\nYou can optionally configure default Solid pod URLs when starting the MCP server:\n\n```bash\n$ comunica-mcp-sparql-solid --mode http --port 3123 https://example.solidcommunity.net/profile/card\n```\n\n### Claude Code\n\n#### HTTP Mode\n\nRun the MCP server in HTTP mode, which requires starting the server manually first:\n\n```bash\n$ comunica-mcp-sparql-solid --mode http --port 3123\n```\n\nThen add it to Claude Code:\n\n```bash\nclaude mcp add --transport http sparql-solid http://localhost:3123/mcp\n```\n\nLearn more in the [Claude Code MCP docs](https://code.claude.com/docs/en/mcp).\n\n### ChatGPT\n\nAt the time of writing, ChatGPT only supports HTTP-based MCP servers.\nSo you'll need to run this tool under HTTP mode and expose it to the public Web,\npossibly combined with a reverse proxy and/or OAuth layer.\n\n```bash\n$ comunica-mcp-sparql-solid --mode http --port 3123\n```\n\n## Query timeouts\n\nSPARQL queries can take arbitrarily long, for example when they are executed over large or slow sources.\nTo make sure that an agent never waits indefinitely, queries are aborted after `--timeout` milliseconds\n(60 seconds by default, `--timeout 0` disables this), after which the agent receives an error\nthat invites it to refine its query.\n\n```bash\n$ comunica-mcp-sparql-solid --mode http --port 3123 --timeout 300000\n```\n\nNote that Comunica offers no way to abort a query that is already running,\nso a timed out query keeps consuming CPU and memory until it terminates by itself.\nContrary to the other Comunica MCP servers, this server does not execute queries inside replaceable worker\nprocesses, as every new worker would require the user to interactively log in again.\n\n## Available Tools\n\nThis MCP server provides the following tools:\n\n### query_sparql\n\nExecute SPARQL queries over one or more Solid pods or SPARQL endpoints, which also includes update queries.\n\n**Parameters:**\n- `query` (required): SPARQL query string\n- `sources` (required, unless default sources are configured): List of Solid pod URLs or SPARQL endpoint URLs\n- `queryFormatLanguage` (optional): Query language (e.g., `sparql`, `graphql`). Allows you to specify alternative query languages supported by Comunica\n- `queryFormatVersion` (optional): Query language version (e.g., `1.0`, `1.1`, `1.2`). Specifies the version of the query language to use\n- `baseIRI` (optional): Base IRI for resolving relative IRIs in the query\n- `httpProxy` (optional): HTTP proxy URL (e.g., `http://proxy.example.com:8080`)\n- `httpAuth` (optional): HTTP basic authentication in the format `username:password`\n- `httpTimeout` (optional): HTTP request timeout in milliseconds\n- `httpRetryCount` (optional): Number of HTTP request retries on failure\n\n**Note:** When the MCP server is started with default sources, the `sources` parameter is not available, and all queries automatically use the configured default sources.\n\n### query_sparql_rdf\n\nExecute SPARQL queries over a serialized RDF dataset provided as a string (useful for querying Turtle, N-Triples, or other RDF formats directly).\n\n**Parameters:**\n- `query` (required): SPARQL query string\n- `value` (required): Serialized RDF dataset as a string\n- `mediaType` (required): Media type of the serialized RDF dataset (e.g., `text/turtle`, `application/n-triples`, `application/ld+json`)\n- `fileBaseIRI` (optional): Base IRI for resolving relative IRIs in the RDF dataset\n- `baseIRI` (optional): Base IRI for resolving relative IRIs in the query\n- `queryFormatLanguage` (optional): Query language (e.g., `sparql`, `graphql`). Allows you to specify alternative query languages supported by Comunica\n- `queryFormatVersion` (optional): Query language version (e.g., `1.0`, `1.1`, `1.2`). Specifies the version of the query language to use\n\n## Authentication Flow\n\nWhen you start the MCP server with authentication enabled (default), you will be prompted to:\n\n1. Visit a URL in your web browser\n2. Log in to your Solid identity provider\n3. Authorize the application\n4. The server will automatically receive the authentication token\n\nOnce authenticated, all queries will be executed with your Solid credentials, allowing access to private resources.\n\n## Learn more\n\nThis README just shows the tip of the iceberg!\nLearn more about Comunica's functionalities in the following guides:\n\n* _[*Full documentation*](https://comunica.dev/docs/)_\n* _[*Solid documentation*](https://solidproject.org/)_\n","readmeFilename":"README.md"}