foundry-maf-custom-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@foundry-maf-custom-mcp@foundry-mcp-custom-ca run the network_diagnostic tool to verify the CA connection"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Custom-CA MCP Hosted Agent test
This workspace proves that a Microsoft Agent Framework Hosted Agent can connect to an MCP server whose TLS certificate is signed by a customer-controlled CA.
The MCP connection runs inside the Hosted Agent process through MCPStreamableHTTPTool. This is different from Foundry's native hosted MCP tool, where Foundry owns the outbound connection and does not expose custom CA configuration.
Project layout
src/contains a stateless Streamable HTTP MCP test server.scripts/generate-test-cert.shcreates disposable localhost TLS material under ignored.certs/.test/validates MCP behavior and TLS rejection/acceptance.custom-ca-mcp-agent/contains the Python Agent Framework Hosted Agent..vscode/contains the F5 workflow for the MCP server, Hosted Agent, and Agent Inspector.
Related MCP server: mcp-secure-remote
Validated behavior
The MCP server's self-signed certificate is rejected under normal system trust.
The same certificate is accepted when explicitly loaded as a trust anchor.
Agent Framework discovers and invokes
network_diagnosticover verified HTTPS.A local Responses Hosted Agent using the Foundry model successfully calls that MCP tool.
Certificate verification is never disabled.
Run locally
Requirements: Node.js 20+, OpenSSL, Python 3.13, Azure CLI authentication, and access to the configured Foundry project and model.
npm install
npm test
npm run build
npm run tls:generatePress F5 and select Debug Custom-CA MCP Hosted Agent. The workflow starts the TLS MCP server, starts the Python agent, and opens Foundry Toolkit Agent Inspector.
For command-line instructions and deployment boundaries, see custom-ca-mcp-agent/README.md.
Deployment boundary
The local test does not prove private DNS, VNet routing, NSGs, or firewall rules. A deployed Hosted Agent needs a reachable private MCP FQDN, matching certificate SAN, customer CA certificate in the agent artifact, and network injection that can reach the server.
Never place an MCP server private key or CA private key in the agent artifact.
References:
This server cannot be deployed
Maintenance
Related MCP Connectors
Experimental MCP server for current empirical verification of explicit public HTTPS endpoint claims.
Authenticated MCP server for ClearPolicy policy and compliance workflows.
Security research canary remote MCP server for owned-account testing.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables remote attestation of MCP servers using Intel SGX and RA-TLS, allowing clients to verify the exact code running on the server.21-
- AlicenseNot gradedqualityCmaintenanceA stdio-to-remote MCP bridge with mTLS client certificate authentication for secure remote MCP server access.8 npmMIT
- FlicenseNot gradedqualityCmaintenanceA configurable OAuth 2.0 authorization server and OAuth-protected MCP server for end-to-end testing of OAuth-protected MCP flows, including failure injection and control plane.-
- AlicenseNot gradedqualityBmaintenanceA test MCP server that validates gateway connectivity, identity propagation, and provides mock tools for testing purposes.Academic Free v1.1