agnost weekly downloads statistics
By agnostai · npm · MCP servers
Agnost AI SDK for MCP servers: sends tool calls, errors and latency to Agnost AI, which monitors AI agents in production.
agnost has 47,552 recorded weekly downloads on npm, a decrease of 40.9% over the past 30 days, ranking #804 of 3,247 tracked listings.
About agnost
Agnost AI SDK for MCP servers (TypeScript)
Send your MCP server's tool calls, errors and latency to Agnost AI, which monitors AI agents in production: chat agents, voice agents, copilots and MCP servers.
Installation
npm install agnost @modelcontextprotocol/sdk
Requires Node.js 20 or newer and @modelcontextprotocol/sdk 1.x. Works with
both McpServer and the low-level Server, over stdio or Streamable HTTP.
Ships ES module and CommonJS builds with type definitions. For conversations
outside MCP, use the agnostai
conversation SDK.
Setup Example
import { trackMCP, createConfig } from 'agnost';
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
// Create your MCP server instance
const server = new Server(
{
name: "my-server",
version: "1.0.0"
},
{
capabilities: {
tools: {}
}
}
);
// Configure analytics
const config = createConfig({
endpoint: "https://api.agnost.ai",
disableInput: false,
disableOutput: false
});
// Enable analytics tracking (instruments the server in place)
trackMCP(server, "your-project-id", config);
Tool-call events are sent on a background queue. Before the process exits, deliver anything still queued:
import { analytics } from 'agnost';
process.on('SIGTERM', async () => {
await analytics.cleanup();
process.exit(0);
});
Runnable stdio and Streamable HTTP servers are in examples/.
Configuration Example
import { trackMCP, createConfig } from 'agnost';
// Create a custom configuration
const config = createConfig({
endpoint: "https://api.agnost.ai",
disableInput: false, // Set to true to disable input tracking
disableOutput: false, // Set to true to disable output tracking
disableError: false, // When disableOutput is true, errors are still recorded
// unless this is also set to true
disableLogs: false // Set to true to completely disable all SDK logs
});
// Apply the configuration
trackMCP(
server,
"your-project-id",
config
);
Disabling All Logs
To completely disable all SDK logs (including error logs), you can use the disableLogs option:
import { trackMCP, createConfig } from 'agnost';
// Configuration with all logs disabled
const config = createConfig({
endpoint: "https://api.agnost.ai",
disableLogs: true // This will disable ALL SDK logs
});
trackMCP(server, "your-project-id", config);
Alternatively, you can use environment variables:
# Disable all logs via environment variable
export AGNOST_DISABLE_LOGS=true
# Or control log level (debug, info, warning, error)
export AGNOST_LOG_LEVEL=error
To configure everything from the environment, use configureFromEnv(). It
reads AGNOST_PROJECT_ID (required; it throws without it), AGNOST_ENDPOINT,
AGNOST_DISABLE_INPUT, AGNOST_DISABLE_OUTPUT, AGNOST_DISABLE_ERROR and
AGNOST_DISABLE_LOGS:
import { configureFromEnv, trackMCP } from 'agnost';
const { projectId, config } = configureFromEnv();
trackMCP(server, projectId, config);
User Identification
The SDK supports user identification to track analytics per user. This is especially useful for understanding usage patterns across different users and roles.
Basic User Identification
import { trackMCP, createConfig } from 'agnost';
// Enable user identification
trackMCP(server, 'your-project-id', {
// .. other config like disableInput, disableOutput
identify: (request, env) => ({
userId: request?.headers?.['x-user-id'] || env?.USER_ID || 'anonymous',
email: request?.headers?.['x-user-email'] || env?.USER_EMAIL,
role: request?.headers?.['x-user-role'] || env?.USER_ROLE || 'user'
})
});
Advanced User Identification
import { trackMCP, createConfig } from 'agnost';
// Complex identification logic with async operations
trackMCP(server, 'your-project-id', {
identify: async (request, env) => {
try {
// Extract token from headers
const token = request?.headers?.['authorization']?.replace('Bearer ', '');
if (!token) {
return { userId: 'anonymous' };
}
// You could validate token and fetch user info
// const userInfo = await validateTokenAndGetUser(token);
// Return user identity with custom fields
return {
userId: 'user-123',
email: 'user@example.com',
role: 'admin',
organization: 'acme-corp',
subscription: 'premium'
};
} catch (error) {
console.warn('User identification failed:', error);
return { userId: 'anonymous' };
}
}
});
User Identity Interface
The identify function should return a UserIdentity object or null:
interface UserIdentity {
userId: string; // Required: Unique user identifier
[key: string]: any; // Optional: Any additional user properties
}
type IdentifyFunction = (
request?: any, // MCP request object with headers, params, etc.
env?: Record<string, string | undefined> // Environment variables (process.env)
) => UserIdentity | null | Promise<UserIdentity | null>;
Identify Function Parameters
-
request: The incoming MCP request object containing:headers: HTTP-style headers (e.g.,x-user-id,authorization)params: Request parameters including tool name and arguments- Other request metadata from the MCP protocol
-
env: Environment variables fromprocess.env, useful for:- Reading user info from environment variables
- Accessing configuration secrets
- Getting deployment-specific user context…
Description from the npm listing.
- agnost
- mcp
- model-context-protocol
- mcp-server
- ai-agents
- agent-monitoring
- llm-observability
- observability
- opentelemetry
- tool-calls
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm MCP servers plugins
All 20 agnost alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/agnost. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.