Python client and MCP server for the Gildea AI market intelligence API
Project description
Gildea
Python client and MCP server for the Gildea AI market intelligence API.
Gildea tracks 500+ expert sources on AI, decomposes every signal into verified reasoning chains (thesis, arguments, claims, evidence), and serves it through a REST API. This package gives you a Python client and an MCP server so AI assistants can use the data directly.
Search uses modern hybrid retrieval — dense and learned sparse embeddings fused via RRF, with cross-encoder reranking — for high precision on verified, citable text units. See How search works for details.
Install
# Python client only
pip install gildea
# With MCP server
pip install gildea[mcp]
Quick Start
from gildea_sdk import Gildea
client = Gildea(api_key="gld_your_key_here")
# Search verified text units
results = client.search(query="data center infrastructure spending")
for hit in results["data"]:
print(hit["unit"]["text"])
print(f" Source: {hit['citation']['signal_title']} ({hit['citation']['registrable_domain']})")
# Get full signal decomposition with evidence
signal = client.signals.get("signal_id", include="evidence")
# Entity intelligence with trend analytics
entity = client.entities.get("NVIDIA")
print(f"{entity['display_name']}: {entity['direction']}, {entity['scale']} scale, {entity['notability']} notability")
# Cross-source consensus mapping
similar = client.search(similar_to="unit_id")
# Embed arbitrary text into Gildea's vector space
vector = client.embed("Data center capex is accelerating.")["embedding"]
Local similarity search
Pair include="embeddings" on signal detail with client.embed() to compute cosine similarity between user content and verified Gildea units, fully client-side:
import numpy as np
from gildea_sdk import Gildea
client = Gildea(api_key="gld_your_key_here")
# 1. Embed user content
user_vec = np.array(client.embed("I think infrastructure spending will slow in H2.")["embedding"])
# 2. Fetch signal with per-unit embeddings
signal = client.signals.get("0001f3a7b9c8d4e5f6a7b8c9d0e1f2a3b4c5d6e7", include="embeddings")
# 3. Find semantically related text units
def iter_units(decomp):
for arg in decomp.get("arguments", []):
yield from arg.get("sentences", [])
yield from decomp.get("claims", [])
if "thesis" in decomp:
yield from decomp["thesis"].get("sentences", [])
if "summary" in decomp:
yield from decomp["summary"].get("sentences", [])
for u in iter_units(signal["decomposition"]):
if "embedding" in u:
sim = float(np.dot(user_vec, np.array(u["embedding"]))) # both unit-normalized
if sim > 0.7:
print(f"[{sim:.3f}] {u['unit']['text']}")
Embeddings are 768-dim BAAI/bge-base-en-v1.5 vectors. Both endpoints return vectors in the same space. See docs.gildea.ai/concepts/embeddings for details.
MCP Server
Use Gildea as a tool in Claude, ChatGPT, Cursor, VS Code, or any MCP-compatible client.
# Run directly
gildea-mcp
# Or via uvx (no install needed)
uvx --from gildea[mcp] gildea-mcp
Set your API key:
export GILDEA_API_KEY=gld_your_key_here
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"gildea": {
"command": "uvx",
"args": ["--from", "gildea[mcp]", "gildea-mcp"],
"env": {
"GILDEA_API_KEY": "gld_your_key_here"
}
}
}
}
Available MCP Tools
| Tool | Description |
|---|---|
search_text_units |
Semantic search across verified text units, or vector similarity via similar_to |
list_signals |
Browse signals by entity, theme, date, content type |
get_signal_detail |
Full decomposition: thesis, arguments, claims, evidence |
get_entity_profile |
Entity trend analytics, co-occurrence, theme distribution |
list_entities |
Discover entities by trend direction, notability, scale |
get_themes |
Theme overview across value chain and market force axes |
get_theme_detail |
Single theme trend analytics and cross-theme relationships |
API Key
Get your API key at gildea.ai. Free tier includes 5 requests/minute and 200 requests/month.
Documentation
Full API docs at docs.gildea.ai.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gildea-0.3.0.tar.gz.
File metadata
- Download URL: gildea-0.3.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c42f804d0cf9167bab38a551eac0c55009431eb96f8880b7839a931096cf0a0c
|
|
| MD5 |
aabb8ccbd9cc1c0194c09ae2c0fed09f
|
|
| BLAKE2b-256 |
1b5c2c75b2a79c6bc4f00ba5e7a1ed1000352040a1e1c0ca8c853663659ffa27
|
File details
Details for the file gildea-0.3.0-py3-none-any.whl.
File metadata
- Download URL: gildea-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaa0682bfa38d96ecfab1500d812c447101bf7a62a5e2c497bc3b73f5fa2e73c
|
|
| MD5 |
013df90114dc42a042af83a2140eb61d
|
|
| BLAKE2b-256 |
c5321f4bfd2a7fafe74f5dd17d24a3191948580bd3f2429c304dd0fe4d8f93cf
|