
Semantic Frame
io.github.Anarkitty1Published by GitHub account Anarkitty1v0.2.1Updated Nov 3, 2026
Token-efficient semantic compression for numerical data. 95%+ token reduction.
Overview
Compresses numerical data series into short natural-language summaries so an assistant can reason about trends, volatility and anomalies without raw data.
- What you can do
- Analyze a single numerical series and return a short narrative with trend, volatility, anomalies, seasonality, distribution, step changes and data quality
- Analyze several series or all numeric columns of a DataFrame in one call
- Return structured JSON output instead of prose for downstream use
- Run trading-oriented analyses: drawdown, performance metrics, rankings, windows, market regime and allocation suggestions
- When to use it
- Useful when an assistant needs to interpret large numeric datasets, such as metrics, sensor readings, sales figures or price series, while keeping the context window small and avoiding arithmetic guesswork. Also relevant for agent workflows that need deterministic statistics summarized in text.
- Requirements
- Runs locally as a Python package installed with pip or uv, with the mcp extra for the server. No accounts, API keys or environment variables are declared. The README shows launching it through uvx or mcp run.
Installation
In SourceWeft
- Open Semantic Frame in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Semantic Frame
[MCP Registry] [PyPI version] [License: MIT]
Token-efficient semantic compression for numerical data.
Semantic Frame converts raw numerical data (NumPy, Pandas, Polars) into natural language descriptions optimized for LLM consumption. Instead of sending thousands of data points to an AI agent, send a 50-word semantic summary.
The Problem
LLMs are terrible at arithmetic. When you send raw data like [100, 102, 99, 101, 500, 100, 98] to GPT-4 or Claude:
- Token waste: 1000 data points = ~2000 tokens
- Hallucination risk: LLMs guess trends instead of calculating them
- Context overflow: Large datasets fill the context window
The Solution
Semantic Frame provides deterministic analysis using NumPy, then translates results into token-efficient narratives:
Output:
Result: 95%+ token reduction, zero hallucination risk.
Installation
Or with uv:
🤖 Claude Integration (MCP)
Semantic Frame is available on the official MCP Registry, enabling direct integration with Claude.
Claude Code CLI:
Claude Desktop - Add to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Once configured, Claude can use these tools:
describe_data- Analyze a single data seriesdescribe_batch- Analyze multiple series at oncedescribe_json- Get structured JSON output
Quick Start
Analyze a Series
Analyze a DataFrame
Get Structured Output
JSON Output for APIs
Supported Data Types
- NumPy:
np.ndarray - Pandas:
pd.Series,pd.DataFrame - Polars:
pl.Series,pl.DataFrame - Python:
list
Analysis Features
LLM Integration
System Prompt Injection
LangChain Tool Output
Multi-Column Agent Context
Framework Integrations
Anthropic Claude (Native Tool Use)
LangChain
CrewAI
MCP (Model Context Protocol)
Run the MCP server:
Exposes describe_data tool for MCP clients like:
- ElizaOS: TypeScript-based agent framework
- Claude Desktop: Anthropic's desktop app
- Claude Code: Anthropic's CLI for Claude
- Any MCP-compatible client
Claude Code
Add Semantic Frame as a native tool in Claude Code:
Once configured, ask Claude to analyze data and it will use the describe_data tool automatically.
Advanced Tool Use (Beta)
Semantic Frame supports Anthropic's Advanced Tool Use features for efficient tool orchestration in complex agent workflows.
Features
Quick Start (Advanced)
Configuration Options
MCP Batch Analysis
See docs/advanced-tool-use.md for complete documentation.
Use Cases
Crypto Trading
DevOps Monitoring
Sales Analytics
IoT Sensor Data
📈 Trading Module (v0.4.0)
Specialized semantic analysis for trading agents, portfolio managers, and financial applications.
Trading Tools
Quick Examples
MCP Integration
All trading tools are available via MCP:
Tools: describe_drawdown, describe_trading_performance, describe_rankings, describe_anomalies, describe_windows, describe_regime, describe_allocation
📖 Full Trading Documentation | Quick Reference
API Reference
describe_series(data, context=None, output="text")
Analyze a single data series.
Parameters:
data: Input data (NumPy array, Pandas Series, Polars Series, or list)context: Optional label for the data (appears in narrative)output: Format -"text"(string),"json"(dict), or"full"(SemanticResult)
Returns: Semantic description in requested format.
describe_dataframe(df, context=None)
Analyze all numeric columns in a DataFrame.
Parameters:
df: Pandas or Polars DataFramecontext: Optional prefix for column context labels
Returns: Dict mapping column names to SemanticResult objects.
SemanticResult
Full analysis result with:
narrative: Human-readable text descriptiontrend: TrendState enumvolatility: VolatilityState enumdata_quality: DataQuality enumanomaly_state: AnomalyState enumanomalies: List of AnomalyInfo objectsseasonality: Optional SeasonalityStatedistribution: Optional DistributionShapestep_change: Optional StructuralChange (STEP_UP, STEP_DOWN, NONE)step_change_index: Optional int (index where step change occurred)profile: SeriesProfile with statisticscompression_ratio: Token reduction ratio
Development
License
MIT License - see LICENSE file.
Source: README.md at commit 4dfd560
Tools
0Version history
1- v0.2.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts