Skip to main content

Add your description here

Project description

➡️ attestable-mcp-server

remotely attestable MCP server

Overview

This project contains an MCP Server that is remotely attestable by MCP clients. To achieve this, a trusted execution environment is used, which generates a certificate representing the currently-running code of the attestable-mcp-server. The attestable-mcp-server sends this certificate in the TLS handshake to an MCP client before connecting that proves the code it's running is the same code built on github actions, and can be independently validated by building and running the code locally on emulated hardware or secure hardware; these values will be the same. The protocol used for client <-> server remote attestation is RA-TLS, an extension to TLS that adds machine and code specific measurements that can be verified by an MCP client.

The most important concept behind this RA-TLS certificate is that it embeds an SGX quote in the standardized X.509 extension field with the TCG DICE "tagged evidence" OID, which in turn embeds the SGX report and the complete Intel SGX certificate chain. In addition to the SGX quote, the certificate also contains the evidence claims, with the most important one being the "pubkey-hash" claim that contains the hash of the ephemeral public key (in DER format) generated by the TEE of the memory image of the running MCP server.

Features

  • MCP Clients can remotely attest the code running on any MCP Server
  • MCP Servers can optionally remotely attest MCP Clients

Producing Signed Artifacts

The github action script in this repo runs on a self-hosted github runner inside of a trusted execution environment (TEE). The action script will build a docker container containing the attestable-mcp-server and generate a signed attestation of the code running inside the TEE. This docker image is then signed by github. You can independently generate the same values with or without secure hardware, and query our running server and get the same values.

Dependencies

  • Intel SGX Hardware
  • Gramine
  • python 3.13
  • Ubuntu 22.04
  • Intel SGX SDK & PSW

Quickstart

uv sync
docker build -t attestable-mcp-server .
gramine-sgx-gen-private-key
git clone https://github.com/gramineproject/gsc docker/gsc
cd docker/gsc
uv run ./gsc build-gramine --rm --no-cache -c ../gramine_base.config.yaml gramine_base
uv run ./gsc build -c ../attestable-mcp-server.config.yaml --rm attestable-mcp-server ../attestable-mcp-server.manifest
uv run ./gsc sign-image -c ../attestable-mcp-server.config.yaml  attestable-mcp-server "$HOME"/.config/gramine/enclave-key.pem
uv run ./gsc info-image gsc-attestable-mcp-server

Starting Server on Secure Hardware

docker run -itp --device=/dev/sgx_provision:/dev/sgx/provision  --device=/dev/sgx_enclave:/dev/sgx/enclave -v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket -p 8000:8000 --rm gsc-attestable-mcp-server

Starting Server on local development machine

docker run -p 8000:8000 --rm gsc-attestable-mcp-server

TODO

  • add MCP client demonstrating ra-tls
  • add intel-signed measurements from our github action to this readme for simple independent verification

Future Plans

  • JSON Web Key (JWK) attestation claim validation

cobrowser.xyz

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseep_attestable_mcp_server-0.1.0.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mseep_attestable_mcp_server-0.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file mseep_attestable_mcp_server-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mseep_attestable_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0c96d6c54c8cd81bb1a3174706c77086b614ab6f381ee96c3f4ccf140612843d
MD5 17a56c3ee29c65895f9873b5bc672ac8
BLAKE2b-256 17323dd2a6e2ece5fc58507953b21c0445d3836f0984e4d8df59dc4568cf1a64

See more details on using hashes here.

File details

Details for the file mseep_attestable_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_attestable_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ef9f7a1896ea8411e7f3375e0b9cf39be0603fadf9ee0b72f314a1b29331653
MD5 79def1e5880ec805024ed380354a8056
BLAKE2b-256 12866b5ad2743ed48ec5afa6d9bb1ece631d4dc3626130849f04ad6887d44b12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page