diff --git a/docs/router/configuration.mdx b/docs/router/configuration.mdx index c963561..a4e2df0 100644 --- a/docs/router/configuration.mdx +++ b/docs/router/configuration.mdx @@ -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 | | Enable or disable the MCP server | false | -| MCP_SERVER_LISTEN_ADDR | mcp.server.listen_addr | | The address and port where the MCP server will listen for requests | localhost:5025 | -| MCP_SERVER_BASE_URL | mcp.server.base_url | | 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 | | 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 | | The ID of a storage provider to use for loading GraphQL operations. Only file_system providers are supported. | - | -| MCP_GRAPH_NAME | mcp.graph_name | | The name of the graph to be used by the MCP server | mygraph | -| MCP_EXCLUDE_MUTATIONS | mcp.exclude_mutations | | Whether to exclude mutation operations from being exposed | false | -| MCP_ENABLE_ARBITRARY_OPERATIONS | mcp.enable_arbitrary_operations | | Whether to allow arbitrary GraphQL operations to be executed. Security risk: Should only be enabled in secure, internal environments. | false | -| MCP_EXPOSE_SCHEMA | mcp.expose_schema | | Whether to expose the full GraphQL schema. Security risk: Should only be enabled in secure, internal environments. | false | +| Environment Variable | YAML | Required | Description | Default Value | +| --------------------------------- | ------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | +| MCP_ENABLED | mcp.enabled | | Enable or disable the MCP server | false | +| MCP_SERVER_LISTEN_ADDR | mcp.server.listen_addr | | The address and port where the MCP server will listen for requests | localhost:5025 | +| MCP_SERVER_BASE_URL | mcp.server.base_url | | 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 | | 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 | | The ID of a storage provider to use for loading GraphQL operations. Only file_system providers are supported. | - | +| MCP_GRAPH_NAME | mcp.graph_name | | The name of the graph to be used by the MCP server | mygraph | +| MCP_EXCLUDE_MUTATIONS | mcp.exclude_mutations | | Whether to exclude mutation operations from being exposed | false | +| MCP_ENABLE_ARBITRARY_OPERATIONS | mcp.enable_arbitrary_operations | | Whether to allow arbitrary GraphQL operations to be executed. Security risk: Should only be enabled in secure, internal environments. | false | +| MCP_EXPOSE_SCHEMA | mcp.expose_schema | | Whether to expose the full GraphQL schema. Security risk: Should only be enabled in secure, internal environments. | false | +| MCP_OPERATIONS_HOT_RELOAD_ENABLED | mcp.hot_reload_config.enabled | | Enable automatic reloading of MCP operations at regular intervals. | false | +| MCP_OPERATIONS_HOT_RELOAD_INTERVAL| mcp.hot_reload_config.interval | | The interval at which the router checks for changes in operations directory. | 10s | Example YAML config: @@ -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: diff --git a/docs/router/mcp.mdx b/docs/router/mcp.mdx index 3ddc43f..a2e5dd9 100644 --- a/docs/router/mcp.mdx +++ b/docs/router/mcp.mdx @@ -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: @@ -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. Security risk: Should only be enabled in secure, internal environments. | `false` | | `expose_schema` | Whether to expose the full GraphQL schema. Security risk: Should only be enabled in secure, internal environments. | `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