
Web Algebra
io.github.AtomGraph由 GitHub 帳號 AtomGraph 發布v2.0.4更新於 Oct 29, 2026
Composable Linked Data and SPARQL operations, and LinkedDataHub content tools
概覽
可組合的 RDF 與 SPARQL 操作伺服器,讓助理讀取、查詢與寫入鏈結資料,並管理 LinkedDataHub 內容。
- 可以做什麼
- 以 GET、PATCH、POST、PUT 讀寫鏈結資料資源
- 執行 SPARQL 查詢(SELECT、CONSTRUCT、DESCRIBE),支援值替換與查詢產生
- 擷取類別、資料型別屬性、物件屬性與本體等結構描述資訊
- 進行實體對齊,並建構與操作 URI 及字串
- 以變數、迴圈、篩選等控制流程組合操作,當成單一 JSON 計畫執行
- 建立與管理 LinkedDataHub 的容器、項目、檔案、圖表、檢視與區塊
- 適用情境
- 適合需要處理 RDF 鏈結資料或 SPARQL 端點的情境,也適合建立與填充 LinkedDataHub 內容;當多步驟工作流程需要編譯成單一 JSON 計畫並原子執行時特別有用。
- 執行需求
- 以 Python 套件形式透過 uvx 在本機執行(需要 uv)。選用環境變數:CERT_PEM_PATH 與 CERT_PASSWORD 用於對 LinkedDataHub 發出驗證請求,OPENAI_API_KEY 供 SPARQLString 工具使用。需要能連線到目標鏈結資料端點或執行中的 LinkedDataHub 實例。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Web Algebra,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Web-Algebra
[Web-Algebra - Listed on Claude AI Directory]
A composable RDF operations system that translates natural language instructions into JSON-formatted domain-specific language operations for loading, querying, and writing RDF Linked Data.
Overview
This system implements generic operations for RDF Linked Data and SPARQL management, as well as some LinkedDataHub-specific operations. Operations can be consumed in two ways:
- Executable JSON format: Operations are composed into JSON structures and executed by the provided execution engine
- Model Context Protocol (MCP): Operations are exposed as tools for AI agents to use interactively
Instead of agents executing semantic workflows step-by-step through individual MCP tool calls, Web-Algebra enables agents to compile entire workflows into optimized JSON "bytecode" that executes atomically - enabling complex multi-operation compositions.
Demo
[Web-Algebra in action: an AI agent builds Linked Data pages over MCP]
See WebAlgebra in action - translating natural language into RDF operations.
Architecture
The system is built around the Operation abstract base class that provides:
- Registry System: Auto-discovery of operations from
src/web_algebra/operations/ - JSON DSL: Operations use
@opkey withargsfor parameters, supporting nested operation calls - RDFLib Type System: Uses
URIRef,Literal,Graph, andResulttypes internally for proper RDF handling - Execution Engine: Both standalone execution and MCP server integration
- Context System: ForEach operations set row context for inner operations to access via
Value - URI Resolution: Proper semantic URI construction with
ResolveURIoperation
Key Components
- System Prompt: Complete operation definitions and JSON format specification
- Formal Semantics: Complete type system and operation catalog
- Operation Interface: Base class and JSON interpreter
- Operation Implementations: Directory containing all available operations
- Examples: Real-world plans over live Linked Data, each with its result and checks
Operations
The operations cover read-write Linked Data, SPARQL queries, URI manipulation, and LinkedDataHub-specific resource creation. Non-exhaustive list:
- Linked Data
GETPATCHPOSTPUT
- SPARQL
CONSTRUCTDESCRIBESELECTSubstituteValuesSPARQLString
- Schema
ExtractClassesExtractDatatypePropertiesExtractObjectPropertiesExtractOntology
- Reconciliation
Reconcile
- URI & String Operations
ResolveURIEncodeForURIConcatReplaceStrStrUUIDURI
- Date/Time
Now
- Control Flow & Variables
ValueVariableForEachIterateFilterBindingsCurrentPositionLastMerge
- LinkedDataHub-specific
ldh-CreateContainerldh-CreateItemldh-Listldh-AddFileldh-AddGenericServiceldh-AddResultSetChartldh-AddSelectldh-AddConstructldh-AddViewldh-AddObjectBlockldh-AddXHTMLBlockldh-RemoveBlockldh-GeneratePortalldh-GenerateClassContainersldh-GenerateOntologyViews
Usage
Pre-requisites
Standalone
Natural language instruction
Then enter instruction, for example:
Select random 10 UK cities from DBpedia
See the instructions of the examples.
Currently requires OpenAI API access. OPENAI_API_KEY env value has to be set.
Execute JSON
See the examples: each has the instruction it answers, its plan, the result of a run, and checks.
With LinkedDataHub
- Run LinkedDataHub v6
- Give
web-algebrayour LDH's owner certificate and its password in theCERT_PEM_PATHandCERT_PASSWORDenvironment variables (or the--cert_pem_pathand--cert_passwordoptions, which override them). For example:
Here and throughout this guide, the client certificate and its password are only required for authentication with LinkedDataHub. You don't need them if you're not using LinkedDataHub with Web Algebra.
As MCP server
Install
Requires uv. Add this to your MCP client configuration (e.g. claude_desktop_config.json):
or with Claude Code:
uvx web-algebra mcp runs the same server.
Environment variables:
stdio transport
Streamable HTTP transport
with CERT_PEM_PATH and CERT_PASSWORD set, as above, for LinkedDataHub.
MCP Inspector config
You can the inspector like this:
and then open on the URL printed in its console output, for example:
The MCP_PROXY_AUTH_TOKEN is required. If the link does not appear, you need to copy the session token from the console and paste it into inspector's Proxy Session Token config.
Web Algebra's settings:
- Transport Type
- Streamable HTTP
- URL
- http://127.0.0.1:8000/mcp
Claude Desktop tool config from a local checkout
To run the MCP server from a local checkout instead of the published package, add a Web Algebra entry (that uses stdio transport) to the mcpServer configuration your claude_desktop_config.json file:
Leave the command as it is. Those uv run --with arguments are important, otherwise 3rd party packages cannot be found.
On my Mac, the path to uv has to be absolute, otherwise it doesn't work in Claude Desktop 🤷♂️.
CERT_PEM_PATH and CERT_PASSWORD env values are optional.
來源:README.md,提交 e3d5331
工具
0版本歷史
2- v2.0.4最新Oct 29, 2026
- v2.0.1Oct 21, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分