Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Model Context Protocol

Tentris provides an endpoint for the Model Context Protocol (MCP). AI agents, such as Claude Code, use it to explore and query your data.

⚠️ Warning: The MCP endpoint is currently an experimental feature.

Enabling the Endpoint

Add the [serve.mcp] section to the configuration file and restart Tentris.

[serve.mcp]

The endpoint is then available at http://<host>:<port>/mcp. Without this section, /mcp does not exist.

What Agents Can Do

The endpoint offers three tools:

  • dataset_statistics: the size of the dataset and of its largest named graphs.
  • describe_schema: the most common classes and predicates of the dataset.
  • sparql_query: runs read-only SPARQL queries (SELECT, ASK, CONSTRUCT and DESCRIBE).

All tools are read-only. Tool calls have the same time limit as SPARQL queries (limit-query-duration-secs).

Authentication

If auth is disabled, the endpoint is open to everyone, like all other endpoints.

If auth is enabled, the endpoint accepts only a bearer token:

Authorization: Bearer tnt_...

The owner of the token must be in the query group. The endpoint does not accept passwords, cookies or guests, even with allow-guests = true. To make a token, refer to Tokens.

StatusCause
401 UnauthorizedThe token is missing, incorrect, expired or deleted.
403 ForbiddenThe owner of the token is not in the query group.

⚠️ Warning: Use HTTPS ([serve.tls]) when the server is not on localhost. Otherwise, the token is sent in plain text.

Connecting Claude Code

claude mcp add --transport http tentris http://localhost:9080/mcp \
    --header "Authorization: Bearer tnt_..."

Replace tnt_... with your token. Without auth, leave out the --header line.

To check the connection, run claude mcp list. The output should contain this line:

tentris: http://localhost:9080/mcp (HTTP) - ✔ Connected

You can now ask Claude questions about your data.

What can you tell me about the data stored in Tentris?

Note: By default, claude mcp add registers Tentris only for the current project. Use --scope user to register it for all your projects.

To remove Tentris from Claude Code, run this command:

claude mcp remove tentris