diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7707d35 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use the official Golang image to create a build artifact. +FROM golang:1.21 as builder + +# Set the Current Working Directory inside the container +WORKDIR /app + +# Copy go mod and sum files +COPY go.mod go.sum ./ + +# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed +RUN go mod download + +# Copy the source from the current directory to the Working Directory inside the container +COPY . . + +# Build the Go app +RUN go build -o axiom-mcp + +# Start a new stage from scratch +FROM debian:bookworm-slim + +# Set environment variables +ENV AXIOM_TOKEN=xaat-your-token +ENV AXIOM_URL=https://api.axiom.co +ENV AXIOM_ORG_ID=your-org-id +ENV AXIOM_QUERY_RATE=1 +ENV AXIOM_QUERY_BURST=1 +ENV AXIOM_DATASETS_RATE=1 +ENV AXIOM_DATASETS_BURST=1 + +# Set the Current Working Directory inside the container +WORKDIR /app + +# Copy the Pre-built binary file from the previous stage +COPY --from=builder /app/axiom-mcp . + +# Command to run the executable +ENTRYPOINT ["./axiom-mcp"] \ No newline at end of file diff --git a/README.md b/README.md index 50a08cf..eef6dfd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # mcp-server-axiom +[![smithery badge](https://smithery.ai/badge/axiom-mcp)](https://smithery.ai/server/axiom-mcp) + A [Model Context Protocol](https://modelcontextprotocol.io/) server implementation for [Axiom](https://axiom.co) that enables AI agents to query your data using Axiom Processing Language (APL). ## Status @@ -13,6 +15,14 @@ No support for MCP [resources](https://modelcontextprotocol.io/docs/concepts/res ## Installation +### Installing via Smithery + +To install Axiom MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/axiom-mcp): + +```bash +npx -y @smithery/cli install axiom-mcp --client claude +``` + ### Releases Download the latest built binary from the [releases page](https://github.com/axiomhq/axiom-mcp/releases). diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..376f687 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,36 @@ +# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - axiomToken + - axiomUrl + properties: + axiomToken: + type: string + description: The token for Axiom API. + axiomUrl: + type: string + description: The Axiom API URL. + axiomOrgId: + type: string + description: The organization ID for Axiom. + axiomQueryRate: + type: number + description: Query rate limit per second. + axiomQueryBurst: + type: number + description: Query burst limit. + axiomDatasetsRate: + type: number + description: Datasets rate limit per second. + axiomDatasetsBurst: + type: number + description: Datasets burst limit. + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({command: './axiom-mcp', env: {AXIOM_TOKEN: config.axiomToken, AXIOM_URL: config.axiomUrl, AXIOM_ORG_ID: config.axiomOrgId, AXIOM_QUERY_RATE: config.axiomQueryRate.toString(), AXIOM_QUERY_BURST: config.axiomQueryBurst.toString(), AXIOM_DATASETS_RATE: config.axiomDatasetsRate.toString(), AXIOM_DATASETS_BURST: config.axiomDatasetsBurst.toString()}}) \ No newline at end of file