This MCP Server for Axiom is a JavaScript port of the official Axiom MCP server that helps AI agents query data using Axiom Processing Language (APL). It's packaged as an npm module for easy integration with Node.js environments.
You can run the MCP server directly using npx by adding the following configuration to your MCP configuration file:
{
"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>"
}
}
}
You can also install the package globally:
npm install -g mcp-server-axiom
The server can be configured using these environment variables:
AXIOM_TOKEN
(required): Your Axiom API tokenAXIOM_ORG_ID
(required): Your Axiom organization IDAXIOM_URL
(optional): Custom Axiom API URL (defaults to https://api.axiom.co)AXIOM_QUERY_RATE
(optional): Queries per second limit (default: 1)AXIOM_QUERY_BURST
(optional): Query burst capacity (default: 1)AXIOM_DATASETS_RATE
(optional): Dataset list operations per second (default: 1)AXIOM_DATASETS_BURST
(optional): Dataset list burst capacity (default: 1)PORT
(optional): Server port (default: 3000)export AXIOM_TOKEN=your_token
export AXIOM_ORG_ID=your_org_id
mcp-server-axiom
Create a config.json file:
{
"token": "your_token",
"url": "https://custom.axiom.co",
"orgId": "your_org_id",
"queryRate": 2,
"queryBurst": 5,
"datasetsRate": 1,
"datasetsBurst": 2
}
Then run:
mcp-server-axiom config.json
The server exposes the following endpoints:
GET /
: Server implementation informationGET /tools
: List of available toolsPOST /tools/:name/call
: Execute a specific toolThe server provides two main tools:
You can execute APL queries using the queryApl tool:
curl -X POST http://localhost:3000/tools/queryApl/call \
-H "Content-Type: application/json" \
-d '{
"arguments": {
"query": "['logs'] | where ['severity'] == \"error\" | limit 10"
}
}'
To retrieve all available datasets:
curl -X POST http://localhost:3000/tools/listDatasets/call \
-H "Content-Type: application/json" \
-d '{
"arguments": {}
}'
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.