Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/toolhive/guides-cli/run-mcp-servers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,30 @@ thv run https://api.example.com/mcp \
--remote-auth-scopes read,write,admin
```

#### Resource indicator (RFC 8707)

When authenticating to remote MCP servers, you can specify a resource indicator
as defined by [RFC 8707](https://datatracker.ietf.org/doc/html/rfc8707). This
allows the authorization server to return an access token with a scoped
audience, which will then be passed to and validated by the remote MCP server.

By default, ToolHive automatically uses the remote server URL as the resource
indicator when authenticating. The URL is validated, normalized (lowercase
scheme and host, fragments stripped), and included in the OAuth token request.

To explicitly set a different resource indicator, use the
`--remote-auth-resource` flag:

```bash
thv run https://api.example.com/mcp \
... \
--remote-auth-resource https://api.example.com
Comment on lines +746 to +748
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ellipsis (...) placeholder in the command example should be replaced with actual flag examples or removed. Per the writing style guide, examples should be practical and real-world. Consider showing a complete example with the other authentication flags mentioned earlier in the document (like --remote-auth-issuer, --remote-auth-client-id).

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignoring this suggestion, since the current format aligns with the examples for custom authentication timeout, skip browser auth, and custom scopes

```

The resource parameter must include a scheme and host, and cannot contain
fragments. If you provide an invalid resource parameter, ToolHive will return an
error.

#### Custom authentication timeout

Adjust the authentication timeout for slow networks:
Expand Down