Skip to content

feat: docs for mcp operations hot reloading #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
27 changes: 16 additions & 11 deletions docs/router/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,19 @@ graph:

The Model Context Protocol (MCP) server allows AI models to discover and interact with your GraphQL API in a secure way.

| Environment Variable | YAML | Required | Description | Default Value |
| ------------------------------- | ------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
| MCP_ENABLED | mcp.enabled | <Icon icon="square" /> | Enable or disable the MCP server | false |
| MCP_SERVER_LISTEN_ADDR | mcp.server.listen_addr | <Icon icon="square" /> | The address and port where the MCP server will listen for requests | localhost:5025 |
| MCP_SERVER_BASE_URL | mcp.server.base_url | <Icon icon="square" /> | The base URL of the MCP server. This is the URL advertised to the LLM clients when SSE is used as primary transport. | - |
| MCP_ROUTER_URL | mcp.router_url | <Icon icon="square" /> | Custom URL to use for the router GraphQL endpoint in MCP. Use this when your router is behind a proxy. Purely metadata for AI model. | - |
| MCP_STORAGE_PROVIDER_ID | mcp.storage.provider_id | <Icon icon="square" /> | The ID of a storage provider to use for loading GraphQL operations. Only file_system providers are supported. | - |
| MCP_GRAPH_NAME | mcp.graph_name | <Icon icon="square" /> | The name of the graph to be used by the MCP server | mygraph |
| MCP_EXCLUDE_MUTATIONS | mcp.exclude_mutations | <Icon icon="square" /> | Whether to exclude mutation operations from being exposed | false |
| MCP_ENABLE_ARBITRARY_OPERATIONS | mcp.enable_arbitrary_operations | <Icon icon="square" /> | Whether to allow arbitrary GraphQL operations to be executed. <Warning> Security risk: Should only be enabled in secure, internal environments. </Warning> | false |
| MCP_EXPOSE_SCHEMA | mcp.expose_schema | <Icon icon="square" /> | Whether to expose the full GraphQL schema. <Warning> Security risk: Should only be enabled in secure, internal environments. </Warning> | false |
| Environment Variable | YAML | Required | Description | Default Value |
| --------------------------------- | ------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
| MCP_ENABLED | mcp.enabled | <Icon icon="square" /> | Enable or disable the MCP server | false |
| MCP_SERVER_LISTEN_ADDR | mcp.server.listen_addr | <Icon icon="square" /> | The address and port where the MCP server will listen for requests | localhost:5025 |
| MCP_SERVER_BASE_URL | mcp.server.base_url | <Icon icon="square" /> | The base URL of the MCP server. This is the URL advertised to the LLM clients when SSE is used as primary transport. | - |
| MCP_ROUTER_URL | mcp.router_url | <Icon icon="square" /> | Custom URL to use for the router GraphQL endpoint in MCP. Use this when your router is behind a proxy. Purely metadata for AI model. | - |
| MCP_STORAGE_PROVIDER_ID | mcp.storage.provider_id | <Icon icon="square" /> | The ID of a storage provider to use for loading GraphQL operations. Only file_system providers are supported. | - |
| MCP_GRAPH_NAME | mcp.graph_name | <Icon icon="square" /> | The name of the graph to be used by the MCP server | mygraph |
| MCP_EXCLUDE_MUTATIONS | mcp.exclude_mutations | <Icon icon="square" /> | Whether to exclude mutation operations from being exposed | false |
| MCP_ENABLE_ARBITRARY_OPERATIONS | mcp.enable_arbitrary_operations | <Icon icon="square" /> | Whether to allow arbitrary GraphQL operations to be executed. <Warning> Security risk: Should only be enabled in secure, internal environments. </Warning> | false |
| MCP_EXPOSE_SCHEMA | mcp.expose_schema | <Icon icon="square" /> | Whether to expose the full GraphQL schema. <Warning> Security risk: Should only be enabled in secure, internal environments. </Warning> | false |
| MCP_OPERATIONS_HOT_RELOAD_ENABLED | mcp.hot_reload_config.enabled | <Icon icon="square" /> | Enable automatic reloading of MCP operations at regular intervals. | false |
| MCP_OPERATIONS_HOT_RELOAD_INTERVAL| mcp.hot_reload_config.interval | <Icon icon="square" /> | The interval at which the router checks for changes in operations directory. | 10s |

Example YAML config:

Expand All @@ -295,6 +297,9 @@ mcp:
exclude_mutations: true
enable_arbitrary_operations: false
expose_schema: false
hot_reload_config:
enabled: true
interval: '10s'

# Configure storage providers
storage_providers:
Expand Down
16 changes: 16 additions & 0 deletions docs/router/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ mcp:
exclude_mutations: true
enable_arbitrary_operations: false
expose_schema: false
hot_reload_config:
enabled: true
interval: '10s'

# Configure storage providers
storage_providers:
Expand All @@ -214,6 +217,19 @@ storage_providers:
| `exclude_mutations` | Whether to exclude mutation operations from being exposed | `false` |
| `enable_arbitrary_operations` | Whether to allow arbitrary GraphQL operations to be executed. <Warning>Security risk: Should only be enabled in secure, internal environments.</Warning> | `false` |
| `expose_schema` | Whether to expose the full GraphQL schema. <Warning>Security risk: Should only be enabled in secure, internal environments.</Warning> | `false` |
| `hot_reload_config.enabled` | Enable automatic reloading of MCP operations at regular intervals. | `false` |
| `hot_reload_config.interval` | The interval at which the router checks for changes in operations directory. | `10s` |

## MCP Operations hot reloading

The MCP server is capable of reloading operations without a full process restart. You can trigger a reload by configuring the `hot_reload_config` section to automatically check the MCP operations for changes at regular intervals.

```yaml config.yaml
mcp:
hot_reload_config:
enabled: true
interval: '10s'
```

## Storage Providers

Expand Down