@kieksme/swetrix-admin-mcp
v1.3.1
Published
MCP server for the Swetrix Admin API – manages projects, funnels, annotations, views and organisations
Maintainers
Readme
@kieksme/swetrix-admin-mcp
MCP server for the Swetrix Admin API — 34 tools for managing projects, funnels, annotations, views, and organisations.
Note: All tools require a valid
SWETRIX_API_KEY. This server performs write operations — use with care.
Installation
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"swetrix-admin": {
"command": "npx",
"args": ["-y", "@kieksme/swetrix-admin-mcp"],
"env": {
"SWETRIX_API_KEY": "your-api-key",
"SWETRIX_API_BASE_URL": "https://analytics.example.com"
}
}
}
}Claude Code
claude mcp add swetrix-admin -e SWETRIX_API_KEY=your-key -e SWETRIX_API_BASE_URL=https://analytics.example.com -- npx -y @kieksme/swetrix-admin-mcpEnvironment variables
| Variable | Required | Description |
|---|---|---|
| SWETRIX_API_KEY | Yes | Your Swetrix API key (Account Settings → API keys) |
| SWETRIX_API_BASE_URL | No | Custom API base URL for self-hosted Swetrix (default: https://api.swetrix.com) |
HTTP transport
By default the server communicates over stdio, as used above. It can instead be run as a standalone HTTP server speaking the MCP Streamable HTTP transport — useful for remote/containerized deployments.
| Variable | Required | Description |
|---|---|---|
| MCP_TRANSPORT | No | Set to http to enable the HTTP transport (default: stdio) |
| PORT | No | Port to listen on in HTTP mode (default: 3000) |
| MCP_HTTP_ENDPOINT | No | Path the server listens on in HTTP mode (default: /mcp) |
| MCP_HTTP_AUTH_TOKEN | Yes, in HTTP mode | Bearer token clients must send; the server refuses to start without it |
MCP_TRANSPORT=http PORT=3000 MCP_HTTP_AUTH_TOKEN=change-me SWETRIX_API_KEY=your-key node dist/index.jsEvery request must include Authorization: Bearer <MCP_HTTP_AUTH_TOKEN>; requests without a valid token receive 401 Unauthorized.
curl -X POST http://localhost:3000/mcp \
-H "Authorization: Bearer change-me" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"0.0.0"}}}'Docker
docker build -f packages/swetrix-admin-mcp-server/Dockerfile -t swetrix-admin-mcp:http .
docker run --rm -p 3000:3000 \
-e SWETRIX_API_KEY=your-key \
-e MCP_HTTP_AUTH_TOKEN=change-me \
swetrix-admin-mcp:httpNote: the build context is the repository root (this is a pnpm workspace).
Pre-built images are also published to the GitHub Container Registry on every
release, tagged with the released package version and latest:
docker pull ghcr.io/kieksme/swetrix-admin-mcp:latestTools
Projects
| Tool | Description |
|---|---|
| swetrix_list_projects | List all projects for the authenticated user |
| swetrix_get_project | Get details for a single project |
| swetrix_create_project | Create a new project |
| swetrix_update_project | Update project name, settings, or configuration |
| swetrix_delete_project | Delete a project permanently |
| swetrix_pin_project | Pin a project to the top of the dashboard |
| swetrix_unpin_project | Unpin a project |
| swetrix_assign_project_org | Assign a project to an organisation |
Funnels
| Tool | Description |
|---|---|
| swetrix_list_funnels | List all funnels for a project |
| swetrix_create_funnel | Create a new conversion funnel with ordered steps |
| swetrix_update_funnel | Update funnel name or steps |
| swetrix_delete_funnel | Delete a funnel |
Annotations
| Tool | Description |
|---|---|
| swetrix_list_annotations | List all annotations for a project |
| swetrix_create_annotation | Add a dated annotation to the traffic timeline |
| swetrix_update_annotation | Edit an annotation's text or date |
| swetrix_delete_annotation | Delete an annotation |
Views
| Tool | Description |
|---|---|
| swetrix_list_views | List saved dashboard views for a project |
| swetrix_get_view | Get a specific saved view |
| swetrix_create_view | Create a new saved view with filters and settings |
| swetrix_update_view | Update a saved view |
| swetrix_delete_view | Delete a saved view |
Organisations
| Tool | Description |
|---|---|
| swetrix_list_organisations | List all organisations the user belongs to |
| swetrix_get_organisation | Get details for a specific organisation |
| swetrix_create_organisation | Create a new organisation |
| swetrix_update_organisation | Update organisation name or settings |
| swetrix_delete_organisation | Delete an organisation |
| swetrix_invite_org_member | Invite a user to an organisation by email |
| swetrix_update_org_member | Change a member's role within the organisation |
| swetrix_remove_org_member | Remove a member from an organisation |
Example prompts
- "List all my Swetrix projects."
- "Create a new project called
Marketing Site." - "Add a funnel for the checkout flow:
/cart→/checkout→/thank-you." - "Annotate project
abc123on 2025-01-15 withLaunched new homepage." - "Invite
[email protected]to organisationmy-orgas a viewer."
License
GPL-3.0-only — see LICENSE
