mcp-server-axiom-js
Axiom 的 MCP 服务器
官方 Axiom MCP 服务器的 JavaScript 端口,使 AI 代理能够使用 Axiom 处理语言 (APL) 查询数据。
此实现提供与原始 Go 版本相同的功能,但打包为 npm 模块,以便更轻松地与 Node.js 环境集成。
安装与使用
MCP 配置
您可以使用 npx 直接运行此 MCP 服务器。将以下配置添加到您的 MCP 配置文件中:
{
"axiom": {
"command": "npx",
"args": ["-y", "mcp-server-axiom"],
"env": {
"AXIOM_TOKEN": "<AXIOM_TOKEN_HERE>",
"AXIOM_URL": "https://api.axiom.co",
"AXIOM_ORG_ID": "<AXIOM_ORG_ID_HERE>"
}
}
}本地开发和测试
安装
npm install -g mcp-server-axiom环境变量
可以使用环境变量来配置服务器:
AXIOM_TOKEN(必需):您的 Axiom API 令牌AXIOM_ORG_ID(必需):您的 Axiom 组织 IDAXIOM_URL(可选):自定义 Axiom API URL(默认为https://api.axiom.co )AXIOM_QUERY_RATE(可选):每秒查询次数限制(默认值:1)AXIOM_QUERY_BURST(可选):查询突发容量(默认值:1)AXIOM_DATASETS_RATE(可选):每秒数据集列表操作数(默认值:1)AXIOM_DATASETS_BURST(可选):数据集列表突发容量(默认值:1)PORT(可选):服务器端口(默认值:3000)
本地运行服务器
使用环境变量:
export AXIOM_TOKEN=your_token
mcp-server-axiom使用配置文件:
mcp-server-axiom config.jsonconfig.json 示例:
{
"token": "your_token",
"url": "https://custom.axiom.co",
"orgId": "your_org_id",
"queryRate": 2,
"queryBurst": 5,
"datasetsRate": 1,
"datasetsBurst": 2
}Related MCP server: mcp-perplexity
API 端点
GET /:获取服务器实现信息GET /tools:列出可用工具POST /tools/:name/call:调用特定工具可用工具:
queryApl:执行 APL 查询listDatasets:列出可用的数据集
工具调用示例
查询APL:
curl -X POST http://localhost:3000/tools/queryApl/call \
-H "Content-Type: application/json" \
-d '{
"arguments": {
"query": "['logs'] | where ['severity'] == \"error\" | limit 10"
}
}'列出数据集:
curl -X POST http://localhost:3000/tools/listDatasets/call \
-H "Content-Type: application/json" \
-d '{
"arguments": {}
}'执照
麻省理工学院
Available Tools
3 toolsgetDatasetInfoAndSchemaC
Get dataset info and schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset | Yes | The dataset to get info and schema for |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only states what the tool does ('Get dataset info and schema') without explaining behavioral traits such as whether it's a read-only operation, what permissions are needed, how it handles errors, or what format the output takes. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise ('Get dataset info and schema') and front-loaded with the core purpose. It uses minimal words without unnecessary elaboration, though it could be more structured by including key details. Every sentence (here, just one) earns its place by stating the tool's function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (a read operation with one parameter) and the absence of annotations and output schema, the description is incomplete. It doesn't explain what 'info' includes (e.g., metadata, statistics) or the schema format (e.g., JSON, table structure), leaving the agent with insufficient context to use the tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the single parameter 'dataset' documented as 'The dataset to get info and schema for'. The description adds no additional meaning beyond this, as it doesn't elaborate on what constitutes a valid dataset name or provide examples. With high schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool's purpose ('Get dataset info and schema') which is clear but vague. It specifies the verb 'Get' and resource 'dataset info and schema', but doesn't distinguish it from sibling tools like 'listDatasets' or 'queryApl'. The purpose is understandable but lacks specificity about what 'info' includes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of when to use 'getDatasetInfoAndSchema' instead of 'listDatasets' or 'queryApl', nor any context about prerequisites or exclusions. The user must infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
listDatasetsB
List all available Axiom datasets
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('List all available') but doesn't cover critical traits like pagination, rate limits, authentication needs, or what 'available' means (e.g., permissions, status). This leaves significant gaps for a tool that likely interacts with datasets.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with zero waste—'List all available Axiom datasets' directly conveys the core purpose without extraneous details. Every word earns its place, making it highly efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema), the description is minimally adequate but lacks depth. Without annotations or output schema, it should ideally mention return format (e.g., list of dataset names/IDs) or behavioral constraints. It's complete enough for basic understanding but misses contextual nuances.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a baseline high score. It could be a 5 if it explicitly noted the lack of parameters, but the current brevity is sufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('List') and resource ('available Axiom datasets'), making the purpose immediately understandable. It doesn't distinguish from sibling tools like getDatasetInfoAndSchema or queryApl, which prevents a perfect score, but the core functionality is well-defined.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like getDatasetInfoAndSchema (for detailed info) or queryApl (for querying data). It lacks explicit context, prerequisites, or exclusions, leaving the agent to infer usage from tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
queryAplA
Instructions
Query Axiom datasets using Axiom Processing Language (APL). The query must be a valid APL query string.
ALWAYS get the schema of the dataset before running queries rather than guessing. You can do this by getting a single event and projecting all fields.
Keep in mind that there's a maximum row limit of 65000 rows per query.
Prefer aggregations over non aggregating queries when possible to reduce the amount of data returned.
Be selective in what you project in each query (unless otherwise needed, like for discovering the schema). It's expensive to project all fields.
ALWAYS restrict the time range of the query to the smallest possible range that meets your needs. This will reduce the amount of data scanned and improve query performance.
NEVER guess the schema of the dataset. If you don't where something is, use search first to find in which fields it appears.
Examples
Basic:
Filter: ['logs'] | where ['severity'] == "error" or ['duration'] > 500ms
Time range: ['logs'] | where ['_time'] > ago(2h) and ['_time'] < now()
Project rename: ['logs'] | project-rename responseTime=['duration'], path=['url']
Aggregations:
Count by: ['logs'] | summarize count() by bin(['_time'], 5m), ['status']
Multiple aggs: ['logs'] | summarize count(), avg(['duration']), max(['duration']), p95=percentile(['duration'], 95) by ['endpoint']
Dimensional: ['logs'] | summarize dimensional_analysis(['isError'], pack_array(['endpoint'], ['status']))
Histograms: ['logs'] | summarize histogram(['responseTime'], 100) by ['endpoint']
Distinct: ['logs'] | summarize dcount(['userId']) by bin_auto(['_time'])
Search & Parse:
Search all: search "error" or "exception"
Parse logs: ['logs'] | parse-kv ['message'] as (duration:long, error:string) with (pair_delimiter=",")
Regex extract: ['logs'] | extend errorCode = extract("error code ([0-9]+)", 1, ['message'])
Contains ops: ['logs'] | where ['message'] contains_cs "ERROR" or ['message'] startswith "FATAL"
Data Shaping:
Extend & Calculate: ['logs'] | extend duration_s = ['duration']/1000, success = ['status'] < 400
Dynamic: ['logs'] | extend props = parse_json(['properties']) | where ['props.level'] == "error"
Pack/Unpack: ['logs'] | extend fields = pack("status", ['status'], "duration", ['duration'])
Arrays: ['logs'] | where ['url'] in ("login", "logout", "home") | where array_length(['tags']) > 0
Advanced:
Make series: ['metrics'] | make-series avg(['cpu']) default=0 on ['_time'] step 1m by ['host']
Join: ['errors'] | join kind=inner (['users'] | project ['userId'], ['email']) on ['userId']
Union: union ['logs-app*'] | where ['severity'] == "error"
Fork: ['logs'] | fork (where ['status'] >= 500 | as errors) (where ['status'] < 300 | as success)
Case: ['logs'] | extend level = case(['status'] >= 500, "error", ['status'] >= 400, "warn", "info")
Time Operations:
Bin & Range: ['logs'] | where ['_time'] between(datetime(2024-01-01)..now())
Multiple time bins: ['logs'] | summarize count() by bin(['_time'], 1h), bin(['_time'], 1d)
Time shifts: ['logs'] | extend prev_hour = ['_time'] - 1h
String Operations:
String funcs: ['logs'] | extend domain = tolower(extract("://([^/]+)", 1, ['url']))
Concat: ['logs'] | extend full_msg = strcat(['level'], ": ", ['message'])
Replace: ['logs'] | extend clean_msg = replace_regex("(password=)[^&]", "\1**", ['message'])
Common Patterns:
Error analysis: ['logs'] | where ['severity'] == "error" | summarize error_count=count() by ['error_code'], ['service']
Status codes: ['logs'] | summarize requests=count() by ['status'], bin_auto(['_time']) | where ['status'] >= 500
Latency tracking: ['logs'] | summarize p50=percentile(['duration'], 50), p90=percentile(['duration'], 90) by ['endpoint']
User activity: ['logs'] | summarize user_actions=count() by ['userId'], ['action'], bin(['_time'], 1h)
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The APL query to run |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly describes key traits: the query must be a valid APL string, there's a maximum row limit of 65000 rows, performance considerations (e.g., reducing data scanned by restricting time ranges), and cost implications (e.g., 'It's expensive to project all fields'). This goes well beyond the basic input schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is excessively long and poorly structured for a tool definition. It includes extensive examples and patterns that belong in documentation rather than a concise tool description. The front-loaded instructions are useful, but the bulk of the text (examples) adds unnecessary verbosity without earning its place in a tool description meant for AI agents.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of querying datasets with no annotations or output schema, the description is largely complete. It covers purpose, usage, behavioral traits, and parameter semantics thoroughly. However, the lack of output schema means the description doesn't explain return values or result formats, and the over-inclusion of examples reduces focus on core completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage for the single parameter 'query', describing it as 'The APL query to run.' The description adds significant semantic context by explaining what constitutes a valid APL query (e.g., examples of syntax, operators, and patterns) and constraints (e.g., must be valid APL). However, it doesn't explicitly link this to the parameter name or format beyond the examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Query Axiom datasets using Axiom Processing Language (APL).' It specifies the verb ('query'), resource ('Axiom datasets'), and technology ('APL'), distinguishing it from sibling tools like getDatasetInfoAndSchema and listDatasets, which likely retrieve metadata rather than execute queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when and how to use this tool, including prerequisites (e.g., 'ALWAYS get the schema of the dataset before running queries'), best practices (e.g., 'Prefer aggregations over non aggregating queries'), and alternatives (e.g., 'use search first to find in which fields it appears'). It also specifies exclusions like avoiding schema guessing and limiting time ranges.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
getDatasetInfoAndSchema - First observed
listDatasets - First observed
queryApl
TDQS
Scored across 3 tools
The three tools have clearly distinct purposes: listDatasets enumerates available datasets, getDatasetInfoAndSchema retrieves metadata and structure for a specific dataset, and queryApl executes analytical queries. There is no overlap in functionality, making it easy for an agent to select the appropriate tool.
Two tools (listDatasets, getDatasetInfoAndSchema) follow a consistent verb_noun pattern with camelCase, while queryApl uses a different verb style and abbreviation. The deviation is minor, as the naming remains readable and the tools are clearly related to Axiom datasets.
With three tools, this server is well-scoped for its purpose of interacting with Axiom datasets. Each tool serves a distinct and essential function: listing, inspecting, and querying datasets, which covers the core workflows without unnecessary complexity.
The tool surface provides comprehensive coverage for dataset exploration and querying, including listing, metadata retrieval, and advanced querying with APL. A minor gap exists in dataset management operations (e.g., create, update, delete datasets), but the provided tools enable effective data analysis within existing datasets.
Maintenance
Related MCP Connectors
The official MCP Server for the Mux API
Related MCP Servers
- AlicenseBqualityFmaintenanceThis server is a server that installs other MCP servers for you. Install it, and you can ask Claude to install MCP servers hosted in npm or PyPi for you. Requires npx and uv to be installed for node and Python servers respectively.2133 npm1,531MIT
- AlicenseNot gradedqualityCmaintenanceMCP Server for the Perplexity API.54 PyPI67MIT
- AlicenseAqualityFmaintenanceadvance mcp server utilizing Perplexity, without the need for an API key6120 npm97GPL 3.0
- AGPL 3.0