mcp-fractality
Fractality MCP Server
Ask your AI assistant for a signal with a given fractal structure, or hand it a time series and ask what kind of signal it is. The server generates the series, measures it with DFA and multifractal DFA, and returns the numbers.
What it is
MCP (Model Context Protocol) is how
assistants such as Claude and Cursor call outside tools. mcp-fractality is
a small server that exposes two libraries as tools. Connect to it at
mcp.fractality.app, or run it on your own machine:
- generate-fractal-signal makes mono- and multifractal series with a target α, α₁, α₂ or a crossover.
- dfa-variability measures a series with DFA and MFDFA and tests the result against shuffled surrogates.
A language model can't produce a series with a specific scaling exponent by writing numbers out, and it can't reliably estimate one by looking. With these tools it runs the computation instead.
Connect
The server runs at https://mcp.fractality.app/mcp, so there is nothing to
install. When your assistant connects, it opens fractality.app and asks you to sign in
with your Fractality account and allow it. Accounts are by
invitation: request access if you don't have one.
Claude (claude.ai and Claude Desktop)
Open Settings → Connectors → Add custom connector, name it Fractality,
paste https://mcp.fractality.app/mcp as the URL, then click
Connect and sign in.
Claude Code
claude mcp add --transport http fractality https://mcp.fractality.app/mcp
Then type /mcp inside Claude Code, choose fractality and sign in.
Cursor and other clients
{
"mcpServers": {
"fractality": {
"url": "https://mcp.fractality.app/mcp"
}
}
}
With an API token instead of signing in
Create a token on your account page and send it as a header. That suits scripts and clients that can't open a browser, and it has a higher monthly limit:
claude mcp add --transport http fractality https://mcp.fractality.app/mcp \
--header "Authorization: Bearer fr_..."
In a JSON config, add "headers": { "Authorization": "Bearer fr_..." } next to "url".
Monthly limits
| Connected by | Tool calls a month |
|---|---|
| Signing in | 20 free calls |
| API token | 1000 calls |
Calls are counted per account and per server (this one and
natural.fractality.app each have their own count), and the count
starts again on the first of the month. list_signal_types is free. Your
account page shows what you have used. When the limit is
reached, the tool says so and your assistant can tell you. The local server has no
limit.
Run it locally
You need Node.js 18 or later. The server runs on your machine over stdio, with no account and no limit on calls, and it can read and write files.
Claude Code
claude mcp add fractality -- npx -y mcp-fractality
Check that it's connected with claude mcp list, or type
/mcp inside Claude Code.
Claude Desktop, Cursor and other clients
Add this to the client's MCP config file (claude_desktop_config.json,
.cursor/mcp.json and so on), then restart the client:
{
"mcpServers": {
"fractality": {
"command": "npx",
"args": ["-y", "mcp-fractality"]
}
}
}
From GitHub, without npm
claude mcp add fractality -- npx -y github:noduslabs/mcp-fractality
From a local clone
git clone https://github.com/noduslabs/mcp-fractality && cd mcp-fractality && npm install
claude mcp add fractality -- node "$(pwd)/bin/mcp-fractality.js"
Tools
| Tool | What it does |
|---|---|
generate_fractal_signal |
Generates a series with a target α (global, α₁ or α₂), an α₁/α₂ crossover, or a multifractal width. Returns the measured exponents, labels, warnings and the series. |
analyze_dfa |
Measures α, α₁ and α₂ of a series, labels it (white noise, correlated, 1/f, strongly correlated, Brownian) and adds SDNN, RMSSD and PNN50. |
analyze_multifractal |
MFDFA: h(q) curves, multifractal width, and a monofractal / weak / multifractal verdict tested against shuffled surrogates. |
list_signal_types |
The named presets (Aleatory 0.5, Stationary 0.75, Fractal 1, Gradient 1.5) and the generator's practical limits. |
Things to ask
- Generate 512 points of pink noise between 600 and 1200.
- Make a 1024-point signal with α₁ = 1.2 and α₂ = 0.6.
- Generate a multifractal series with width 0.5 and check that MFDFA agrees.
- Here are my RR intervals in ms. What kind of signal is it, and how do α₁ and α₂ compare?
Passing series in and out
On mcp.fractality.app series only go in and out inline, up to 16,384
points, because a shared server can't see your files. The local server also reads and
writes files, as below.
In. The analysis tools take series (an array of numbers)
or filePath. A file can be a JSON array, a JSON object with
timeSeries, series, data or values,
a CSV or TSV, or one number per line. For a file with several columns, set
column to a name or a 0-based index.
Out. Series up to maxInlinePoints (1000 by default) come
back inline. Longer ones are written to outputFile, or to a temp file if
you don't give one, and the tool returns the path. That keeps long signals out of the
model's context. A .csv file gets index,value rows, a
.json file gets { timeSeries, generatedWith }, and any other
extension gets one value per line.
Limits
- The useful α range is about 0.2 to 1.7. Above that, DFA saturates on short series.
- α₂ needs about 256 points or more. Crossover and multifractal targets work best at 1024 or more.
- A multifractal width of 0.4 or more comes out significant on 1024 points. Around 0.2 it can't be told apart from finite-size noise.
When one of these applies, the tool says so in the warnings of its result.