Spotlight

Case Study Microsoft

How Microsoft scaled global content delivery

Find out how Microsoft used Gcore to strengthen delivery across regions.

case study ProSieben GNTM app TOPSHOT

How ProSieben scaled GNTM's app TOPSHOT

Explore how ProSieben brought real-time AI portraits to GNTM's audience.

case study Higgsfield

How Higgsfield scaled AI video generation

See how Gcore helped Higgsfield scale with GPUs and Managed Kubernetes.

case study Fawkes Games

How Fawkes Games stopped DDoS attacks

See how Gcore protected gaming servers from massive DDoS threats without disrupting gameplay.

We're hiring

Help build the next chapter of the web

We're not just filling seats. We're building a team that will write the next chapter of the internet.

  1. Home
  2. Learning
  3. Running an MCP Server at the Edge

Running an MCP Server at the Edge

  • By Gcore
  • August 28, 2026
  • 3 min read
A glowing orange diagram illustrates data flow from client to edge, then to live processing, emphasizing security.

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:

MethodPathPurpose
GET/mcpSSE stream for server events and the handshake
POST/mcpJSON-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:

 

Live demo: The MCP server described in this post is available at fastedge-mcp-1476.fastedge.app. You can test it using any compatible MCP client.

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

Diagram comparing Matchit and Regex for processing web requests, showing Matchit as faster and more efficient.
Routing with Matchit vs RegEx

Choosing the right routing strategy can make a significant difference in your FastEdge application's performance. This guide benchmarks three approaches on WASM.Approach 1: matchitmatchit is a Rust route-recognition library that uses a radi

Diagram showing a centralized KV data store connected to a web browser and global data centers.
Working with Edge KV Storage

This post covers Working with Edge KV Storage — a foundational pattern for stateful edge applications.How It WorksStore and retrieve key-value data at the edge. Perfect for config, feature flags, and session data distributed globally.Edge K

Network diagram illustrating secure data flow from client to edge and live processing.
WebSocket Proxying at the Edge

FastEdge workers aren't limited to just responding to incoming requests — they can also make outbound network requests to external services. This opens up a world of possibilities: aggregating data from multiple APIs, proxying requests to u

Diagram showing edge code securely accessing a secrets vault with authorized access control.
Using Environment Variables and Secrets

Security at the edge means threats are stopped before they reach your infrastructure. By implementing security logic in FastEdge workers, you can validate, filter, and block requests at the closest edge location to the user — providing the

Orange diagram shows data uploading, edge security, and S3 cloud storage.
Upload Files to S3 from the Edge

FastEdge provides distributed edge KV storage that lets you read and write data from any edge location worldwide. Unlike traditional centralized databases, edge KV stores data close to users — reads are served from the nearest PoP, making t

Data flow diagram from user, through secure Edge authentication, to an Origin server.
Token Exchange and Refresh at the Edge

Security at the edge means threats are stopped before they reach your infrastructure. By implementing security logic in FastEdge workers, you can validate, filter, and block requests at the closest edge location to the user — providing the

Subscribe to our newsletter

Get the latest industry trends, exclusive insights, and Gcore updates delivered straight to your inbox.