MCP server for Tepilora financial API
Project description
Tepilora MCP Server
MCP (Model Context Protocol) server for the Tepilora financial API.
Gives AI assistants (Claude, Codex, etc.) native access to 226 financial data operations — securities search, portfolio analytics, news, bonds, and more.
Features
- 16 curated tools in default mode, 234 tools in full mode
- Async client (
AsyncTepiloraClient) — non-blocking, optimized for MCP - Smart caching — TTL + LRU eviction, skips mutating operations
- Credit tracking — per-session usage limits with configurable caps
- Error handling — user-friendly messages instead of raw tracebacks
- Arrow IPC streaming — binary format for large result sets
Install
pip install tepilora-mcp
Quick Start
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"tepilora": {
"command": "tepilora-mcp",
"env": {
"TEPILORA_API_KEY": "your-api-key"
}
}
}
}
Claude Code
claude mcp add tepilora tepilora-mcp -e TEPILORA_API_KEY=your-api-key
Run Directly
export TEPILORA_API_KEY=your-api-key
tepilora-mcp
Available Tools
Discovery (4 tools)
| Tool | Description |
|---|---|
list_namespaces |
List all 24 API namespaces with operation counts |
list_operations |
List operations for a namespace |
describe_operation |
Get parameter details for any operation |
call_operation |
Execute any of the 226 operations |
Curated (9 tools)
| Tool | Description |
|---|---|
search_securities |
Search stocks, ETFs, bonds, funds |
get_security_details |
Get security information |
get_price_history |
Historical price data |
create_portfolio |
Create a portfolio |
get_portfolio_returns |
Portfolio return analysis |
run_analytics |
68 analytics functions (summary-first: preview + MCP resource for full data) |
search_news |
Search financial news |
screen_bonds |
Screen bonds by criteria |
get_yield_curve |
Yield curve data |
Utility (3 tools)
| Tool | Description |
|---|---|
clear_cache |
Clear the in-memory result cache |
get_credit_usage |
View session credit usage and limits |
reset_credits |
Reset the session credit counter |
Streaming (1 tool)
| Tool | Description |
|---|---|
call_operation_arrow_stream |
Call any operation in Arrow IPC binary format |
Full Mode (opt-in)
Set TEPILORA_MCP_FULL_TOOLS=true to expose all 226 operations as individual tools (218 additional tools on top of the 16 default).
Configuration
| Environment Variable | Required | Default | Description |
|---|---|---|---|
TEPILORA_API_KEY |
Yes | - | Your Tepilora API key |
TEPILORA_BASE_URL |
No | https://tepiloradata.com |
API base URL |
TEPILORA_FALLBACK_URL |
No | http://49.13.34.1 |
Fallback API URL (used if base URL returns HTML) |
TEPILORA_MCP_FULL_TOOLS |
No | false |
Register all 226 operations as tools |
TEPILORA_MCP_TIMEOUT |
No | 30 |
Request timeout in seconds |
TEPILORA_MCP_CACHE_TTL |
No | 300 |
Cache TTL in seconds (0 disables cache) |
TEPILORA_MCP_CACHE_MAX_SIZE |
No | 1000 |
Max cached entries (LRU eviction) |
TEPILORA_MCP_CREDIT_LIMIT |
No | 0 |
Session credit cap (0 = unlimited) |
Caching
Results are cached in memory with a configurable TTL (default 5 minutes). Mutating operations (create, update, delete, run, etc.) are never cached. Use the clear_cache tool to manually flush.
Credit Tracking
Each API operation has a credit cost (defined in the SDK schema). Set TEPILORA_MCP_CREDIT_LIMIT to cap per-session usage. Use get_credit_usage to monitor and reset_credits to start fresh.
Error Handling
All tools return structured error messages instead of raw exceptions:
{
"error": "Rate limit reached: wait and retry, or reduce request frequency.",
"details": "HTTPStatusError: 429 Too Many Requests"
}
Handled errors: HTTP 401/403/404/429/5xx, timeouts, connection failures, SDK errors, invalid parameters.
API Coverage
24 namespaces, 226 operations:
| Namespace | Ops | Examples |
|---|---|---|
| securities | 12 | search, filter, history, facets |
| portfolio | 19 | create, returns, attribution, optimize |
| analytics | 68 | rolling volatility, Sharpe, drawdown, VaR |
| news | 7 | search, latest, trending |
| bonds | 7 | analyze, screen, curve, spread |
| stocks | 9 | technicals, screening, peers |
| options | 6 | pricing, Greeks, IV |
| macro | 6 | economic indicators, calendar |
| esg | 5 | scores, screening |
| + 15 more | alerts, audit, billing, clients, documents, ... |
Requirements
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 tepilora_mcp-0.1.4.tar.gz.
File metadata
- Download URL: tepilora_mcp-0.1.4.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54b4cc45d08df0203869ce80d83455b2e9cc6092e425fcb06bdd27f6433956ea
|
|
| MD5 |
a20477d13138d9145d76f5d08b935355
|
|
| BLAKE2b-256 |
1b77d6821dfe9454185aa0b7e8a3f13a6b4259b043339294f0afccb9cec774c4
|
Provenance
The following attestation bundles were made for tepilora_mcp-0.1.4.tar.gz:
Publisher:
publish.yml on Admintepilora/TepiloraMCP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tepilora_mcp-0.1.4.tar.gz -
Subject digest:
54b4cc45d08df0203869ce80d83455b2e9cc6092e425fcb06bdd27f6433956ea - Sigstore transparency entry: 953614680
- Sigstore integration time:
-
Permalink:
Admintepilora/TepiloraMCP@187fbb95d13cf910a5d5cffade0daff25b1d0844 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Admintepilora
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@187fbb95d13cf910a5d5cffade0daff25b1d0844 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tepilora_mcp-0.1.4-py3-none-any.whl.
File metadata
- Download URL: tepilora_mcp-0.1.4-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0752d6700b61adca2b13476bcac1f2222197c2b752994e5e4fc056a3b6ec35d1
|
|
| MD5 |
7f2864ed59af55e559d362899ac23aac
|
|
| BLAKE2b-256 |
2e20567135bd59c10bb4490fbd7425049923c4bff06908a985d403c6319260bc
|
Provenance
The following attestation bundles were made for tepilora_mcp-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on Admintepilora/TepiloraMCP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tepilora_mcp-0.1.4-py3-none-any.whl -
Subject digest:
0752d6700b61adca2b13476bcac1f2222197c2b752994e5e4fc056a3b6ec35d1 - Sigstore transparency entry: 953614681
- Sigstore integration time:
-
Permalink:
Admintepilora/TepiloraMCP@187fbb95d13cf910a5d5cffade0daff25b1d0844 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Admintepilora
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@187fbb95d13cf910a5d5cffade0daff25b1d0844 -
Trigger Event:
release
-
Statement type: