Нет описания

Lukas Goldschmidt f97d81f361 Migrate transport to FastMCP and refresh docs/tests 1 месяц назад
examples a9bea23ac6 Sanitize MCP fixtures/tests and move pid to logs 1 месяц назад
.env.example bce59d5759 plugins 1 месяц назад
.gitignore a8a671f6c4 docs: document /mcp JSON-RPC minimal compatibility 1 месяц назад
DESIGN_NOTES.md a9bea23ac6 Sanitize MCP fixtures/tests and move pid to logs 1 месяц назад
PROJECT.md f97d81f361 Migrate transport to FastMCP and refresh docs/tests 1 месяц назад
README.md f97d81f361 Migrate transport to FastMCP and refresh docs/tests 1 месяц назад
killserver.sh a9bea23ac6 Sanitize MCP fixtures/tests and move pid to logs 1 месяц назад
requirements.txt f97d81f361 Migrate transport to FastMCP and refresh docs/tests 1 месяц назад
restart.sh bce59d5759 plugins 1 месяц назад
run.sh f97d81f361 Migrate transport to FastMCP and refresh docs/tests 1 месяц назад
server_fastmcp.py f97d81f361 Migrate transport to FastMCP and refresh docs/tests 1 месяц назад
test.sh f97d81f361 Migrate transport to FastMCP and refresh docs/tests 1 месяц назад
virtuoso_mcp.py f97d81f361 Migrate transport to FastMCP and refresh docs/tests 1 месяц назад

README.md

Virtuoso MCP Server

MCP server for Virtuoso Community Edition with guardrailed SPARQL tools and optional domain plugins.

Current transport

  • FastMCP (SSE) mounted at GET /mcp/sse
  • message endpoint provided by FastMCP under /mcp/messages/
  • legacy compatibility router at POST /rpc ({"tool":"...","input":{...}})
  • health/discovery at GET / and GET /health

Why this shape

  • mcporter compatibility via FastMCP transport
  • stable migration path for existing internal scripts via /rpc

Run

pip install -r requirements.txt
./run.sh

Default host/port: 0.0.0.0:8501

Core tools

  • Query/navigation: sparql_query, list_graphs, search_label, get_entities_by_type, get_predicates_for_subject, get_labels_for_subject, traverse_property
  • Ontology discovery: list_classes, list_properties, describe_class, describe_property
  • Relationship helpers: describe_subject, path_traverse, property_usage_statistics
  • Update helpers: insert_triple, batch_insert, load_examples

Domain plugin tools (garden layer)

Current garden-prefixed set is intentionally trimmed to non-redundant domain helpers:

  • garden_add_seedling
  • garden_cycle_plants
  • garden_latest_cycle_by_dates
  • garden_clone_to
  • garden_cycle_list_detailed
  • garden_reassign_cycle

Guardrails

  • sparql_query is SELECT-only
  • LIMIT is enforced (SPARQL_DEFAULT_LIMIT, clamped by SPARQL_MAX_LIMIT)
  • fixture loading requires MCP_ALLOW_EXAMPLE_LOAD=true

Environment

Use .env (optional). Key variables:

  • VIRTUOSO_ENDPOINT, VIRTUOSO_USER, VIRTUOSO_PASS
  • SPARQL_TIMEOUT, SPARQL_UPDATE_TIMEOUT
  • SPARQL_DEFAULT_LIMIT, SPARQL_MAX_LIMIT
  • GRAPH_URI, EXAMPLE_GRAPH
  • MCP_ALLOW_EXAMPLE_LOAD
  • DOMAIN_LAYERS (default: garden_layer.plugin)

Tests

./test.sh

(Exercises /rpc compatibility flow and validates guardrailed behavior.)