About LocalDude
A Node.js/TypeScript MCP server for querying InfluxDB time-series data. Its tools support custom Flux queries and retrieval of latest or time-range values for measurements and fields.
Key features
- 01Run custom Flux queries
- 02Retrieve the latest measurement value
- 03Query measurement data over a time range
Use cases
- 01Check the latest recorded sensor value
- 02Inspect sensor readings from a selected period
MCP support
Exposes InfluxDB query tools to MCP clients, including custom Flux queries and latest-value and time-range lookups.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMELocalDude
A Node.js/TypeScript project using the Model Context Protocol (MCP) SDK.
GitHub Repository
This project is hosted on GitHub. To clone the repository:
git clone https://github.com/username/localdude.git
cd localdude
Contributing
We welcome contributions! Please see CONTRIBUTING.md for details on how to contribute to this project.
Installation
npm install
Available Scripts
Development
npm run dev- Starts the application in development mode with auto-rebuild on file changesnpm run dev:server- Starts the server in development mode with auto-rebuild on file changes
Build and Run
npm run build- Compiles TypeScript files to JavaScriptnpm run watch- Compiles TypeScript files in watch mode (without restarting)npm run start- Builds and starts the main applicationnpm run server- Builds and starts the server
Auto-Rebuild Functionality
This project is configured to automatically rebuild and restart when TypeScript files are changed. This is implemented using:
- nodemon: Monitors file changes and triggers rebuilds
- ts-node: Executes TypeScript files directly
The auto-rebuild behavior is configured in nodemon.json, which watches for changes in:
- All
.tsfiles in the root directory - All
.tsfiles in thesrcdirectory (if it exists)
When changes are detected, the application is automatically rebuilt and restarted.
InfluxDB Integration
This project includes integration with InfluxDB for time-series data storage and querying.
Configuration
To use the InfluxDB integration, you need to set up the following environment variables in your .env file:
INFLUXDB_URL=http://localhost:8086
INFLUXDB_TOKEN=your_influxdb_token
INFLUXDB_ORG=your_organization
INFLUXDB_BUCKET=your_bucket
You can copy these from the .env.example file and replace the placeholder values with your actual InfluxDB connection details.
Available InfluxDB Tools
The server provides the following tools for interacting with InfluxDB:
-
influxdb-query: Execute a custom Flux query
{ "query": "from(bucket: \"your_bucket\") |> range(start: -1h) |> filter(fn: (r) => r._measurement == \"your_measurement\")" } -
influxdb-latest: Get the latest data point for a measurement and field
{ "measurement": "your_measurement", "field": "your_field", "timeRange": "-1h" // optional, defaults to "-1h" } -
influxdb-range: Get data within a time range
{ "measurement": "your_measurement", "field": "your_field", "start": "-1h", "stop": "now()" // optional, defaults to "now()" }
These tools can be used through the MCP server interface to query your InfluxDB database.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.