Skip to content

SEP-1415: HTTP Message Signing for MCP Client Authentication #1415

Closed

Description

@dickhardt

SEP-1415: HTTP Message Signing for MCP Client Authentication

Author: @dickhardt
Status: draft
Type: Standards Track
Created: 2025-01-04

Abstract

This SEP proposes adding HTTP Message Signing (RFC 9421) as an optional client authentication method for MCP. This provides cryptographic proof of possession, enabling MCP Servers to establish authenticated sessions with clients without relying solely on bearer tokens. The proposal maintains full backward compatibility while addressing security concerns around session binding and client identity verification.

Motivation

Current MCP implementations rely primarily on bearer tokens (OAuth access tokens and MCP-Session-Id) for client identification and session continuity. This creates several security and architectural limitations:

  1. Bearer Token Vulnerabilities: Access tokens are vulnerable to exfiltration attacks on client devices
  2. Weak Session Binding: Only bearer tokens provide session continuity, with no cryptographic client verification
  3. Limited Client Identity: No trusted mechanism for servers to verify client instance identity
  4. OAuth Complexity Overhead: Full OAuth flows add significant complexity when only simple client-to-server authentication is needed
  5. Bearer Token Possession Risk: OAuth flows often result in MCP Clients possessing access tokens intended for MCP Server to resource server communication, violating the principle of least privilege and creating unnecessary token exposure

Architectural Alignment

With SEP1036 being accepted, URL elicitation now enables MCP Servers to obtain access tokens directly from authorization servers, and there is an opportunity to realign the architecture. This proposal positions MCP Clients as general-purpose clients that can connect to any MCP Server, similar to how web browsers can connect to any web server.

This architectural alignment mirrors the web model:

  • Web browsers are general-purpose clients that can connect to any web server
  • Web servers provide specific functionality and manage user authentication and resource access
  • Browser-server sessions are established for state management between requests
  • Web servers act as OAuth clients when they need to access protected resources on behalf of users

Similarly, in the MCP model:

  • MCP Clients are general-purpose clients that can connect to any MCP Server
  • MCP Servers provide specific functionality through tools and resources
  • Client-server sessions are established for state management between requests
  • MCP Servers authenticate users and obtain access tokens for protected resources when needed

This proposal specifies how the client-server session can be established by demonstrating proof of possession rather than bearer tokens.

Related Issues

  • Issue 544: Security concerns with bearer token access
  • Issue 990: Client identity presentation mechanisms

Specification

HTTP Message Signing Profile

MCP Clients MAY authenticate using HTTP Message Signatures (RFC 9421) with the following profile:

Key Management

Clients generate a public/private key pair per MCP Server using Ed25519:

{
  "kty": "OKP", 
  "crv": "Ed25519",
  "x": "base64url-encoded-public-key",
  "d": "base64url-encoded-private-key"
}

Example Key:

{
  "kty": "OKP",
  "crv": "Ed25519", 
  "x": "3TQjAzEPW-sE81J4eWUuI2ZQCRJKELwdco_cJa7e9pM",
  "d": "hOMEcdDFPWvkw-OyC-cVABnPaA6yKqrdWVoFw6bvqaM"
}

The keyid is the JWK thumbprint per RFC 7638.

The corresponding keyid (JWK thumbprint) for the example key would be:

7CECy79zsOm80SK3EgvHmsLM39PfUmbfSTxqOLhfgsM

Client Initialization

Clients include their public key in the initialize request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize", 
  "params": {
    "clientInfo": {
      "name": "example-client",
      "version": "1.0.0",
      "cnf": {
        "jwk": {
          "kty": "OKP",
          "crv": "Ed25519", 
          "x": "3TQjAzEPW-sE81J4eWUuI2ZQCRJKELwdco_cJa7e9pM"
        }
      }
    }
  }
}

Extensible Key Communication

While the basic cnf.jwk approach provides cryptographic binding, implementations MAY use tokens with bound keys to communicate additional claims about the MCP Client or the user alongside the public key. These tokens would be signed by an issuer trusted by the MCP Server.

Required Signature Components

Every signed MCP request MUST include these HTTP headers and signature components:

Content-Digest: sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:
Signature-Input: sig1=("@method" "@target-uri" "content-digest" "mcp-session-id" "created");created=1756801769;keyid="7CECy79zsOm80SK3EgvHmsLM39PfUmbfSTxqOLhfgsM";alg="ed25519"
Signature: sig1=:LAH8BjcfcOcLojiuOBFWBo0hWDdMOGvAdEBM0h/MIRoNfj6Ae==:

Signed Fields (included in signature base string):

  • @method - HTTP method
  • @target-uri - Full request URI
  • content-digest - SHA-256 of request body
  • mcp-session-id - Session identifier (after initialization)
  • created - Signature creation timestamp (Unix epoch seconds)

Signature Parameters (metadata, not signed):

  • keyid - JWK thumbprint identifying the verification key
  • alg - Signature algorithm (ed25519)

Replay Protection

  • Signatures MUST include created timestamp (Unix epoch seconds)
  • Servers MUST reject signatures older than 300 seconds (5 minutes)
  • Servers SHOULD maintain a cache of seen request signatures to prevent replay attacks

Example Signed initialize Request

POST /mcp HTTP/1.1
Host: server.example.com
Content-Type: application/json
Content-Digest: sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:
Signature-Input: sig1=("@method" "@target-uri" "content-digest" "created");created=1756801769;keyid="7CECy79zsOm80SK3EgvHmsLM39PfUmbfSTxqOLhfgsM";alg="ed25519"
Signature: sig1=:LAH8BjcfcOcLojiuOBFWBo0hWDdMOGvAdEBM0h/MIRoNfj6Ae5OOKlEOUcKTOvXsyHkC5bV9D6m9QQDnR3QxDw==:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2024-11-05",
    "capabilities": {
      "roots": {
        "listChanged": true
      },
      "sampling": {}
    },
    "clientInfo": {
      "name": "example-client",
      "version": "1.0.0",
      "cnf": {
        "jwk": {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "3TQjAzEPW-sE81J4eWUuI2ZQCRJKELwdco_cJa7e9pM"
        }
      }
    }
  }
}

Note that the initialize request does not include mcp-session-id in the signature since the session has not been established yet.

Example Signed tools/call Request

POST /mcp HTTP/1.1
Host: server.example.com
Content-Type: application/json
Content-Digest: sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:
MCP-Session-Id: sess_abc123
Signature-Input: sig1=("@method" "@target-uri" "content-digest" "mcp-session-id" "created");created=1756801769;keyid="7CECy79zsOm80SK3EgvHmsLM39PfUmbfSTxqOLhfgsM";alg="ed25519"
Signature: sig1=:LAH8BjcfcOcLojiuOBFWBo0hWDdMOGvAdEBM0h/MIRoNfj6Ae5OOKlEOUcKTOvXsyHkC5bV9D6m9QQDnR3QxDw==:

{
  "jsonrpc": "2.0",
  "id": "request_12345", 
  "method": "tools/call",
  "params": {
    "name": "example_tool",
    "arguments": {}
  }
}

Server Behavior

Servers that support HTTP Message Signing:

  1. MUST validate signature cryptographically using the client's public key
  2. MUST verify the created timestamp is within acceptable bounds
  3. SHOULD cache request signatures to prevent replay attacks
  4. MAY use the keyid (JWK thumbprint) as a stable client identifier
  5. MUST continue to support clients not using message signing

Cryptographic Agility

To ensure interoperability and future-proofing, servers MUST communicate their supported signature algorithms to clients when an unsupported algorithm is encountered.

Algorithm Support Discovery

When a server receives a request with an unsupported signature algorithm, it MUST respond with an MCP error containing the list of supported algorithms:

{
  "jsonrpc": "2.0",
  "id": "request_12345",
  "error": {
    "code": -32602,
    "message": "Unsupported signature algorithm",
    "data": {
      "error": "unsupported_algorithm", 
      "supported_algorithms": [
        "rsa-v1_5-sha256",
        "ecdsa-p256-sha256"
      ]
    }
  }
}

Standard Algorithm Identifiers

Servers MUST use IANA-registered algorithm identifiers from the "HTTP Signature Algorithms" registry in the "HTTP Message Signatures" IANA registry at https://www.iana.org/assignments/http-message-signature/http-message-signature.xhtml

Client Algorithm Selection

Upon receiving an unsupported_algorithm error, clients SHOULD:

  1. Parse the supported_algorithms list from the error response
  2. Select a mutually supported algorithm based on security preferences
  3. Generate a new signature using the selected algorithm
  4. Retry the request with the updated signature

Rationale

Alternative Approaches Considered

Mutual TLS (mTLS):

  • Pros: Transport-level security, well-established
  • Cons: TLS termination at CDN/load balancer breaks client cert visibility, complexity for local development

Signed JSON-RPC:

  • Pros: Protocol-native approach
  • Cons: No HTTP header protection, backward compatibility issues, replay vulnerabilities

HTTP Message Signatures:

  • Pros: Application-layer security, transport-independent, backward compatible, comprehensive request protection
  • Cons: Per-request signature computation overhead

HTTP Message Signatures provide the optimal balance of security, compatibility, and implementability.

Benefits

  1. Enhanced Security: Cryptographic proof of client identity and request integrity
  2. Session Binding: Strong cryptographic binding between client instances and sessions
  3. Replay Protection: Built-in timestamp and signature caching prevents replay attacks
  4. Backward Compatibility: Existing clients continue to work unchanged
  5. Enterprise Ready: Provides authentication strength suitable for high-security environments
  6. Transport Independence: Works over HTTP/HTTPS without requiring specific TLS configurations

Backward Compatibility

This proposal is fully backward compatible:

  • New cnf field (contains the public key) in initialize is optional
  • Servers can support both signed and unsigned clients simultaneously
  • Existing OAuth flows remain unchanged
  • No breaking changes to existing message formats

Security Considerations

Security Improvements

  • Private Key Security: Ed25519 provides strong cryptographic guarantees
  • Request Integrity: Full HTTP request signed, preventing tampering
  • Session Security: Cryptographic binding prevents session hijacking
  • Replay Protection: Timestamp validation and signature caching

Implementation Security

Client Implementations:

  • Generate unique key pairs per server relationship
  • Use secure key storage (OS keychain, hardware security modules)
  • Implement proper signature timing to prevent side-channel attacks

Server Implementations:

  • Validate signatures with constant-time operations
  • Implement proper timestamp window validation
  • Use cryptographically secure signature caching
  • Rate limit signature validation attempts

Threat Mitigation

Threat Before After
Token Theft Bearer tokens vulnerable on client Only private keys on client (standard key management)
Session Hijacking Bearer token theft enables takeover Cryptographic binding prevents hijacking
Client Impersonation No cryptographic client verification Ed25519 signature provides proof of possession
Request Tampering No request integrity protection Full HTTP request cryptographically signed

Reference Implementation

None at this time. A reference implementation would include:

  • Ed25519 key generation utilities
  • HTTP Message Signature creation and verification
  • Example client and server integration code

Open Questions

  1. Should Ed25519 remain the RECOMMENDED algorithm, or should we recommend a different default based on implementation feedback?

This SEP focuses specifically on adding HTTP Message Signing as a client authentication option. Future SEPs may address server-side authorization management and interaction request mechanisms.

Activity

  1. changed the title [-]SEP-XXXX: HTTP Message Signing for MCP Client Authentication[/-] [+]SEP-1415: HTTP Message Signing for MCP Client Authentication[/+] on Sep 2, 2025
  2. dickhardt commented on Sep 2, 2025

    @dickhardt
    Author

    This proposal replaces #1299

  3. jricher commented on Sep 2, 2025

    @jricher

    Some notes per RFC9421:

    Signature Parameters (metadata, not signed):

    keyid - JWK thumbprint identifying the verification key
    alg - Signature algorithm (ed25519)

    All signature parameters are signed. Both keyid and alg are of the same class as created. What's not signed is the signature label, as that's part of the packaging and could be changed in transit.

    Furthermore, it's recommended by RFC9421 to not use alg but instead to derive the algorithm from the key material or a higher order protocol. If desired, this seems like it could be easily accomplished in this proposal by having a JOSE algorithm identifier in the key material itself and enforcing the application of that JWA entry to the signature.

  4. covia-dev commented on Sep 5, 2025

    @covia-dev

    @dickhardt Very useful proposal, valuable for those of us building decentralised / P2P MCP capabilities.

    On the open question: Standardising on Ed25519 is a good idea, it's a strong algorithm, has compact keys / signatures and is widely supported. I don't think there is a better option out there right now.

  5. dickhardt commented on Sep 5, 2025

    @dickhardt
    Author

    Furthermore, it's recommended by RFC9421 to not use alg but instead to derive the algorithm from the key material or a higher order protocol. If desired, this seems like it could be easily accomplished in this proposal by having a JOSE algorithm identifier in the key material itself and enforcing the application of that JWA entry to the signature.

    Where is that in the spec @jricher ? ... if it is not recommended, then why is it used in the samples?

    I'm unclear on what the rest of your message is saying -- I'm not an HTTP Message signing expert -- but you are! What needs to be corrected?

  6. jricher commented on Sep 5, 2025

    @jricher

    The signature algorithm selection path lists the explicit field last in precedence order: https://www.rfc-editor.org/rfc/rfc9421.html#section-3.2-3.6.1

    Use of JOSE / JWA is listed here, which explicitly states not to use the alg parameter: https://www.rfc-editor.org/rfc/rfc9421.html#name-json-web-signature-jws-algo

    The section defining the alg parameter registry value says this: "However, the use of the alg parameter needs to be treated with caution to avoid various forms of algorithm confusion and substitution attacks, as discussed in Section 7.", where Section 7 is the security considerations. One specific item, which is based on documented exploits of JWT alg substitution attacks, is discussed here: https://www.rfc-editor.org/rfc/rfc9421.html#name-key-and-algorithm-specifica -- specific text to note is "while this specification does allow runtime specification of the algorithm using the alg signature parameter, applications are encouraged to use other mechanisms such as static configuration or a higher-protocol-level algorithm specification instead, preventing an attacker from substituting the algorithm specified."

    Your question about examples doesn't make sense. Not all examples use alg, but it's an option in the right circumstances. Why wouldn't some examples show an option? We did seek to be comprehensive with examples so of course we'll have ones that show options.

    For this application, if you're specifying the ed25519 algorithm path statically as seems to be the case, then it's actually better to specify it outside of the on-the-wire protocol and prohibit use of the alg parameter entirely, as given by example in the "Enforcing Application Requirements" section: "Prohibiting certain signature metadata parameters, such as runtime algorithm signaling with the alg parameter when the algorithm is determined from the key information" https://www.rfc-editor.org/rfc/rfc9421.html#section-3.2.1-3.4

    If this proposal seeks to profile HTTP Message Signatures, it should follow the guidelines in section 1.4 of that specification which lays out a set of application requirements for doing so: https://www.rfc-editor.org/rfc/rfc9421.html#name-application-of-http-message

    For a good example of a specification that deliberately profiles RFC9421 for protecting an application using TOFU style key introduction of clients and getting access tokens out the back, I once again recommend following RFC9635 for details: https://www.rfc-editor.org/rfc/rfc9635.html#name-http-message-signatures

  7. spacewander commented on Sep 8, 2025

    @spacewander
    Contributor

    Clients generate a public/private key pair per MCP Server using Ed25519:

    It seems that the MCP Server can also pre-generate a public / private key pair and distribute it to the client. In this way, only the allowed clients can access this MCP server, and the server knows the client's permission when it receives the keyid.

  8. spacewander commented on Sep 12, 2025

    @spacewander
    Contributor

    If the key pairs can be pre-generated by the MCP server, we don't need the clients to include their public key in the initialize request. This can make the HTTP Message Signing more stateless. The server instances still need to know all the keys (via connecting to the same db cluster or something else), but we don't need to ensure the client sessions are shared between different server instances.

  9. dickhardt commented on Sep 12, 2025

    @dickhardt
    Author

    How would the client get the private key to sign the request? I'm not sure you understand the principles of proof of possession - if the server generates the key pair - the private key is not secret to the client

  10. 3 remaining items

  11. spacewander commented on Sep 22, 2025

    @spacewander
    Contributor

    How would the client get the private key to sign the request? I'm not sure you understand the principles of proof of possession - if the server generates the key pair - the private key is not secret to the client

    @dickhardt
    Same as the cloud vendor's API key - only the cloud vedndor and the customer should know the private key.
    The benefit is that the communication can be stateless. The server instances don't need to ensure the session is shared among all the server instances.
    Otherwise, if different requests in the same session are handled by different server instances, they may not know the public key. The OAuth approach doesn't have this problem because every server instance can verify the token with the same Authorization server.

  12. spacewander commented on Sep 22, 2025

    @spacewander
    Contributor

    If the key is pre-generated by the server, we can also use this way to authorize. Since the key is distributed by the server and the server can assign its ability.

  13. dickhardt commented on Sep 23, 2025

    @dickhardt
    Author

    A few comments that came up when I was going through SEP-1372.

    1. SEP-1415 binds the client’s public key via initialize, while SEP-1372 allows skipping initialization. As per the current proposal, without initialize, the server has no key to verify the first signed request. We should either clearly indicate that the use of initialize is mandatory for message signing, or add a mechanism that will allow init-less bootstrap. For instance, on the first signed request, the client could include a JWK in a new header (e.g., MCP-Client-Public-Key). The server can then verify that request using the provided JWK and, on success, bind the key to the client/session for subsequent requests.
    2. SEP-1372 proposes an MCP-Protocol-Version header for init-less operation. It would be good to specify that this header should be included in the signature when it is present.

    Perhaps send the key in a new header rather than in initialize? And define an error the server returns if it does not have the key.

  14. dickhardt commented on Sep 23, 2025

    @dickhardt
    Author

    How would the client get the private key to sign the request? I'm not sure you understand the principles of proof of possession - if the server generates the key pair - the private key is not secret to the client

    @dickhardt Same as the cloud vendor's API key - only the cloud vedndor and the customer should know the private key. The benefit is that the communication can be stateless. The server instances don't need to ensure the session is shared among all the server instances. Otherwise, if different requests in the same session are handled by different server instances, they may not know the public key. The OAuth approach doesn't have this problem because every server instance can verify the token with the same Authorization server.

    Verifying a token with the AS is unusual for most AS

    If the MCP servers are maintaining session state, then the public key is in session data.

  15. spacewander commented on Sep 24, 2025

    @spacewander
    Contributor

    If the MCP servers are maintaining session state, then the public key is in session data.

    Theoretically, yes. In reality, it is hard. Common session sharing mechanisms usually provide eventual consistency. For example, Redis replica is async by default. Stronger consistency, higher cost. That's why the trend of MCP is to make it as stateless as possible, like #1442.

    Sending the public key in a new header is a solution, and we need to evaluate the cost. The public key is usually hundreds of bytes. But since we already accept the access token per request, which is also big, accepting public key + signature may be acceptable too.

  16. dadrus commented on Oct 16, 2025

    @dadrus

    I have some comments/questions.

    1. The requirements for the signed fields are imo invalid (as also already said by @jricher):

    Signed Fields (included in signature base string):

    • @method - HTTP method
    • @target-uri - Full request URI
    • content-digest - SHA-256 of request body
    • mcp-session-id - Session identifier (after initialization)
    • created - Signature creation timestamp (Unix epoch seconds)

    According to Creating Signature Base of the RFC, all signature parameter are included in the signature. It is not possible to specify a single specific parameter - created here - to be included.

    Additionally, message components without @ at the beginning of their names must be HTTP Fields (HTTP header) - see also HTTP Message Components.

    Both means Signature-Input: sig1=("@method" "@target-uri" "content-digest" "mcp-session-id" "created");created=1756801769;keyid="7CECy79zsOm80SK3EgvHmsLM39PfUmbfSTxqOLhfgsM";alg="ed25519" is invalid and compliant implementations (e.g. httpsig) will refuse such requests.

    1. Replay protection concerns

    Replay Protection
    ...

    • Servers SHOULD maintain a cache of seen request signatures to prevent replay attacks

    Why not relying on the nonce parameter - a per request unique value - and the created timestamp for the same purpose? Here the relevant contents from the Signature Replay section of the RFC:

    To counteract these kinds of attacks, it's first important for the signer to cover sufficient portions of the message to differentiate it from other messages. In addition, the signature can use the nonce signature parameter to provide a per-message unique value to allow the verifier to detect replay of the signature itself if a nonce value is repeated. Furthermore, the signer can provide a timestamp for when the signature was created and a time at which the signer considers the signature to be expired, limiting the utility of a captured signature value.

    1. Identity of the Signature creator (the client)

    Event though the RFC uses labels a lot, like you are also using in your examples - Signature-Input: sig1=(... (sig1 is a label). Labels do not identify applications, they identify signatures. There is also discrepancy in the RFC: While Chapter 5.2 - Processing an Accept-Signature mandates that

    ... a target message MUST have the same label ...

    this requirement conflicts with Chapter 7.2.5 - Signature Labels, which clearly states:

    ... An intermediary is allowed to relabel an existing signature when processing the message.

    Therefore, applications should not rely on specific labels being present, and applications should not put semantic meaning on the labels themselves. Instead, additional signature parameters can be used to convey whatever additional meaning is required to be attached to, and covered by, the signature. In particular, the tag parameter can be used to define an application-specific value.

    Therefore, it might be beneficial to make use of the tag flag and "bind" the signature verification key to it. That way the identity of the client will stay stable even in the event of key rotation, especially for trust on first use approaches as e.g. described in this SEP. I don't think it could result in privacy issues as possible tracking would be related to MCP clients and not humans.

    1. Cryptographic Agility

    Algorithm Support Discovery

    When a server receives a request with an unsupported signature algorithm, it MUST respond with an MCP error containing the list of supported algorithms:

     "jsonrpc": "2.0",
     "id": "request_12345",
     "error": {
       "code": -32602,
       "message": "Unsupported signature algorithm",
       "data": {
         "error": "unsupported_algorithm", 
         "supported_algorithms": [
           "rsa-v1_5-sha256",
           "ecdsa-p256-sha256"
         ]
       }
     }
    }

    Why not using the Signature-Accept header for this? The RFC provides already an answer for that concern in the Request Signatures section:

    When the Accept-Signature field is used in an HTTP response message, the field indicates that the server desires the client to sign its next request to the server with the identified parameters, and the target message is the client's next request.

    The only limitation is that there is no way to inform the client about the list of algorithms which are supported, but the specification of a single algorithm using the alg parameter is perfectly possible, as well as informing the client about what else might be wrong with the current signature - like missing signature parameters and alike.

    Frankly speaking it feels a bit strange to tunnel errors related to HTTP Message Signatures through the MCP protocol.

    Looking forward for your responses and thank you in advance.

  17. dadrus commented on Oct 16, 2025

    @dadrus

    Regarding resolving keys for http message signatures: I just found https://datatracker.ietf.org/doc/draft-meunier-http-message-signatures-directory/03/ - a pretty early "HTTP Message Signatures Directory" draft, which imo looks nice. It basically defines a new header Signature-Agent which can either be set to a JWKS url, or contain the actual key(s) . Does it maybe make sense to use that approach instead of relying on the existence of the initialize request with the cnf entry?

  18. dickhardt commented on Oct 17, 2025

    @dickhardt
    Author

    @dadrus thanks for all the feedback!

    Per your comments on what to sign -- I'm not an HTTP Message signing expert -- and Justin's feedback was too obtuse for me to understand -- happy to fix if there is interest in this approach!

    Regarding resolving keys for http message signatures: I just found https://datatracker.ietf.org/doc/draft-meunier-http-message-signatures-directory/03/ - a pretty early "HTTP Message Signatures Directory" draft, which imo looks nice. It basically defines a new header Signature-Agent which can either be set to a JWKS url, or contain the actual key(s) . Does it maybe make sense to use that approach instead of relying on the existence of the initialize request with the cnf entry?

    I have no strong opinion on how JWKS url is passed, and am not tracking MCP enough to know if a session without initialize makes sense, so will defer to others. Using a JWKS url does not easily work for desktop clients

    https://github.com/dickhardt/openid-key-binding was finally adopted by the OpenID Connect WG. This binds a key to an id_token, allowing the MCP Client to prove which user it has authenticated by using the same key to sign the HTTP Messages. This of course would require an MCP Server that would know how to use the id_token.

    A number of these features would benefit from a metadata discovery mechanism of an MCP Server by an MCP Client -- which could be happening somewhere. :)

  19. dadrus commented on Oct 19, 2025

    @dadrus

    Thank you for your answer @dickhardt.

    Per your comments on what to sign -- I'm not an HTTP Message signing expert -- and Justin's feedback was too obtuse for me to understand -- happy to fix if there is interest in this approach!

    Not sure I could call myself an HTTP Message Signing expert either — I’m just one of those who had to dive deep into the spec to build a compliant implementation. ;)

    I’m also not an MCP expert — just a security guy who strongly believes this SEP, if supported by the MCP spec, could address some important security issues in the protocol today. From that perspective, regardless of the SEP’s future, I think its description should at least use HTTP Message Signatures correctly — which simply means removing the created field from the signature base.

    I’m not sure whether your comment above also referred to Justin’s note on the use of alg. Knowing your background, I assume no :) Still, here’s my 5 cts: we shall remove alg from the request's Signature-Input header to avoid potential security pitfalls and prevent the rise of naive implementations as this was the case with early JWT libraries, where the alg claim was used to dynamically select the signing algorithm for a given key.

    ... Using a JWKS url does not easily work for desktop clients

    That’s definitely true. However, the idea behind the Signature-Agent header isn’t limited to passing a JWKS URL. It can also use a data: URI schema: data:application/http-message-signatures-directory+json[;base64],<JWKS>.

    A number of these features would benefit from a metadata discovery mechanism of an MCP Server by an MCP Client -- which could be happening somewhere. :)

    Fully agree. However, I think the signaling of expectations (e.g., supported algorithms) in case of errors should happen at the level of the used protocol. To illustrate, consider this sequence:

    • The MCP Client calls the MCP Server’s metadata discovery endpoint to learn about supported algorithms, etc.
    • The MCP Client initiates a session.
    • The MCP Client calls the tool’s endpoint but omits the HTTP Message Signature.
    • The MCP Server responds with an error indicating that the request was unsigned.

    So what should that error look like? In my view, it should be aligned with the HTTP Message Signatures protocol. In that case the response could look as follows:

    HTTP/1.1 401 Unauthorized
    Accept-Signature: sig1=("@method" "@target-uri" "@authority" "content-digest" "mcp-session-id" );created;nonce;alg="ed25519"
    
    {
      jsonrpc: "2.0",
      id: "<the message id from the request>",
      error: {
        code: -32602,
        message: "no HTTP Message Signature present";
      }
    }
    

    Instead of

    HTTP/1.1 401 Unauthorized
    
    {
      "jsonrpc": "2.0",
      "id": "request_12345",
      "error": {
        "code": -32602,
        "message": "Unsupported signature algorithm",
        "data": {
          "error": "unsupported_algorithm", 
          "supported_algorithms": [
            "rsa-v1_5-sha256",
            "ecdsa-p256-sha256"
          ]
        }
      }
    }
    

    Since the MCP Client was misbehaving, the MCP Server would signal it expectations. Here, the alg parameter would represent the preferred algorithm of the MCP Server. This would even work without any type of discovery and IMO would make the implementation of e.g. proxies much simpler. At least I believe this approach is much more cohesive.

    https://github.com/dickhardt/openid-key-binding was finally adopted by the OpenID Connect WG. This binds a key to an id_token, allowing the MCP Client to prove which user it has authenticated by using the same key to sign the HTTP Messages. This of course would require an MCP Server that would know how to use the id_token.

    This is indeed nice for first-party use cases! I'm wondering however how it relates to this SEP? According to my understanding the idea is to not have the MCP Client act as an OAuth2/OIDC client to avoid the need of DCR.

  20. github-actions commented on Jan 19, 2026

    @github-actions
    Contributor

    Friendly Reminder

    Hi @dickhardt!

    This SEP proposal has been inactive for 90 days.

    We wanted to check in:

    • Are you still working on this proposal?
    • Is there anything blocking progress?
    • Do you need help finding a sponsor?

    If this proposal is no longer being pursued, please let us know and we can close it. Otherwise, any update on the current status would be appreciated!


    This is an automated message from the SEP lifecycle bot.

  21. dsp-ant commented on Jan 26, 2026

    @dsp-ant
    Member

    Thank you for submitting this SEP proposal! Unfortunately, this proposal has been open for over 5 months without finding a sponsor from the core maintainer team.

    We're marking this as dormant and closing it for now. This doesn't mean the idea isn't valuable—it simply hasn't gained the traction needed to move forward at this time.

    If you or someone else would like to revive this proposal in the future, please feel free to open a new issue referencing this one. We'd be happy to reconsider it with a sponsor's support.

    Thank you for your contribution to MCP! 🙏

  22. njdawn commented on May 13, 2026

    @njdawn

    bumping this! very valuable for all products that rely on private keys / sensitive info that can't be exposed to server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions