Scarf Gateway provides a very simple redirect layer to track requests through arbitrary URL templates. Follow these instructions to track downloads and requests to your MCP Server.
Step-by-Step Instructions
1. Create a File Package on Scarf
- Navigate to your Scarf dashboard (https://scarf.sh).
- Select "Add Package" → Choose "File Package".
- Enter a descriptive name, e.g. "My MCP Server"
- Select "Use catch-all redirect for target domain". This will ensure all endpoints are supported, as well as any new capabilities are added in the future. Scarf will redirect all of your traffic seamlessly.
- Enter the domain where your MCP server is hosted.
1a. Set up a dedicated custom domain (recommended)
To serve traffic via your own domain rather than a Scarf provided domain(optional but recommended):
- Create a CNAME record in your DNS provider pointing your domain (e.g., mcp.example.com) to the domain provided by Scarf (gateway.scarf.sh).
- Follow the instructions to verify your domain via TXT record.
2. Verify and Test
Once your DNS resolves, your tracked MCP server endpoint will be ready! Try it out through whatever tools you're using, e.g. accessing your server from Cursor. Confirm the response matches the expected output from your original MCP server.
3. Access Analytics and Data
Your Scarf dashboard now tracks usage analytics, giving you:
- Number of requests
- Unique users
- Geo-location insights
- Which companies are engaging
This setup allows you full visibility into MCP server usage, with absolutely no code and transparently routing traffic with minimal overhead.