Read a specific registry value from the Windows Registry.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
path |
string | Yes | Full registry path (e.g., "HKEY_CURRENT_USER\Software\MyApp") |
value_name |
string | Yes | Name of the value to read |
Returns:
{
"name": "Setting1",
"data": "Value data",
"type": "String",
"path": "HKEY_CURRENT_USER\\Software\\MyApp",
"sizeBytes": 24
}Errors:
KEY_NOT_FOUND: Registry key does not existVALUE_NOT_FOUND: Registry value does not existPATH_NOT_ALLOWED: Access to path is deniedLIMIT_EXCEEDED: Value size exceeds maximum
Example:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "read_value",
"arguments": {
"path": "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer",
"value_name": "ShellState"
}
},
"id": 1
}Write or update a registry value in the Windows Registry.
Authorization Required: READ_WRITE or ADMIN
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
path |
string | Yes | Full registry path |
value_name |
string | Yes | Name of the value to write |
value_data |
string | Yes | Value data to write |
value_type |
string | Yes | Registry type: String, DWord, QWord, Binary, MultiString, ExpandString |
Returns:
"Successfully wrote value 'Setting1' to HKEY_CURRENT_USER\\Software\\MyApp"Errors:
PATH_NOT_ALLOWED: Write access denied (check authorization level and allowed paths)INVALID_VALUE_TYPE: Unsupported value typeACCESS_DENIED: Windows permission error
Example:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "write_value",
"arguments": {
"path": "HKEY_CURRENT_USER\\Software\\MyApp",
"value_name": "Setting1",
"value_data": "NewValue",
"value_type": "String"
}
},
"id": 2
}List subkeys under a registry path.
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
path |
string | Yes | - | Full registry path to enumerate |
max_depth |
integer | No | 1 | Maximum enumeration depth (1-3) |
Returns:
[
"SubKey1",
"SubKey2",
"SubKey3"
]Errors:
PATH_NOT_ALLOWED: Access to path is deniedKEY_NOT_FOUND: Registry key does not existLIMIT_EXCEEDED: Too many keys (max 100)
Example:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "enumerate_keys",
"arguments": {
"path": "HKEY_CURRENT_USER\\Software",
"max_depth": 2
}
},
"id": 3
}List all values in a registry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
path |
string | Yes | Full registry path |
Returns:
[
{
"name": "Setting1",
"data": "Value1",
"type": "String",
"path": "HKEY_CURRENT_USER\\Software\\MyApp",
"sizeBytes": 12
},
{
"name": "Count",
"data": "42",
"type": "DWord",
"path": "HKEY_CURRENT_USER\\Software\\MyApp",
"sizeBytes": 4
}
]Errors:
PATH_NOT_ALLOWED: Access to path is deniedKEY_NOT_FOUND: Registry key does not existLIMIT_EXCEEDED: Too many values (max 100)
Example:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "enumerate_values",
"arguments": {
"path": "HKEY_CURRENT_USER\\Software\\MyApp"
}
},
"id": 4
}Get metadata about a registry key.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
path |
string | Yes | Full registry path |
Returns:
{
"path": "HKEY_CURRENT_USER\\Software\\MyApp",
"name": "MyApp",
"subKeyCount": 3,
"valueCount": 5,
"subKeyNames": ["Config", "Data", "Logs"]
}Errors:
PATH_NOT_ALLOWED: Access to path is deniedKEY_NOT_FOUND: Registry key does not exist
Example:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_key_info",
"arguments": {
"path": "HKEY_CURRENT_USER\\Software\\MyApp"
}
},
"id": 5
}Delete a registry value from the Windows Registry.
Authorization Required: READ_WRITE or ADMIN
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
path |
string | Yes | Full registry path |
value_name |
string | Yes | Name of the value to delete |
Returns:
"Successfully deleted value 'Setting1' from HKEY_CURRENT_USER\\Software\\MyApp"Errors:
PATH_NOT_ALLOWED: Delete access deniedVALUE_NOT_FOUND: Registry value does not exist
Example:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "delete_value",
"arguments": {
"path": "HKEY_CURRENT_USER\\Software\\MyApp",
"value_name": "OldSetting"
}
},
"id": 6
}Delete a registry key and all its subkeys.
Authorization Required: ADMIN
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
path |
string | Yes | Full registry path to delete |
Returns:
"Successfully deleted key: HKEY_CURRENT_USER\\Software\\MyApp\\TempData"Errors:
PATH_NOT_ALLOWED: Admin access requiredKEY_NOT_FOUND: Registry key does not exist
Warning: This operation is irreversible and deletes all subkeys and values.
Example:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "delete_key",
"arguments": {
"path": "HKEY_CURRENT_USER\\Software\\MyApp\\TempData"
}
},
"id": 7
}Template for constructing safe registry queries with proper path validation.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
path_pattern |
string | Yes | The registry path pattern to query |
Returns: Guidance text for safe registry querying
Guide for troubleshooting registry access issues.
Parameters: None
Returns: Troubleshooting guide with common issues and solutions
UTF-16 string value.
Example: "Hello World"
String with environment variable references that get expanded.
Example: "%USERPROFILE%\\Documents"
Binary data encoded as base64 string.
Example: "SGVsbG8gV29ybGQh" (base64 of "Hello World!")
32-bit unsigned integer.
Example: 42
64-bit unsigned integer.
Example: 9223372036854775807
Array of strings separated by newlines.
Example: "Line1\nLine2\nLine3"
Registry key does not exist at the specified path.
HTTP Status Equivalent: 404 Not Found
Registry value does not exist in the specified key.
HTTP Status Equivalent: 404 Not Found
Access to the registry path is denied by authorization rules.
HTTP Status Equivalent: 403 Forbidden
Common Causes:
- Path not in allowed list
- Insufficient authorization level
- Path explicitly denied
Operation exceeded configured limits.
HTTP Status Equivalent: 429 Too Many Requests
Limit Types:
- Enumeration depth
- Values per query
- Value size
Registry value type is invalid or mismatched.
HTTP Status Equivalent: 400 Bad Request
Windows denied access to the registry path.
HTTP Status Equivalent: 403 Forbidden
Common Causes:
- Insufficient Windows permissions
- Path requires administrator privileges
Default rate limit: 100 requests per minute
Configure via: WINREG_MCP_RATE_LIMIT_PER_MINUTE
When exceeded, operations will return an error.
Default operation timeout: 5000ms (5 seconds)
Configure via: WINREG_MCP_OPERATION_TIMEOUT_MS
Long-running operations (large enumerations) may hit this timeout.
- Default max: 3 levels
- Configure via:
WINREG_MCP_MAX_ENUMERATION_DEPTH - Can be further restricted per path in allowed_paths.json
- Default max: 100 values
- Configure via:
WINREG_MCP_MAX_VALUES_PER_QUERY
- Default max: 1 MB (1,048,576 bytes)
- Configure via:
WINREG_MCP_MAX_VALUE_SIZE_BYTES
Can only read registry values and enumerate keys.
Allowed Operations:
- read_value
- enumerate_keys
- enumerate_values
- get_key_info
Can read and write registry values (but not delete keys).
Allowed Operations:
- All READ_ONLY operations
- write_value
- delete_value
Full access including key deletion.
Allowed Operations:
- All READ_WRITE operations
- delete_key
Always use full registry paths:
- ✅
HKEY_CURRENT_USER\\Software\\MyApp - ✅
HKCU\\Software\\MyApp(abbreviated form) - ❌
Software\\MyApp(missing hive)
Start with shallow depth and increase if needed:
- Depth 1: Immediate children only
- Depth 2: Children and grandchildren
- Depth 3: Maximum (default)
Always check for error responses:
if (response.error) {
console.error(`Error: ${response.error.code} - ${response.error.message}`);
// Handle specific error codes
}Always specify the correct value type when writing:
- String data → "String"
- Numbers → "DWord" (32-bit) or "QWord" (64-bit)
- Binary data → "Binary" (base64 encoded)
Current API Version: 1.0.0
Version format: MAJOR.MINOR.PATCH
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes
Deprecation period: 3 months before removal of deprecated features.