GoatCounter MCP Server for Vercel AI SDKGive Vercel AI SDK instant access to 14 tools to Count Hits, Create Site, Download Export, and more
The Vercel AI SDK is the TypeScript toolkit for building AI-powered applications. Connect GoatCounter through Vinkius and every tool is available as a typed function. ready for React Server Components, API routes, or any Node.js backend.
Ask AI about this MCP Server for Vercel AI SDK
The GoatCounter MCP Server for Vercel AI SDK is a standout in the Productivity category — giving your AI agent 14 tools to work with, ready to go from day one.
Vinkius delivers Streamable HTTP and SSE to any MCP client
import { createMCPClient } from "@ai-sdk/mcp";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
async function main() {
const mcpClient = await createMCPClient({
transport: {
type: "http",
// Your Vinkius token. get it at cloud.vinkius.com
url: "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
},
});
try {
const tools = await mcpClient.tools();
const { text } = await generateText({
model: openai("gpt-4o"),
tools,
prompt: "Using GoatCounter, list all available capabilities.",
});
console.log(text);
} finally {
await mcpClient.close();
}
}
main();
* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
About GoatCounter MCP Server
Connect your GoatCounter account to any AI agent to monitor your web traffic without compromising user privacy. This MCP server allows you to query detailed statistics, manage site configurations, and handle data exports through natural conversation.
The Vercel AI SDK gives every GoatCounter tool full TypeScript type inference, IDE autocomplete, and compile-time error checking. Connect 14 tools through Vinkius and stream results progressively to React, Svelte, or Vue components. works on Edge Functions, Cloudflare Workers, and any Node.js runtime.
What you can do
- Traffic Insights — Retrieve pageview counts, total hits, and referral statistics for specific paths.
- Visitor Analytics — Break down stats by categories such as browsers, operating systems, locations, and languages.
- Data Portability — Initiate, monitor, and download full CSV/JSON data exports for external analysis.
- Site Management — List all your registered sites, create new ones, or update existing site configurations.
- Custom Event Tracking — Send hits or events directly from your backend or middleware to your GoatCounter dashboard.
The GoatCounter MCP Server exposes 14 tools through the Vinkius. Connect it to Vercel AI SDK in under two minutes — credentials fully managed, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
All 14 GoatCounter tools available for Vercel AI SDK
When Vercel AI SDK connects to GoatCounter through Vinkius, your AI agent gets direct access to every tool listed below — spanning web-analytics, privacy-focused, traffic-monitoring, and more. Every call runs in a secure, isolated environment with full audit visibility. Beyond a simple connection, you get real-time monitoring of agent activity, enterprise governance, and optimized token usage.
Count hits on GoatCounter
Send pageviews or events to GoatCounter
Create site on GoatCounter
Create a new site
Download export on GoatCounter
Download a completed export file
Get export on GoatCounter
Get export status and metadata
Get me on GoatCounter
Get current user and API key info
Get site on GoatCounter
Detailed information about a site
Get stats hits on GoatCounter
Overview of pageviews per path
Get stats hits path on GoatCounter
Referral statistics for a specific path
Get stats page on GoatCounter
Stats for specific categories (browsers, systems, etc)
Get stats page detail on GoatCounter
g., browser versions). Detailed stats for a specific item in a category
Get stats total on GoatCounter
Total pageview counts for a date range
List sites on GoatCounter
List all sites accessible by the user
Start export on GoatCounter
Returns an export ID to check status. Start a new data export in the background
Update site on GoatCounter
Update site settings
Connect GoatCounter to Vercel AI SDK via MCP
Follow these steps to wire GoatCounter into Vercel AI SDK. The entire setup takes under two minutes — your credentials stay safe behind Vinkius.
Install dependencies
npm install @ai-sdk/mcp ai @ai-sdk/openaiReplace the token
[YOUR_TOKEN_HERE] with your Vinkius tokenRun the script
agent.ts and run with npx tsx agent.tsExplore tools
Why Use Vercel AI SDK with the GoatCounter MCP Server
Vercel AI SDK provides unique advantages when paired with GoatCounter through the Model Context Protocol.
TypeScript-first: every MCP tool gets full type inference, IDE autocomplete, and compile-time error checking out of the box
Framework-agnostic core works with Next.js, Nuxt, SvelteKit, or any Node.js runtime. same GoatCounter integration everywhere
Built-in streaming UI primitives let you display GoatCounter tool results progressively in React, Svelte, or Vue components
Edge-compatible: the AI SDK runs on Vercel Edge Functions, Cloudflare Workers, and other edge runtimes for minimal latency
GoatCounter + Vercel AI SDK Use Cases
Practical scenarios where Vercel AI SDK combined with the GoatCounter MCP Server delivers measurable value.
AI-powered web apps: build dashboards that query GoatCounter in real-time and stream results to the UI with zero loading states
API backends: create serverless endpoints that orchestrate GoatCounter tools and return structured JSON responses to any frontend
Chatbots with tool use: embed GoatCounter capabilities into conversational interfaces with streaming responses and tool call visibility
Internal tools: build admin panels where team members interact with GoatCounter through natural language queries
Example Prompts for GoatCounter in Vercel AI SDK
Ready-to-use prompts you can give your Vercel AI SDK agent to start working with GoatCounter immediately.
"Show me the total pageview counts for the last 30 days."
"List all the sites registered in my GoatCounter account."
"Get detailed stats for browser versions used by my visitors."
Troubleshooting GoatCounter MCP Server with Vercel AI SDK
Common issues when connecting GoatCounter to Vercel AI SDK through Vinkius, and how to resolve them.
createMCPClient is not a function
npm install @ai-sdk/mcpGoatCounter + Vercel AI SDK FAQ
Common questions about integrating GoatCounter MCP Server with Vercel AI SDK.
How does the Vercel AI SDK connect to MCP servers?
createMCPClient from @ai-sdk/mcp and pass the server URL. The SDK discovers all tools and provides typed TypeScript interfaces for each one.Can I use MCP tools in Edge Functions?
Does it support streaming tool results?
useChat and streamText that handle tool calls and display results progressively in the UI.Explore More MCP Servers
View all →
Workast
12 toolsManage projects, tasks, and team collaboration with AI directly in your workflow.

Docparser
10 toolsEquip your AI agent to extract data from documents, manage parsers, and track extraction results via the Docparser API.

Box
7 toolsManage files, folders, collaborations, and metadata on Box — the enterprise cloud content management platform.

Codecov
8 toolsManage test coverage and engineering metrics via Codecov — track coverage reports, monitor commit totals, and audit code quality directly from any AI agent.
