Install
$ agentstack add mcp-vibheksoni-pi-t3chat ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
pi-t3chat running in Pi — 50+ frontier models via t3.chat subscription
pi-t3chat
t3.chat models in Pi — 50+ frontier AI models via your t3.chat subscription
[](https://github.com/vibheksoni/pi-t3chat) [](https://opensource.org/licenses/MIT) [](#models) [](#tls-impersonation)
Claude Fable-5 · GPT-5.6 · Gemini 3.5 · Grok 4.3 · DeepSeek V4 · Llama 4 · Qwen 3 · 50+ more
Overview
pi-t3chat is a Pi coding agent extension that bridges t3.chat's multi-model API into Pi's OpenAI-compatible provider interface. It spins up a local proxy that translates OpenAI Chat Completions calls to t3.chat's SSE streaming format — with full TLS fingerprint impersonation, dynamic model discovery, text-based tool calling, and MCP wrapper tool discovery.
How It Works
Pi → Local Proxy (127.0.0.1:42101) → t3.chat API (https://t3.chat/api/chat)
OpenAI-compatible HTTP SSE streaming with TLS impersonation
The extension spins up a local HTTP proxy that translates OpenAI Chat Completions API calls to t3.chat's SSE format. All requests to t3.chat use wreq-js for TLS fingerprint impersonation (Chrome 142) — standard fetch() gets blocked by t3.chat's bot detection.
Features
- 50+ frontier AI models — Claude, GPT, Gemini, Grok, DeepSeek, Llama, Qwen, and more through a single t3.chat subscription
- Dynamic model discovery — scrapes t3.chat's JS bundles to fetch model definitions; zero hardcoding
- TLS fingerprint impersonation — wreq-js with Chrome 142 emulation bypasses t3.chat's bot detection
- Text-based tool calling — injects tool definitions as text; model emits
tool:fenced blocks; proxy converts to OpenAItool_calls - MCP wrapper tools —
mcp__prefixed tools are grouped into MCP servers withlist_mcps/list_mcp_tools/call_mcpdiscovery protocol - False refusal correction — auto-retries when the model claims it "can't access tools" while tools are available
- Credit tracking — real-time balance, usage percentages, and subscription tier via tRPC endpoints
- Cookie-based auth — no API keys; uses your existing t3.chat browser session
Tool Calling
t3.chat models don't all support OpenAI-native function calling. This extension implements a text-based tool calling protocol:
- Injection — OpenAI tool definitions are injected into the system prompt as text instructions
- Emission — The model emits
tool:fenced code blocks in its response - Parsing — The proxy parses these blocks and converts them to OpenAI
tool_callsformat - False refusal correction — If the model claims it "can't access tools" while tools are available, the proxy automatically retries with a correction prompt (up to 2 retries)
Example tool block emitted by the model:
````
```tool:read_file {"path": "/src/index.ts"}
````
For models that support native tool calling via the SSE stream, the proxy also handles structured `tool_calls` deltas.
### MCP Wrapper Tools
Tools with `mcp__` prefixes (e.g. `mcp__exa__web_search`) are automatically grouped into MCP servers. Instead of injecting all MCP tool definitions into the system prompt, the proxy injects three wrapper tools:
- **`list_mcps`** — List all available MCP groups
- **`list_mcp_tools`** — List tools within one MCP group
- **`call_mcp`** — Execute a specific MCP tool by group + tool name
The model discovers tools on-demand through a multi-round loop (max 6 rounds), reducing prompt size dramatically when many MCP tools are available.
## Installation
### Git (recommended)
```bash
pi extension add https://github.com/vibheksoni/pi-t3chat.git
Local dev
git clone https://github.com/vibheksoni/pi-t3chat.git
cd pi-t3chat
pi extension add .
Setup
- Sign in to t3.chat in your browser
- Open DevTools → Application → Cookies →
t3.chat - Run
/login t3chatin Pi - Paste your full Cookie header string
- Paste your
convex-session-idvalue - Select a model with
/model t3chat/
Commands
| Command | Description | |---------|-------------| | /login t3chat | Sign in using t3.chat cookies | | t3chat-status | Show auth status, credits, and subscription | | t3chat-logout | Sign out and clear stored credentials | | t3chat-refresh | Refresh model catalog from t3.chat |
Models
Models are fetched dynamically by scraping t3.chat's JavaScript bundles — zero hardcoding. The catalog is cached for 10 minutes and refreshed on demand.
Run t3chat-refresh after new models are added to t3.chat.
Notable Models
| Model | Description | |-------|-------------| | claude-fable-5 | Anthropic's autonomous knowledge work model | | sonoma-dusk-alpha | 2M token context window | | fast | Efficient open model | | 50+ more | Anthropic, Google, OpenAI, xAI, DeepSeek, Meta, Alibaba, Xiaomi, MiniMax, Moonshot, GLM, InclusionAI |
TLS Impersonation
t3.chat blocks requests with non-browser TLS fingerprints. This extension uses wreq-js — a Node.js/TypeScript HTTP client powered by native Rust wreq bindings — to impersonate Chrome 142's TLS/JA3/HTTP2 fingerprint on every request.
File Structure
pi-t3chat/
├── index.ts — Pi extension entry point, provider registration, commands
├── proxy.ts — OpenAI-compatible HTTP proxy → t3.chat SSE
├── chat.ts — t3.chat SSE streaming via wreq-js
├── sse.ts — SSE stream parser for t3.chat events
├── tools.ts — Text-based tool calling protocol (injection, parsing, correction)
├── mcp.ts — MCP wrapper tools (list_mcps / list_mcp_tools / call_mcp)
├── catalog.ts — Model discovery by scraping t3.chat JS bundles
├── models.ts — Model resolution (name → ID lookup)
├── usage.ts — Credit tracking via tRPC endpoints
├── auth.ts — Cookie-based credential storage
├── config.ts — Chat config options
└── package.json — Package metadata
Endpoints Used
| URL | Method | Purpose | |-----|--------|---------| | /api/chat | POST | Chat message (SSE stream) | | /api/trpc/getCustomerData | GET | Credit balance, usage % | | /api/trpc/getSubscriptionData | GET | Subscription tier | | /api/trpc/getPricingProducts | GET | Pricing tiers | | /api/trpc/getModelStatuses | GET | Model operational status | | /api/trpc/getAllModelBenchmarks | GET | Model benchmark scores | | /api/trpc/auth.getActiveSessions | GET | Active browser sessions | | /api/status | GET | Deployment status |
License
MIT
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: vibheksoni
- Source: vibheksoni/pi-t3chat
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.