Atlas / MCP servers / amplitude / @amplitude/mcp-analytics

@amplitude/mcp-analyticsSAFE

mcp/amplitude/amplitude-mcp-analytics-node

Amplitude MCP Analytics SDK - MCP tracking for Amplitude Analytics. :sparkles: :calendar: Book a session with us :arrow_down:

Verdict
SAFE
Grade
B
Trust score
87 /100
Exposed tools
8 8r · 0w · 0d
Transport
stdio · streamable-http
License
—
Stars
11
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

Amplitude MCP Analytics SDK — Model Context Protocol server usage tracking for Amplitude Analytics.

Status: Preview. Server and tool instrumentation, the default event set, identity resolution, and custom events are available now. Transport and correlation handling (stdio and Streamable HTTP, across protocol revisions) is handled for you under the hood.

Install

There are two ways to set up: let a coding agent do it, or follow this README manually.

Option 1 — agent-assisted Install the `instrument-mcp-server` skill (part of the builder-skills engineering-skills plugin) and ask your agent to instrument your MCP server — it walks through this README for you, plus the recommended rationale and UTM steps.

Option 2 — manual

pnpm add @amplitude/mcp-analytics @amplitude/analytics-node @modelcontextprotocol/sdk

@amplitude/analytics-node and @modelcontextprotocol/sdk are peer dependencies — your MCP server already depends on the latter. Any @modelcontextprotocol/sdk from 1.14.0 up is supported, including versions 1.21.0+, which changed how McpServer reports a failed tools/call; the default events mean the same thing across that whole range.

Quick start

import { createMcpAnalytics } from '@amplitude/mcp-analytics';

const analytics = createMcpAnalytics({
apiKey: process.env.AMPLITUDE_API_KEY!,
serverName: 'my-mcp-server',
serverVersion: '1.0.0',
});

// Bind the server (enables analytics + emits connection events), then wrap your
// tool handlers. Order matters: instrumentServer() must run before connect().
analytics.instrumentServer(server, { authType: 'oauth' });

server.tool(
'search_docs',
schema,
analytics.instrumentTool(
async (args, extra) => doSearch(args), // your handler, unchanged
{ name: 'search_docs'
Read from source at commit c4afb25e31f0OBSERVED · 2026-10-12
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add mcp-analytics --env AMPLITUDE_API_KEY=${AMPLITUDE_API_KEY} -- npx -y @amplitude/[email protected]
claude-desktop
{
  "mcpServers": {
    "mcp-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "@amplitude/[email protected]"
      ],
      "env": {
        "AMPLITUDE_API_KEY": "${AMPLITUDE_API_KEY}"
      }
    }
  }
}
03

Exposed tools (8)

8 read · 0 write · 0 destructive.

ToolRiskDescription
echoreadReturn the message you were given. Include rationale when you know why you are calling this tool.
failsread
legacyread
offread
pingread
searchread
uninstrumentedread
whoamireadReport the playground user id and attach it to analytics for this call.
04

Trust audit

SAFEgrade B · trust 87/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (2 observation(s))
Network
none-observed
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (15)

LOWInventory / provenance · inv.hidden_file · CWE-1104
.release-please-manifest.json
.release-please-manifest.json
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.no_license · CWE-1104
Why it matters. no LICENSE file and no repo licence
Fix. add a licence
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
src/core/identity.ts:80
const hash = createHash('sha1').update(nsBytes).update(name).digest();
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
test/identity.test.ts:57
const wrong = createHash('sha1').update(DNS).update('python.org').digest();
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
examples/playground/server.ts:6
import { createMcpAnalytics, type AmplitudeMCPAnalytics } from '../../src/client.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
examples/playground/server.ts:7
import type { AmplitudeClientLike } from '../../src/types.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
examples/playground/server.ts:201
const path = fileURLToPath(new URL('../../package.json', import.meta.url));
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
src/core/delivery/hooks.ts:13
import type { MCPAnalyticsConfig } from '../../config.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
src/core/delivery/hooks.ts:14
import type { AmplitudeClientLike, AmplitudeEvent } from '../../types.js';
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
examples/playground/README.md:42
It listens on `http://127.0.0.1:8787/mcp`.
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
examples/playground/README.md:52
"url": "http://127.0.0.1:8787/mcp"
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
examples/playground/http.ts:44
const pathname = new URL(req.url ?? '/', 'http://127.0.0.1').pathname;
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
examples/playground/http.ts:61
const url = new URL(`http://127.0.0.1:${address.port}${PLAYGROUND_HTTP_PATH}`);
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
examples/playground/sink.ts:44
serverUrl: `http://127.0.0.1:${address.port}/2/httpapi`,
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@types/node, fast-check
Why it matters. 2 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: no_behavioural_pass, no_license.

Audited 2026-10-12 · audit v0.4.1 · source sha c4afb25e31f0full audit observations/trust-audit/mcp-server/amplitude__amplitude-mcp-analytics-node.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-12c4afb25e31f0SAFEB87first audit
06

Questions

What is the @amplitude/mcp-analytics MCP server?

Amplitude MCP Analytics SDK - MCP tracking for Amplitude Analytics. :sparkles: :calendar: Book a session with us :arrow_down:

What tools does @amplitude/mcp-analytics expose?

8 in total: 8 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is @amplitude/mcp-analytics safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (87/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.

What credentials does @amplitude/mcp-analytics need?

It reads AMPLITUDE_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does @amplitude/mcp-analytics run?

It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @amplitude/mcp-analytics at 0.5.2.

How current is this page?

The grade is for one exact copy of the source (c4afb25e31f0), read on 2026-10-12. The repository is watched and re-audited when it changes.

Advertisement