Tracking Usage of Your MCP Server with Scarf
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.
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.
Introducing Scarf's New Pricing Model
Today we are launching a new pricing model for new Scarf accounts going forward, and we'd love your feedback. For customers already on a paid Scarf plan, your billing will not be impacted by this change.
Scarf Go SDK is Now Available
Scarf's Go SDK is now available on GitHub. You can now send telemetry to Scarf from your Golang code more easily than ever, with things like user opt-out being managed for you.
Scarf's GitBook Integration Is Live!
A common request we've received from the Scarf community is that many of you are using GitBook for your docs, which does not directly support a way to embed your Scarf tracking pixel.