The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context and tools to LLMs. Think of it as a USB-C for AI — a universal interface that lets any LLM client communicate with any tool server without custom integrations.
In this post, we build and deploy a complete MCP server entirely on Gcore FastEdge. No containers, virtual machines, or infrastructure are required. It uses Rust compiled to WebAssembly and runs across more than 160 edge PoPs worldwide.
What Is MCP?
MCP defines how clients, such as Claude Desktop, VS Code extensions, or custom AI applications, discover and invoke tools on a server. The protocol uses JSON-RPC over HTTP with two transport modes:
- stdio — for local subprocess communication, including command-line tools and editor plugins
- Streamable HTTP — for remote servers using HTTP POST and Server-Sent Events
The Streamable HTTP transport is a great fit for edge computing because:
- MCP tools use stateless request-response interactions, so persistent connections are not required
- JSON-RPC over HTTP POST maps directly to the FastEdge request handler
- Sub-millisecond cold starts prevent latency penalties for infrequent calls
- Requests are handled by the geographically nearest edge PoP
The Architecture
Our MCP server exposes a single /mcp endpoint that accepts both GET and POST requests:
| Method | Path | Purpose |
|---|---|---|
| GET | /mcp | SSE stream for server events and the handshake |
| POST | /mcp | JSON-RPC message handler |
For this example, we implement three MCP tools:
- hello — greets the caller with an edge-generated message
- echo — returns the input sent by the caller
- info — returns metadata about the MCP server
Implementation in Rust
The complete source contains approximately 200 lines. Here is the core structure:
The JSON-RPC dispatcher follows the MCP specification:
Deploying to FastEdge
Deployment is a two-step process: upload the WebAssembly binary, and then create or update the FastEdge application.
Once the application is created, it is immediately available at https://fastedge-mcp-NNNN.fastedge.app. The MCP server is then distributed across more than 160 edge PoPs worldwide.
Testing the MCP Server
Any MCP-compatible client can connect to the server. You can also test its endpoints using curl:
Performance
The WebAssembly binary is approximately 254 KB, with much of its size coming from serde_json for JSON-RPC parsing. FastEdge cold starts take less than one millisecond, so even infrequent MCP tool invocations experience almost no startup penalty.
A simple tool call can complete in under 10 milliseconds, including network transit from the nearest edge PoP.
By comparison, running the same server on a container platform could add approximately 200 to 800 milliseconds of cold-start latency per invocation. Running the server at the edge avoids that delay.
What's Next?
This is a minimal example, but it demonstrates the central idea: MCP servers do not need to run on traditional infrastructure. Edge computing is a natural fit for tool servers because it provides:
- Global distribution — tools run close to the client
- Zero infrastructure — no containers, virtual machines, or load balancers
- Sub-millisecond cold starts — WebAssembly starts faster than a traditional container
- Built-in authentication options — add JWT validation at the edge using the techniques in our JWT Auth Gateway post
You can expand this example by adding more tools, connecting to databases through the FastEdge HTTP client, or integrating with the FastEdge KV store for stateful operations.
The edge is your platform.
Related articles
Subscribe to our newsletter
Get the latest industry trends, exclusive insights, and Gcore updates delivered straight to your inbox.










