Contextweaver

finance MCP Server

Budget-aware context compilation and context firewall for tool-heavy AI agents.

Verified
financefinance
5 views8 stars16 forksApache-2.0

Why This Matters

Discovered via github-topic:mcp and last synced 3mo ago.

Verified
Source
github-topic:mcp
Stars
8
Last synced
3mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
34
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (34)

Framework

Guide

ResultEnvelope

Structured tool output: summary + extracted facts + artifact handles + views.

Firewall

Framework Agnostic

ContextItem

Atomic event log entry: user turn, agent message, tool call, tool result, fact, plan state.

Phase

`route` / `call` / `interpret` / `answer` — each with its own token budget.

ContextFirewall

Intercepts tool results: stores raw bytes out-of-band, injects compact summary (with truncation for large outputs).

Version

Status

None

> Most frameworks offer memory classes, but they don't enforce token budgets, route tools, or > handle large outputs. contextweaver provides all three as a composable, framework-agnostic layer. --- ## CLI contextweaver ships with a CLI for quick experimentation: ```bash contextweaver demo # end-to-end demonstration contextweaver init # scaffold config + sample catalog contextweaver build --catalog c.json --out g.json # build routing graph contextweaver route --graph g.json --query "send email" contextweaver print-tree --graph g.json contextweaver ingest --events session.jsonl --out session.json contextweaver replay --session session.json --phase answer ``` ## Examples

ChoiceGraph

Bounded DAG over the tool catalog. Router beam-searches it; LLM sees only a focused shortlist.

Approach

Tool routing

Stage

Component

A2A

[Guide](docs/integration_a2a.md)

Concept

Description

Decision

Reason

MCP

[Guide](docs/integration_mcp.md)

OpenAPI

[Guide](docs/integration_openapi.md)

BuildStats

Per-build diagnostics: candidate count, included/dropped counts, token usage, drop reasons.

Extra

What it adds

smolagents

[Guide](docs/integration_smolagents.md)

Deterministic

MCP-native

Execution

ChainWeaver

FastMCP

[Cookbook recipe](docs/cookbook.md#1-fastmcp--contextweaver-routing)

Surface

Current promise

Agno

[Guide](docs/integration_agno.md)

Script

Description

Guardrails

agentfence

Pipecat

[Guide](docs/integration_pipecat.md)

Milestone

Status

Boundary

agent-kernel

LlamaIndex

[Guide](docs/integration_llamaindex.md)

Sensitivity

`ContextItem.sensitivity` defaults to `public`; the default policy drops `confidential` and `restricted` items before they reach the prompt.

Invariant

Status

Naive

contextweaver

CrewAI

[Guide](docs/integration_crewai.md)