Artsdata

ca.artsdata由 artsdata.ca 发布官方发布者v1.0.0更新于 Oct 24, 2026

Search Artsdata for authoritative data on Canadian events, artists, organizations, and places.

已验证Streamable HTTP可网页运行数据库知识与记忆

概览

AI 生成的概览

面向 Artsdata 知识图谱的远程 MCP 服务器,让助手检索加拿大活动、艺术家、机构和地点,并执行只读 SPARQL 查询。

可以做什么
按名称检索实体,可按实体类型和概念方案过滤,返回带链接的标签和可在回答中引用的 Artsdata ID。按 URI 获取实体详情,包括该实体来源的数据集。按地点、艺术家、机构、活动类型概念和语言检索活动。读取图谱数据模型:实体类、属性、基数、值类型和受控词表。执行只读 SPARQL SELECT 或 ASK 查询,返回标准 JSON 结果,并带行数上限和截断标记。
适用场景
适合需要加拿大文化艺术领域权威且有出处数据的场景:活动列表、场馆与机构查询、艺术家识别,或对关联数据图谱做结构化查询。更适合研究与数据核对类任务,而非通用网页搜索。
运行要求
远程 streamable HTTP 端点,无需安装包或本地运行时。未声明需要身份验证、API 密钥或请求头。助手需能访问 Artsdata 的网络端点。若自行部署 Rails 应用,需要 Ruby、Rails 和 Bundler,以及文档中列出的对账、模式、API 和 SPARQL 端点环境变量。
安装前请注意
查询为只读,但服务器会上报使用情况:调用会发送至 Google Analytics 4,包含所用工具、耗时和调用方 User-Agent,SPARQL 调用还包含 WHERE 子句。每次调用还会写入请求日志,记录完整参数,如搜索词、实体 URI 和完整 SPARQL 查询。应假定所查询的内容可能被记录或分析。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Artsdata,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/ca.artsdata%2Fmcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "artsdata": {
      "type": "http",
      "url": "https://mcp.artsdata.ca/mcp"
    }
  }
}

README

Artsdata MCP Server (Rails)

Prerequisites

  • Ruby 4.0.6
  • Rails 8.1
  • Bundler

Setup

bash
bundle install

Endpoints

  • POST /mcp: MCP Streamable HTTP endpoint (tools and resources are documented in docs/mcp-server.md)
  • GET /up: health check
  • GET /llms.txt: machine-readable guide for agents

Calls to /mcp are reported to Google Analytics 4.

MCP resources

  • artsdata://dumps/core-minus-provenance/latest (artsdata_dump): manifest for the latest Artsdata core-minus-provenance dump — the core graph with provenance and RDF-star annotations removed, published monthly as a gzipped Turtle file.

    resources/read asks the Artsdata Databus for the newest version of the artifact (GET /databus/artifact/latest?artifact=<ARTIFACT_URI>) and returns a small JSON document with the download URL, version, format and compression — never the dump contents. Going through the Databus means MCP clients need to know nothing about where the file is actually stored. Clients download the file from downloadUrl and compare version across reads to detect when a new dump lands.

Directory structure

text
.github/  workflows/    deploy-to-heroku.yml  # Workflow deploying to Heroku    run-unit-tests.yml    # Reusable workflow running Minitest    unit-test-on-pull-request.yml # Workflow running unit tests on pull requestsapp/  resource/     # MCP resources  schema/       # JSON schemas of the tools' input and output  services/     # Clients for the reconciliation service, SPARQL endpoint and Databus  tool/         # MCP toolsconfig/  initializers/mcp_server.rb  # MCP server: registered tools, resources and transport  initializers/mcp_analytics.rb # Google Analytics 4 reporting configuration  routes.rblib/  mcp_analytics/  # Rack middleware reporting MCP usage to Google Analytics 4test/

Configuration

  • ARTSDATA_RECONCILIATION_ENDPOINT: reconciliation service URL used by the search_entities, get_entity and search_events tools.
  • ARTSDATA_SCHEMA_URL (optional): Turtle file compiled by the get_schema tool (default https://docs.artsdata.ca/artsdata-schema.ttl).
  • ARTSDATA_SCHEMA_CACHE_TTL_SECONDS (optional): how long the compiled schema is cached in process (default 86400).
  • ARTSDATA_CORS_ORIGINS (optional): comma-separated CORS origins (default *).
  • ARTSDATA_API_ENDPOINT (optional): base URL of the Artsdata API, used to query the Databus for the latest data dump (default https://api.artsdata.ca).
  • ARTSDATA_SPARQL_ENDPOINT (optional): SPARQL endpoint queried by the sparql_query tool (default https://query.artsdata.ca/query).
  • ARTSDATA_SPARQL_TIMEOUT_SECONDS (optional): read timeout for a sparql_query call (default 25).
  • ARTSDATA_SPARQL_MAX_ROWS (optional): maximum rows sparql_query returns; extra rows are cut and the result is flagged truncated (default 1000).
  • Docker instance profiles are provided in:
    • env/production.env
    • env/staging.env
  • ARTSDATA_INSTANCE_TYPE (optional): PRODUCTION (default) or STAGING. The Docker entrypoint loads the matching file from env/.

Usage analytics

Calls to /mcp are reported to Google Analytics 4, including the tool used, how long the call took, and the caller's User-Agent. Reporting stays off until both variables below are set, so development and CI need no configuration.

  • GA4_MEASUREMENT_ID: the GA4 property's G-XXXXXXXXXX id. Not a secret; defaulted for production in config/environments/production.rb.
  • GA4_API_SECRET: Measurement Protocol secret. Secret — set it as a Heroku. config var, never in env/*.env, which is committed.
  • GA4_DEBUG (optional): tag events so they appear in GA4's DebugView within seconds, and log whether GA4 considers each payload valid. Events are still recorded. Useful because the normal endpoint answers 204 whether or not the payload is valid.

Reporting is on when both credentials are present and off otherwise.

Separately, every MCP call is written to stdout as one JSON line, including the complete arguments the agent sent — the full SPARQL query, search terms, entity URIs. On Heroku these lines go to heroku logs and to any drain you attach.

  • MCP_REQUEST_LOG (optional): set to false to silence the request log. It runs independently of Google Analytics and works with no GA4 credentials set.

For sparql_query calls, two extra facts are reported: sparql_form (SELECT, ASK or UNKNOWN) and sparql_where, the WHERE clause as the agent wrote it with the PREFIX block removed and whitespace collapsed. Both go to Google Analytics and to the request log; GA4 cuts the WHERE clause at its 100-character limit, the log keeps it whole.

Run the application

bash
bundle exec rails server

The API will be available at http://localhost:3000.

Docker

Build the image:

bash
docker build -t artsdata-mcp-server .

Run the server:

bash
docker run --rm -p 3000:3000 artsdata-mcp-server

Run with staging profile:

bash
docker run --rm -p 3000:3000 -e ARTSDATA_INSTANCE_TYPE=STAGING artsdata-mcp-server

Run tests in Docker:

bash
docker run --rm artsdata-mcp-server bundle exec rails test

Run tests

Run a single test file:

bash
bundle exec rails test test/tool/search_events_test.rb

Run all tests:

bash
bundle exec rails test

llms.txt maintenance

The public/llms.txt file is generated from MCP server metadata (tools, resources, descriptions, and schemas).

CI behavior:

  • Pull request CI runs bundle exec rake docs:check_llms.
  • If public/llms.txt is stale, the workflow fails.

Developer workflow:

  • Most of the time, no manual action is needed.
  • If you change MCP tools, resources, or schemas, regenerate the file with:
bash
bundle exec rake docs:generate_llms
  • Confirm it is in sync with:
bash
bundle exec rake docs:check_llms
  • Commit the updated public/llms.txt.

Deployment & CI/CD Details:

This project uses GitHub Actions for continuous integration and automated deployment to Heroku. Every push to the main branch triggers a workflow that builds and deploys the application to Heroku. The workflow is defined in .github/workflows/deploy-to-heroku.yml.

Every pull request triggers a workflow that unit tests. The workflow is defined in .github/workflows/run-unit-tests.yml.

Server Access & API Documentation

The Artsdata MCP Server is actively deployed and hosted in a live production environment.

Live Production Endpoints

来源:README.md,提交 2ed7f52

工具

5

search_entities

Tool to search for entities in the Artsdata knowledge graph by name, with optional filters on entity type and on the controlled vocabulary (skos:ConceptScheme) a concept belongs to. Each result has a markdown-link `label` like '[Name (K12-345)](https://kg.artsdata.ca/resource/K12-345)': use it verbatim when mentioning the entity.

输入参数limitquery必填typeslanguagein_scheme

get_entity

Tool to get entities details from Artsdata Knowledge Graph by entity URI. Entity URIs end in the Artsdata ID (K\d+-\d+, e.g. K12-345); cite it with the entity name. The result's `sources` lists the datasets the entity was built from: name them when you answer about the entity, linking `url` when present, else by `name`.

输入参数uri必填

search_events

Tool to search for events in the Artsdata knowledge graph by place, artist, organization, has_event_type_concept and language. Places, artists and organizations are Artsdata entity URIs; the has_event_type_concept filter takes concept URIs from the Artsdata Event Types vocabulary (adr:ArtsdataEventTypes), not schema.org classes. Resolve any name or label to its URI with search_entities first. Places must be venues; for events in a city or region, use sparql_query (see the places parameter). At least one filter is required. Entity URIs end in the Artsdata ID (K\d+-\d+, e.g. K12-345); cite it with the entity name.

输入参数limitplacesartistslanguagestartDateToorganizationsstartDateFromhas_event_type_concept

get_schema

Returns the data model of the Artsdata Knowledge Graph: its entity classes (Event, Place, Organization, Person, LivePerformanceWork...), the properties of each with required/optional, cardinality, value types, linked classes and allowed values, the controlled vocabularies, the SPARQL prefixes, and conventions for querying. Derived from the Artsdata Ontology and the Artsdata CORE graph SHACL shapes. Call this before writing a SPARQL query to run with sparql_query against https://query.artsdata.ca/query, since Artsdata's model is not general knowledge. Takes no input.

无需输入参数。

sparql_query

Runs a read-only SPARQL 1.1 SELECT or ASK query against the Artsdata Knowledge Graph (https://query.artsdata.ca/query) and returns the result as SPARQL 1.1 Query Results JSON, exactly as the endpoint returns it: head.vars and results.bindings for SELECT, boolean for ASK. Call get_schema first and build the query from the classes, properties, prefixes and conventions it returns, since Artsdata's model is not general knowledge. Declare every PREFIX you use and always add a LIMIT: at most 1000 rows are returned (the rest is cut and truncated is true; page with OFFSET), and a query gets 25 seconds. If the endpoint rejects the query, its error message is returned so you can fix the query and retry. For the details of an entity URI in the results use get_entity; to find an entity's URI from its name use search_entities. Always SELECT the entity URI next to its label so its Artsdata ID can be cited. Entity URIs end in the Artsdata ID (K\d+-\d+, e.g. K12-345); cite it with the entity name. To find who claims a property value, see the sources guidance in the get_schema conventions.

输入参数query必填

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。