# fingerprint_mcp_server_config

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/model_config/fingerprint_mcp_server_config)

Return a stable fingerprint for an MCP server definition.

The contract is a JSON-serializable value (in practice the `dict` parsed
from `.mcp.json`, though a malformed entry may be any JSON scalar/array); a
non-serializable input raises `TypeError` from `json.dumps`. `sort_keys=True`
makes the digest independent of key order, so reordering fields in the config
does not force a re-prompt.

## Signature

```python
fingerprint_mcp_server_config(
    server: JsonValue,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `server` | `JsonValue` | Yes | Parsed MCP server config (a JSON-serializable value). |

## Returns

`str`

A SHA-256 fingerprint over the canonical JSON representation.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e4c1ffe9ee63d7854147de490ca27495ef157a7b/libs/code/deepagents_code/model_config.py#L5043)