Skip to main content
Glama
README.md
# contexte

Load resources from [ContexteTech](https://contextetech.com/en/) — datasets, prompts, few-shot contexts — in one line of Python. No dependencies.

```bash
pip install contexte
```

```python
import contexte

# Dataset: rows as dicts (JSONL messages)
ds = contexte.load("contextetech/anonymisation-rgpd-fr")
print(len(ds), ds[0]["messages"][1]["content"])

# Prompt with {{variables}}
p = contexte.load("contextetech/fiche-produit-ecommerce")
print(p.variables)                   # ['produit', 'caracteristiques', 'public']
text = p.fill(produit="Casque audio", caracteristiques="Bluetooth, 30 h", public="étudiants")

# Few-shot context, ready for any chat API
c = contexte.load("contextetech/anonymisation-rgpd")
system = c.system_prompt()
messages = c.messages("Bonjour, je suis Jean Martin, 06 11 22 33 44.")

# Load by short code (end of the resource URL, e.g. …/fiche-produit-ecommerce-jr6t0n)
p = contexte.load("jr6t0n")

# Search and cost
contexte.search("rgpd", kind="dataset")
contexte.cost("contextetech/anonymisation-rgpd")     # estimated cost per model, in euros
```

## Command line

```bash
contexte get jr6t0n                  # saves fiche-produit-ecommerce.json in the current folder
contexte get contextetech/anonymisation-rgpd-fr -o data/
contexte search rgpd --kind dataset
```

A resource is referenced as `author/name`, by its short code (end of its URL), or by its identifier. Read-only, no account needed.

## MCP server

Use the catalogue from an AI assistant (ChatGPT, Claude, Cursor, VS Code…).

**Online, nothing to install** — add this URL as a connector (Streamable HTTP, no authentication):

```
https://contextetech.com/mcp
```

**Local** — the same server from this package, which can also save whole datasets to files:

```json
{ "mcpServers": { "contexte": { "command": "uvx", "args": ["contexte@latest", "mcp"] } } }
```

<!-- mcp-name: io.github.contexte-tech/contexte -->

Tools (local server): `search_resources` (search the catalogue), `load_resource` (load a resource by short code: dataset rows, prompt template, context), `fill_prompt` (fill a prompt's `{{variables}}`), `download_dataset` (save a whole dataset as JSONL, OpenAI messages, ShareGPT, Alpaca or CSV), `estimate_cost` (tokens and euros per model). All read-only except `download_dataset`, which writes a file and never overwrites one. Stdio transport, no dependencies, no key. The online server offers the same read-only tools, with `get_download_link` instead of `download_dataset`.

Full guide: https://contextetech.com/en/docs/mcp

## License

MIT. The ContexteTech name and logos are trademarks and are not covered by this license.

TDQS

A3.8/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a clearly distinct action: search_resources finds resources, load_resource inspects one, fill_prompt renders prompt templates, download_dataset persists full datasets, and estimate_cost computes pricing. Boundaries are sharp — even the superficially similar load_resource vs download_dataset differ (preview/first rows vs full file export), so an agent can select confidently.

Naming Consistency5/5

All five names follow a strict snake_case verb_noun pattern (search_resources, load_resource, fill_prompt, download_dataset, estimate_cost). The only variation is plural vs singular nouns, which reflects the actual cardinality semantics rather than an inconsistency.

Tool Count5/5

Five tools is well-scoped for a resource-catalogue server covering discovery, inspection, prompt rendering, dataset export and cost estimation. Every tool earns its place with no redundancy.

Completeness4/5

The surface covers the core catalogue lifecycle: discover, inspect, use (fill prompts), export datasets and estimate cost. Minor gaps exist — no explicit browse/list-by-type or metadata filtering beyond free search, and no way to fetch a model or MCP server artifact directly — but agents can work around these via search.

Maintenance

ActivityMaintained
ResponsivenessNo issues