
Phala x DeMCP: Leveraging TEE for Decentralized MCP network
2025-04-25
Overview
DeMCP is the a decentralized MCP network—a core infrastructure bridging AI and Web3. It offers providers (Agents) a platform to build, deploy, and monetize their own open-source MCP services while also enabling developers to access various large language models (LLMs) in a single place. DeMCP’s built-in crypto payment support (e.g., USDT, USDC) further opens the door to global participation. Through Secure Enclaves (TEE) and a blockchain-based registry, DeMCP aims to redefine the security and reliability of MCP, accelerating innovation for the Agent industry at scale.
In this study, we explore how the defillama-mcp server—a specific service in the DeMCP network—can be deployed within Phala Cloud’s Trusted Execution Environment (TEE). By combining defillama-mcp with Phala Cloud, it’s possible to ensure secure handling of credentials and reliable integration with on-chain data (e.g., DeFi metrics from DefiLlama) for AI-driven applications.
Why DeMCP on Phala Cloud?

- Decentralized MCP Infrastructure: DeMCP’s open MCP services allow developers to quickly deploy or integrate with self-developed solutions. Having a TEE environment during deployment is especially beneficial when dealing with sensitive information or orchestrating commercial services with revenue sharing.
- Security via TEE: Phala Cloud’s TEE isolates server processes from endpoint vulnerabilities, effectively encrypting data in-use. This means API keys, blockchain data, and user credentials remain protected—even if the surrounding environment is compromised.
- Scalability and Trust: Combined with remote attestation and the open-source Dstack SDK from Phala, verifying the authenticity of the infrastructure becomes straightforward. This fosters end-user trust and encourages further adoption of MCP services.
Real-World Use Case: Deploying defillama-mcp
defillama-mcp is a service within the DeMCP network specifically tailored to interact with DefiLlama’s DeFi metrics. Below is how it work with Phala Cloud:
- Setup and Registration: Signed up for Phala Cloud to establish the TEE environment and secure the necessary resources.
- defillama-mcp Configuration: Cloned and configured defillama-mcp with the appropiate parameters and API credentials while sorting sensitive information with in the TEE -encrypted environment.
- Deployment and Attestation: The defillama-mcp server was pushed to Phala Cloud and subjected to remote attestation to ensure it was indeed running within a genuine TEE.
- Integration with AI Workflows: With defillama-mcp active, the service could feed real-time DeFi data into their AI tools—such as analytics dashboards or LLM-based agents—without exposing private credentials or risking data compromise.
Check the MCP information at Phala Cloud MCP Hosting platform.

Observed Advantages
- Seamless Payment Integration: DeMCP’s built-in crypto support simplified global usage, letting both providers and consumers transact in stablecoins.
- End-to-End Security: TEE-based encryption helped maintain privacy around crucial data, reducing the risk of malicious attacks or data leaks.
- Transparent Development: The DeMCP model allows Agents and developers to see what services are deployed, how they’re monetized, and whether they operate within attested TEEs.
- Rapid Deployment: Phala Cloud reduces setup complexity and speeds up release cycles (one-day launches), letting developers quickly iterate on new or updated MCP services.
Conclusion
By hosting key MCP services like defillama-mcp on Phala Cloud, DeMCP solidifies its mission to connect AI and Web3 securely. Developers can confidently deploy open-source MCP solutions in a verifiable TEE, benefit from decentralized payments, and keep sensitive data off-limits to unauthorized parties. As the Agent market matures, this synergy of decentralized infrastructure and hardware-level security stands to become a foundational piece for delivering dependable, scalable AI-Web3 applications.
Get Started with Phala Cloud Today
Ready to secure your crypto wallet with a Crypto Wallet MCP server on Phala Cloud?
Sign up for Phala Cloud, claim your $400 in free credits, and deploy your server today.
Need more help? Explore the Phala Cloud Blog for insights, or join our Telegram chat for support. Dive deeper with our documentation.
Phala Cloud is your partner for secure, scalable crypto wallet development.