tachibot-mcp 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +260 -0
- package/CHANGELOG.md +54 -0
- package/CODE_OF_CONDUCT.md +56 -0
- package/CONTRIBUTING.md +54 -0
- package/Dockerfile +36 -0
- package/LICENSE +644 -0
- package/README.md +201 -0
- package/SECURITY.md +95 -0
- package/dist/personality/komaai-expressions.js +12 -0
- package/dist/profiles/balanced.json +33 -0
- package/dist/profiles/code_focus.json +33 -0
- package/dist/profiles/full.json +33 -0
- package/dist/profiles/minimal.json +33 -0
- package/dist/profiles/research_power.json +33 -0
- package/dist/scripts/build-profiles.js +46 -0
- package/dist/src/application/services/focus/FocusModeRegistry.js +46 -0
- package/dist/src/application/services/focus/FocusTool.service.js +109 -0
- package/dist/src/application/services/focus/ModeRegistry.js +46 -0
- package/dist/src/application/services/focus/modes/focus-deep.mode.js +27 -0
- package/dist/src/application/services/focus/modes/status.mode.js +50 -0
- package/dist/src/application/services/focus/modes/tachibot-status.mode.js +50 -0
- package/dist/src/collaborative-orchestrator.js +391 -0
- package/dist/src/config/model-constants.js +188 -0
- package/dist/src/config/model-defaults.js +57 -0
- package/dist/src/config/model-preferences.js +382 -0
- package/dist/src/config/timeout-config.js +130 -0
- package/dist/src/config.js +173 -0
- package/dist/src/domain/interfaces/IFocusMode.js +5 -0
- package/dist/src/domain/interfaces/IProvider.js +6 -0
- package/dist/src/domain/interfaces/ITool.js +5 -0
- package/dist/src/focus-deep.js +245 -0
- package/dist/src/infrastructure/ascii/art/robots.ascii.js +16 -0
- package/dist/src/mcp-client.js +90 -0
- package/dist/src/memory/index.js +17 -0
- package/dist/src/memory/memory-config.js +135 -0
- package/dist/src/memory/memory-interface.js +174 -0
- package/dist/src/memory/memory-manager.js +383 -0
- package/dist/src/memory/providers/devlog-provider.js +385 -0
- package/dist/src/memory/providers/hybrid-provider.js +399 -0
- package/dist/src/memory/providers/local-provider.js +388 -0
- package/dist/src/memory/providers/mem0-provider.js +337 -0
- package/dist/src/modes/architect.js +477 -0
- package/dist/src/modes/auditor.js +362 -0
- package/dist/src/modes/challenger.js +841 -0
- package/dist/src/modes/code-reviewer.js +382 -0
- package/dist/src/modes/commit-guardian.js +424 -0
- package/dist/src/modes/documentation-writer.js +572 -0
- package/dist/src/modes/scout.js +587 -0
- package/dist/src/modes/shared/helpers/challenger-helpers.js +454 -0
- package/dist/src/modes/shared/helpers/index.js +17 -0
- package/dist/src/modes/shared/helpers/scout-helpers.js +270 -0
- package/dist/src/modes/shared/helpers/verifier-helpers.js +332 -0
- package/dist/src/modes/test-architect.js +767 -0
- package/dist/src/modes/verifier.js +378 -0
- package/dist/src/monitoring/performance-monitor.js +435 -0
- package/dist/src/optimization/batch-executor.js +121 -0
- package/dist/src/optimization/context-pruner.js +196 -0
- package/dist/src/optimization/cost-monitor.js +338 -0
- package/dist/src/optimization/index.js +65 -0
- package/dist/src/optimization/model-router.js +264 -0
- package/dist/src/optimization/result-cache.js +114 -0
- package/dist/src/optimization/token-optimizer.js +257 -0
- package/dist/src/optimization/token-tracker.js +118 -0
- package/dist/src/orchestrator-instructions.js +128 -0
- package/dist/src/orchestrator-lite.js +139 -0
- package/dist/src/orchestrator.js +191 -0
- package/dist/src/orchestrators/collaborative/interfaces/IToolExecutionEngine.js +1 -0
- package/dist/src/orchestrators/collaborative/interfaces/IToolExecutionStrategy.js +5 -0
- package/dist/src/orchestrators/collaborative/interfaces/IVisualizationRenderer.js +1 -0
- package/dist/src/orchestrators/collaborative/registries/ModelProviderRegistry.js +95 -0
- package/dist/src/orchestrators/collaborative/registries/ToolAdapterRegistry.js +64 -0
- package/dist/src/orchestrators/collaborative/services/tool-execution/ToolExecutionService.js +502 -0
- package/dist/src/orchestrators/collaborative/services/visualization/VisualizationService.js +206 -0
- package/dist/src/orchestrators/collaborative/types/session-types.js +5 -0
- package/dist/src/profiles/balanced.js +37 -0
- package/dist/src/profiles/code_focus.js +37 -0
- package/dist/src/profiles/debug_intensive.js +59 -0
- package/dist/src/profiles/full.js +37 -0
- package/dist/src/profiles/minimal.js +37 -0
- package/dist/src/profiles/research_code.js +59 -0
- package/dist/src/profiles/research_power.js +37 -0
- package/dist/src/profiles/types.js +5 -0
- package/dist/src/profiles/workflow_builder.js +53 -0
- package/dist/src/prompt-engineer-lite.js +78 -0
- package/dist/src/prompt-engineer.js +399 -0
- package/dist/src/reasoning-chain.js +508 -0
- package/dist/src/sequential-thinking.js +291 -0
- package/dist/src/server-diagnostic.js +74 -0
- package/dist/src/server-raw.js +158 -0
- package/dist/src/server-simple.js +58 -0
- package/dist/src/server.js +514 -0
- package/dist/src/session/session-logger.js +617 -0
- package/dist/src/session/session-manager.js +571 -0
- package/dist/src/session/session-tools.js +400 -0
- package/dist/src/tools/advanced-modes.js +200 -0
- package/dist/src/tools/claude-integration.js +356 -0
- package/dist/src/tools/consolidated/ai-router.js +174 -0
- package/dist/src/tools/consolidated/ai-tool.js +48 -0
- package/dist/src/tools/consolidated/brainstorm-tool.js +87 -0
- package/dist/src/tools/consolidated/environment-detector.js +80 -0
- package/dist/src/tools/consolidated/index.js +50 -0
- package/dist/src/tools/consolidated/search-tool.js +110 -0
- package/dist/src/tools/consolidated/workflow-tool.js +238 -0
- package/dist/src/tools/gemini-tools.js +329 -0
- package/dist/src/tools/grok-enhanced.js +376 -0
- package/dist/src/tools/grok-tools.js +299 -0
- package/dist/src/tools/lmstudio-tools.js +223 -0
- package/dist/src/tools/openai-tools.js +498 -0
- package/dist/src/tools/openrouter-tools.js +317 -0
- package/dist/src/tools/optimized-wrapper.js +204 -0
- package/dist/src/tools/perplexity-tools.js +294 -0
- package/dist/src/tools/pingpong-tool.js +343 -0
- package/dist/src/tools/qwen-wrapper.js +74 -0
- package/dist/src/tools/tool-router.js +444 -0
- package/dist/src/tools/unified-ai-provider.js +260 -0
- package/dist/src/tools/workflow-runner.js +425 -0
- package/dist/src/tools/workflow-validator-tool.js +107 -0
- package/dist/src/types.js +23 -0
- package/dist/src/utils/input-validator.js +130 -0
- package/dist/src/utils/model-router.js +91 -0
- package/dist/src/utils/progress-stream.js +255 -0
- package/dist/src/utils/provider-router.js +88 -0
- package/dist/src/utils/smart-api-client.js +146 -0
- package/dist/src/utils/table-builder.js +218 -0
- package/dist/src/utils/timestamp-formatter.js +134 -0
- package/dist/src/utils/tool-compressor.js +257 -0
- package/dist/src/utils/tool-config.js +201 -0
- package/dist/src/validators/dependency-graph-validator.js +147 -0
- package/dist/src/validators/interpolation-validator.js +222 -0
- package/dist/src/validators/output-usage-validator.js +151 -0
- package/dist/src/validators/syntax-validator.js +102 -0
- package/dist/src/validators/tool-registry-validator.js +123 -0
- package/dist/src/validators/tool-types.js +97 -0
- package/dist/src/validators/types.js +8 -0
- package/dist/src/validators/workflow-validator.js +134 -0
- package/dist/src/visualizer-lite.js +42 -0
- package/dist/src/visualizer.js +179 -0
- package/dist/src/workflows/circuit-breaker.js +199 -0
- package/dist/src/workflows/custom-workflows.js +451 -0
- package/dist/src/workflows/engine/AutoSynthesizer.js +97 -0
- package/dist/src/workflows/engine/StepParameterResolver.js +74 -0
- package/dist/src/workflows/engine/VariableInterpolator.js +123 -0
- package/dist/src/workflows/engine/WorkflowDiscovery.js +125 -0
- package/dist/src/workflows/engine/WorkflowExecutionEngine.js +485 -0
- package/dist/src/workflows/engine/WorkflowExecutor.js +113 -0
- package/dist/src/workflows/engine/WorkflowFileManager.js +244 -0
- package/dist/src/workflows/engine/WorkflowHelpers.js +114 -0
- package/dist/src/workflows/engine/WorkflowOutputFormatter.js +83 -0
- package/dist/src/workflows/engine/events/WorkflowEventBus.js +132 -0
- package/dist/src/workflows/engine/events/interfaces/IEventBus.js +5 -0
- package/dist/src/workflows/engine/handlers/ErrorRecoveryHandler.js +162 -0
- package/dist/src/workflows/engine/handlers/PromptEnhancementHandler.js +115 -0
- package/dist/src/workflows/engine/handlers/SessionPersistenceHandler.js +167 -0
- package/dist/src/workflows/engine/handlers/StepExecutionHandler.js +231 -0
- package/dist/src/workflows/engine/handlers/ToolInvocationHandler.js +46 -0
- package/dist/src/workflows/engine/interfaces/IAutoSynthesizer.js +5 -0
- package/dist/src/workflows/engine/interfaces/IStepParameterResolver.js +5 -0
- package/dist/src/workflows/engine/interfaces/IVariableInterpolator.js +5 -0
- package/dist/src/workflows/engine/interfaces/IWorkflowDiscovery.js +4 -0
- package/dist/src/workflows/engine/interfaces/IWorkflowFileManager.js +5 -0
- package/dist/src/workflows/engine/interfaces/IWorkflowOutputFormatter.js +5 -0
- package/dist/src/workflows/engine/state/WorkflowStateMachine.js +194 -0
- package/dist/src/workflows/engine/state/interfaces/IStateMachine.js +17 -0
- package/dist/src/workflows/fallback-strategies.js +373 -0
- package/dist/src/workflows/message-queue.js +455 -0
- package/dist/src/workflows/model-router.js +189 -0
- package/dist/src/workflows/orchestrator-examples.js +174 -0
- package/dist/src/workflows/orchestrator-integration.js +200 -0
- package/dist/src/workflows/self-healing.js +524 -0
- package/dist/src/workflows/tool-mapper.js +407 -0
- package/dist/src/workflows/tool-orchestrator.js +796 -0
- package/dist/src/workflows/workflow-engine.js +573 -0
- package/dist/src/workflows/workflow-parser.js +283 -0
- package/dist/src/workflows/workflow-types.js +95 -0
- package/dist/src/workflows.js +568 -0
- package/dist/test-workflow-file-output.js +93 -0
- package/docs/API_KEYS.md +570 -0
- package/docs/CLAUDE_CODE_SETUP.md +181 -0
- package/docs/CLAUDE_DESKTOP_MANUAL.md +127 -0
- package/docs/CONFIGURATION.md +745 -0
- package/docs/FOCUS_MODES.md +240 -0
- package/docs/INSTALLATION_BOTH.md +145 -0
- package/docs/TERMS.md +352 -0
- package/docs/TOOLS_REFERENCE.md +1622 -0
- package/docs/TOOL_PARAMETERS.md +496 -0
- package/docs/TOOL_PROFILES.md +236 -0
- package/docs/WORKFLOWS.md +987 -0
- package/docs/WORKFLOW_OUTPUT.md +198 -0
- package/docs/WORKFLOW_PROGRESS_TRACKING.md +305 -0
- package/docs/workflows/design-brainstorm.md +335 -0
- package/package.json +97 -0
- package/profiles/balanced.json +37 -0
- package/profiles/code_focus.json +37 -0
- package/profiles/debug_intensive.json +34 -0
- package/profiles/full.json +37 -0
- package/profiles/minimal.json +37 -0
- package/profiles/research_power.json +37 -0
- package/profiles/workflow_builder.json +37 -0
- package/smithery.yaml +66 -0
- package/start.sh +8 -0
- package/tools.config.json +81 -0
- package/tsconfig.json +18 -0
- package/workflows/accessibility-code-audit.yaml +92 -0
- package/workflows/code-architecture-review.yaml +202 -0
- package/workflows/code-review.yaml +142 -0
- package/workflows/core/iterative-problem-solver.yaml +283 -0
- package/workflows/creative-brainstorm-yaml.yaml +215 -0
- package/workflows/pingpong.yaml +141 -0
- package/workflows/system/README.md +412 -0
- package/workflows/system/challenger.yaml +175 -0
- package/workflows/system/scout.yaml +164 -0
- package/workflows/system/verifier.yaml +133 -0
- package/workflows/ultra-creative-brainstorm.yaml +318 -0
- package/workflows/ux-research-flow.yaml +92 -0
package/docs/API_KEYS.md
ADDED
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
# API Keys Guide
|
|
2
|
+
|
|
3
|
+
Complete guide to obtaining, configuring, and managing API keys for TachiBot MCP.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Overview](#overview)
|
|
10
|
+
- [Required vs Optional Keys](#required-vs-optional-keys)
|
|
11
|
+
- [Provider Details](#provider-details)
|
|
12
|
+
- [Perplexity](#perplexity)
|
|
13
|
+
- [Grok / xAI](#grok--xai)
|
|
14
|
+
- [OpenAI](#openai)
|
|
15
|
+
- [Google Gemini](#google-gemini)
|
|
16
|
+
- [OpenRouter](#openrouter)
|
|
17
|
+
- [Cost Comparison](#cost-comparison)
|
|
18
|
+
- [Free Tier Information](#free-tier-information)
|
|
19
|
+
- [Usage Monitoring](#usage-monitoring)
|
|
20
|
+
- [Rate Limits](#rate-limits)
|
|
21
|
+
- [Best Practices](#best-practices)
|
|
22
|
+
- [Troubleshooting](#troubleshooting)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Overview
|
|
27
|
+
|
|
28
|
+
TachiBot MCP works with multiple AI providers to offer diverse capabilities. You only need API keys for the providers you want to use.
|
|
29
|
+
|
|
30
|
+
### Minimal Setup (Basic Research)
|
|
31
|
+
- **Perplexity API Key** - For web search and research
|
|
32
|
+
|
|
33
|
+
### Recommended Setup (Full Power)
|
|
34
|
+
- **Perplexity API Key** - Web search and research
|
|
35
|
+
- **Grok API Key** - Live web search, reasoning
|
|
36
|
+
- **OpenAI API Key** - GPT-5 brainstorming, comparison
|
|
37
|
+
|
|
38
|
+
### Complete Setup (All Features)
|
|
39
|
+
- All of the above, plus:
|
|
40
|
+
- **Google API Key** - Gemini models
|
|
41
|
+
- **OpenRouter API Key** - Qwen models
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Required vs Optional Keys
|
|
46
|
+
|
|
47
|
+
| Provider | Required For | Tools Affected |
|
|
48
|
+
|----------|--------------|----------------|
|
|
49
|
+
| **Perplexity** | Research, web search | `perplexity_ask`, `perplexity_research`, `perplexity_reason`, `scout` (default) |
|
|
50
|
+
| **Grok/xAI** | Live search, reasoning | `grok_search`, `grok_reason`, `grok_code`, `grok_debug`, `grok_architect`, `grok_brainstorm`, `scout` (with grok) |
|
|
51
|
+
| **OpenAI** | GPT-5 models | `openai_brainstorm`, `openai_compare`, `focus` (some modes), `verifier`, `challenger` |
|
|
52
|
+
| **Google** | Gemini models | `gemini_brainstorm`, `gemini_analyze_code`, `gemini_analyze_text`, `verifier`, `scout` |
|
|
53
|
+
| **OpenRouter** | Qwen models | `qwen_coder`, `qwen_competitive` |
|
|
54
|
+
|
|
55
|
+
**Note:** The `focus` tool and advanced modes (`verifier`, `scout`, `challenger`) automatically use available providers. More API keys = more capabilities.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Provider Details
|
|
60
|
+
|
|
61
|
+
### Perplexity
|
|
62
|
+
|
|
63
|
+
Perplexity provides real-time web search and research capabilities with citations.
|
|
64
|
+
|
|
65
|
+
#### Get Your API Key
|
|
66
|
+
|
|
67
|
+
1. **Sign Up:** https://www.perplexity.ai/
|
|
68
|
+
2. **Navigate to Settings:** https://www.perplexity.ai/settings/api
|
|
69
|
+
3. **Generate API Key:** Click "Generate New API Key"
|
|
70
|
+
4. **Copy the key** - You won't be able to see it again!
|
|
71
|
+
|
|
72
|
+
#### Models Available
|
|
73
|
+
|
|
74
|
+
- **sonar-pro** - Latest web search (used by `perplexity_ask`)
|
|
75
|
+
- **sonar-reasoning-pro** - Advanced reasoning (used by `perplexity_reason`)
|
|
76
|
+
- **sonar-research** - Deep research (used by `perplexity_research`)
|
|
77
|
+
|
|
78
|
+
#### Pricing
|
|
79
|
+
|
|
80
|
+
| Model | Input | Output | Best For |
|
|
81
|
+
|-------|-------|--------|----------|
|
|
82
|
+
| Sonar Pro | $3.00 / 1M tokens | $15.00 / 1M tokens | Quick search |
|
|
83
|
+
| Sonar Reasoning Pro | $5.00 / 1M tokens | $25.00 / 1M tokens | Complex reasoning |
|
|
84
|
+
|
|
85
|
+
**Free Tier:** $5 credit on signup (typically ~100-200 queries)
|
|
86
|
+
|
|
87
|
+
#### Rate Limits
|
|
88
|
+
|
|
89
|
+
- **Standard:** 20 requests/minute
|
|
90
|
+
- **Pro:** 100 requests/minute
|
|
91
|
+
|
|
92
|
+
#### Cost Estimation
|
|
93
|
+
|
|
94
|
+
- Single `perplexity_ask`: ~$0.01 - $0.02
|
|
95
|
+
- Single `perplexity_research` (deep): ~$0.10 - $0.30
|
|
96
|
+
- 100 searches/day ≈ $1-2/day
|
|
97
|
+
|
|
98
|
+
#### Add to .env
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
PERPLEXITY_API_KEY=pplx-abc123...
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### Grok / xAI
|
|
107
|
+
|
|
108
|
+
Grok (by xAI) provides live web search, reasoning, and code analysis.
|
|
109
|
+
|
|
110
|
+
#### Get Your API Key
|
|
111
|
+
|
|
112
|
+
1. **Sign Up:** https://console.x.ai/
|
|
113
|
+
2. **Navigate to API Keys:** In the console dashboard
|
|
114
|
+
3. **Create New Key:** Click "Create API Key"
|
|
115
|
+
4. **Copy and save** the key immediately
|
|
116
|
+
|
|
117
|
+
#### Models Available
|
|
118
|
+
|
|
119
|
+
- **grok-4** - Latest reasoning model
|
|
120
|
+
- **grok-4-0709** - Specific version
|
|
121
|
+
- **grok-4-heavy** - Extended context (256k tokens)
|
|
122
|
+
|
|
123
|
+
#### Pricing
|
|
124
|
+
|
|
125
|
+
| Model | Input | Output | Notes |
|
|
126
|
+
|-------|-------|--------|-------|
|
|
127
|
+
| Grok-4 | $5.00 / 1M tokens | $15.00 / 1M tokens | Standard |
|
|
128
|
+
| Grok-4-heavy | $10.00 / 1M tokens | $30.00 / 1M tokens | 256k context |
|
|
129
|
+
| **Live Search** | **$5 / 1k sources** | - | Extra cost per search! |
|
|
130
|
+
|
|
131
|
+
**Important:** Grok live search (`grok_search` tool) costs $5 per 1000 sources searched. Control with `maxSearchSources` parameter or `GROK_SEARCH_SOURCES_LIMIT` env var.
|
|
132
|
+
|
|
133
|
+
#### Free Tier
|
|
134
|
+
|
|
135
|
+
- **$25 credit** on signup
|
|
136
|
+
- Usually good for 1000-2000 queries or 20-50 live searches
|
|
137
|
+
|
|
138
|
+
#### Rate Limits
|
|
139
|
+
|
|
140
|
+
- **Standard:** 60 requests/minute
|
|
141
|
+
- **Enterprise:** 600 requests/minute
|
|
142
|
+
|
|
143
|
+
#### Cost Estimation
|
|
144
|
+
|
|
145
|
+
- Single `grok_reason`: ~$0.02 - $0.05
|
|
146
|
+
- Single `grok_search` (20 sources): ~$0.15 - $0.25
|
|
147
|
+
- Single `grok_search` (100 sources): ~$0.50 - $0.70
|
|
148
|
+
|
|
149
|
+
**Tip:** Use `scout` with `searchProvider: "perplexity"` for cheaper searches, reserve Grok for when you need live data.
|
|
150
|
+
|
|
151
|
+
#### Add to .env
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
GROK_API_KEY=xai-abc123...
|
|
155
|
+
# OR (alternative)
|
|
156
|
+
XAI_API_KEY=xai-abc123...
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### OpenAI
|
|
162
|
+
|
|
163
|
+
OpenAI provides GPT-5 models for brainstorming, comparison, and reasoning.
|
|
164
|
+
|
|
165
|
+
#### Get Your API Key
|
|
166
|
+
|
|
167
|
+
1. **Sign Up:** https://platform.openai.com/signup
|
|
168
|
+
2. **Navigate to API Keys:** https://platform.openai.com/api-keys
|
|
169
|
+
3. **Create New Secret Key**
|
|
170
|
+
4. **Copy immediately** - not shown again!
|
|
171
|
+
|
|
172
|
+
#### Models Available
|
|
173
|
+
|
|
174
|
+
- **gpt-5** - Full GPT-5 with deep reasoning
|
|
175
|
+
- **gpt-5-mini** - Faster, cheaper GPT-5
|
|
176
|
+
- **gpt-5-nano** - Quickest, cheapest
|
|
177
|
+
- **qwq-32b**, **qwen3-30b**, **qwen3-coder-480b** - Via OpenAI (if configured)
|
|
178
|
+
|
|
179
|
+
#### Pricing
|
|
180
|
+
|
|
181
|
+
| Model | Input | Output | Notes |
|
|
182
|
+
|-------|-------|--------|-------|
|
|
183
|
+
| GPT-5 | $15.00 / 1M tokens | $60.00 / 1M tokens | Full reasoning |
|
|
184
|
+
| GPT-5-mini | $2.00 / 1M tokens | $8.00 / 1M tokens | Most balanced |
|
|
185
|
+
| GPT-5-nano | $0.40 / 1M tokens | $1.60 / 1M tokens | Budget option |
|
|
186
|
+
|
|
187
|
+
**Warning:** GPT-5 models may generate invisible reasoning tokens that increase costs. Monitor usage carefully.
|
|
188
|
+
|
|
189
|
+
#### Free Tier
|
|
190
|
+
|
|
191
|
+
- **$5 credit** for new accounts
|
|
192
|
+
- Must add payment method after trial
|
|
193
|
+
|
|
194
|
+
#### Rate Limits
|
|
195
|
+
|
|
196
|
+
| Tier | Requests/Min | Tokens/Min |
|
|
197
|
+
|------|--------------|------------|
|
|
198
|
+
| Free | 3 | 40,000 |
|
|
199
|
+
| Tier 1 | 500 | 30,000 |
|
|
200
|
+
| Tier 2 | 5,000 | 450,000 |
|
|
201
|
+
|
|
202
|
+
#### Cost Estimation
|
|
203
|
+
|
|
204
|
+
- Single `openai_brainstorm` (gpt-5-mini): ~$0.01 - $0.03
|
|
205
|
+
- Single `openai_brainstorm` (gpt-5): ~$0.15 - $0.40
|
|
206
|
+
- Single `openai_compare`: ~$0.02 - $0.05
|
|
207
|
+
|
|
208
|
+
**Tip:** Use `model: "gpt-5-mini"` by default, only use `gpt-5` for complex tasks.
|
|
209
|
+
|
|
210
|
+
#### Add to .env
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
OPENAI_API_KEY=sk-abc123...
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
### Google Gemini
|
|
219
|
+
|
|
220
|
+
Google's Gemini models for analysis, brainstorming, and text processing.
|
|
221
|
+
|
|
222
|
+
#### Get Your API Key
|
|
223
|
+
|
|
224
|
+
1. **Go to AI Studio:** https://aistudio.google.com/apikey
|
|
225
|
+
2. **Click "Get API Key"**
|
|
226
|
+
3. **Create API key** for existing project or create new project
|
|
227
|
+
4. **Copy the key**
|
|
228
|
+
|
|
229
|
+
#### Models Available
|
|
230
|
+
|
|
231
|
+
- **gemini-2.5-flash** - Fast, cost-effective
|
|
232
|
+
- **gemini-2.5-pro** - Advanced reasoning
|
|
233
|
+
|
|
234
|
+
#### Pricing
|
|
235
|
+
|
|
236
|
+
| Model | Input | Output |
|
|
237
|
+
|-------|-------|--------|
|
|
238
|
+
| Gemini 2.5 Flash | $0.075 / 1M tokens | $0.30 / 1M tokens |
|
|
239
|
+
| Gemini 2.5 Pro | $1.25 / 1M tokens | $5.00 / 1M tokens |
|
|
240
|
+
|
|
241
|
+
**Free Tier:**
|
|
242
|
+
- **15 requests/minute** (free tier)
|
|
243
|
+
- **1,500 requests/day** (free tier)
|
|
244
|
+
- Very generous for experimentation!
|
|
245
|
+
|
|
246
|
+
#### Rate Limits
|
|
247
|
+
|
|
248
|
+
| Tier | Requests/Min | Requests/Day |
|
|
249
|
+
|------|--------------|--------------|
|
|
250
|
+
| Free | 15 | 1,500 |
|
|
251
|
+
| Paid | 1,000 | 50,000 |
|
|
252
|
+
|
|
253
|
+
#### Cost Estimation
|
|
254
|
+
|
|
255
|
+
- Single `gemini_brainstorm`: ~$0.001 - $0.005 (flash) or ~$0.02 - $0.05 (pro)
|
|
256
|
+
- Single `gemini_analyze_code`: ~$0.005 - $0.02
|
|
257
|
+
- Gemini is very cost-effective!
|
|
258
|
+
|
|
259
|
+
#### Add to .env
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
GOOGLE_API_KEY=AIzaSy...
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
### OpenRouter
|
|
268
|
+
|
|
269
|
+
OpenRouter provides access to Qwen models and other open-source models.
|
|
270
|
+
|
|
271
|
+
#### Get Your API Key
|
|
272
|
+
|
|
273
|
+
1. **Sign Up:** https://openrouter.ai/
|
|
274
|
+
2. **Navigate to Keys:** https://openrouter.ai/keys
|
|
275
|
+
3. **Create New Key**
|
|
276
|
+
4. **Add credits** to your account ($10 minimum recommended)
|
|
277
|
+
|
|
278
|
+
#### Models Available (via TachiBot)
|
|
279
|
+
|
|
280
|
+
- **qwen/qwen3-coder** - 480B MoE coder (BEST for code)
|
|
281
|
+
- **qwen/qwq-32b** - Reasoning model
|
|
282
|
+
- **qwen/qwen3-30b** - General purpose
|
|
283
|
+
|
|
284
|
+
#### Pricing
|
|
285
|
+
|
|
286
|
+
| Model | Input | Output |
|
|
287
|
+
|-------|-------|--------|
|
|
288
|
+
| Qwen3-coder-480B | $1.50 / 1M tokens | $6.00 / 1M tokens |
|
|
289
|
+
| QwQ-32B | $0.20 / 1M tokens | $0.80 / 1M tokens |
|
|
290
|
+
| Qwen3-30B | $0.60 / 1M tokens | $2.40 / 1M tokens |
|
|
291
|
+
|
|
292
|
+
**Free Tier:** Some models have free tier, but Qwen models are paid only.
|
|
293
|
+
|
|
294
|
+
#### Rate Limits
|
|
295
|
+
|
|
296
|
+
Varies by model, generally:
|
|
297
|
+
- **Free models:** 20 requests/minute
|
|
298
|
+
- **Paid models:** 100+ requests/minute
|
|
299
|
+
|
|
300
|
+
#### Cost Estimation
|
|
301
|
+
|
|
302
|
+
- Single `qwen_coder` (generate): ~$0.05 - $0.15
|
|
303
|
+
- Single `qwen_coder` (review): ~$0.02 - $0.08
|
|
304
|
+
- Very cost-effective for code tasks!
|
|
305
|
+
|
|
306
|
+
#### Add to .env
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
OPENROUTER_API_KEY=sk-or-v1-abc123...
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Cost Comparison
|
|
315
|
+
|
|
316
|
+
**Approximate cost per 1000 queries** (typical usage):
|
|
317
|
+
|
|
318
|
+
| Provider | Light Use | Medium Use | Heavy Use |
|
|
319
|
+
|----------|-----------|------------|-----------|
|
|
320
|
+
| **Perplexity** | $10-20 | $50-100 | $200-500 |
|
|
321
|
+
| **Grok** | $20-50 | $100-200 | $500-1000 |
|
|
322
|
+
| **OpenAI (mini)** | $10-30 | $50-150 | $200-600 |
|
|
323
|
+
| **OpenAI (GPT-5)** | $100-300 | $500-1500 | $2000+ |
|
|
324
|
+
| **Gemini (flash)** | $1-5 | $10-30 | $50-150 |
|
|
325
|
+
| **Gemini (pro)** | $20-50 | $100-250 | $500-1000 |
|
|
326
|
+
| **OpenRouter (Qwen)** | $5-20 | $30-100 | $150-500 |
|
|
327
|
+
|
|
328
|
+
**Most Cost-Effective Setup:**
|
|
329
|
+
- Perplexity (search) + Gemini Flash (analysis) + OpenAI mini (brainstorming)
|
|
330
|
+
- Estimated: **$30-100/month** for regular use
|
|
331
|
+
|
|
332
|
+
**Power User Setup:**
|
|
333
|
+
- All providers enabled
|
|
334
|
+
- Estimated: **$200-500/month** for heavy use
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Free Tier Information
|
|
339
|
+
|
|
340
|
+
### Best Free Tiers
|
|
341
|
+
|
|
342
|
+
1. **Google Gemini** - 1,500 requests/day, very generous
|
|
343
|
+
2. **Perplexity** - $5 credit (~100-200 queries)
|
|
344
|
+
3. **Grok** - $25 credit (~1000-2000 queries)
|
|
345
|
+
4. **OpenAI** - $5 credit (~200-500 queries with mini)
|
|
346
|
+
|
|
347
|
+
### Free Tier Strategy
|
|
348
|
+
|
|
349
|
+
Start with this order:
|
|
350
|
+
1. **Week 1:** Use Gemini free tier (1500 req/day)
|
|
351
|
+
2. **Week 2:** Use Perplexity $5 credit
|
|
352
|
+
3. **Week 3:** Use Grok $25 credit
|
|
353
|
+
4. **Week 4:** Use OpenAI $5 credit
|
|
354
|
+
5. **Month 2:** Add payment method to favorite provider
|
|
355
|
+
|
|
356
|
+
This gives you ~1 month of free usage!
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Usage Monitoring
|
|
361
|
+
|
|
362
|
+
### Provider Dashboards
|
|
363
|
+
|
|
364
|
+
Monitor usage at:
|
|
365
|
+
- **Perplexity:** https://www.perplexity.ai/settings/billing
|
|
366
|
+
- **Grok:** https://console.x.ai/billing
|
|
367
|
+
- **OpenAI:** https://platform.openai.com/usage
|
|
368
|
+
- **Google:** https://console.cloud.google.com/billing
|
|
369
|
+
- **OpenRouter:** https://openrouter.ai/activity
|
|
370
|
+
|
|
371
|
+
### Alerts
|
|
372
|
+
|
|
373
|
+
Set up alerts in provider dashboards:
|
|
374
|
+
- OpenAI: Usage limits at https://platform.openai.com/settings/organization/limits
|
|
375
|
+
- Google Cloud: Budget alerts in console
|
|
376
|
+
- OpenRouter: Email alerts in settings
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## Rate Limits
|
|
381
|
+
|
|
382
|
+
### Handling Rate Limits
|
|
383
|
+
|
|
384
|
+
TachiBot automatically handles rate limits with:
|
|
385
|
+
- Exponential backoff
|
|
386
|
+
- Request queuing
|
|
387
|
+
- Fallback to alternative providers
|
|
388
|
+
|
|
389
|
+
### If You Hit Limits
|
|
390
|
+
|
|
391
|
+
1. **Wait** - Limits reset every minute
|
|
392
|
+
2. **Use alternative tool** - e.g., `perplexity_ask` instead of `grok_search`
|
|
393
|
+
3. **Upgrade tier** - Most providers offer higher tiers
|
|
394
|
+
4. **Enable fallbacks** - Use multiple providers for redundancy
|
|
395
|
+
|
|
396
|
+
### Rate Limit Reference
|
|
397
|
+
|
|
398
|
+
| Provider | Free Tier | Paid Tier 1 | Paid Tier 2 |
|
|
399
|
+
|----------|-----------|-------------|-------------|
|
|
400
|
+
| Perplexity | 20/min | 100/min | Custom |
|
|
401
|
+
| Grok | 60/min | 60/min | 600/min |
|
|
402
|
+
| OpenAI | 3/min | 500/min | 5000/min |
|
|
403
|
+
| Gemini | 15/min | 1000/min | Custom |
|
|
404
|
+
| OpenRouter | 20/min | 100/min | Custom |
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## Best Practices
|
|
409
|
+
|
|
410
|
+
### 1. Start Small
|
|
411
|
+
|
|
412
|
+
Begin with one provider:
|
|
413
|
+
- **Research focus:** Start with Perplexity
|
|
414
|
+
- **Code focus:** Start with Gemini (free tier)
|
|
415
|
+
- **General use:** Start with OpenAI mini
|
|
416
|
+
|
|
417
|
+
### 2. Use Profiles to Control Costs
|
|
418
|
+
|
|
419
|
+
Select a minimal profile to reduce tool count and API calls:
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
TACHIBOT_PROFILE=minimal # Only 8 tools, lowest cost
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
See [TOOL_PROFILES.md](TOOL_PROFILES.md) for details.
|
|
426
|
+
|
|
427
|
+
### 3. Choose Right Tools for Task
|
|
428
|
+
|
|
429
|
+
- **Quick fact check:** `perplexity_ask` (cheap)
|
|
430
|
+
- **Deep research:** `perplexity_research` (expensive, use sparingly)
|
|
431
|
+
- **Live data:** `grok_search` with low `maxSearchSources` (10-20)
|
|
432
|
+
- **Code tasks:** `gemini_analyze_code` or `qwen_coder` (cost-effective)
|
|
433
|
+
- **Brainstorming:** `gemini_brainstorm` or `openai_brainstorm` with `model: "gpt-5-mini"`
|
|
434
|
+
|
|
435
|
+
### 4. Monitor Regularly
|
|
436
|
+
|
|
437
|
+
Check usage weekly:
|
|
438
|
+
- Review provider dashboards
|
|
439
|
+
- Check TachiBot logs
|
|
440
|
+
- Adjust usage patterns if costs are high
|
|
441
|
+
|
|
442
|
+
### 5. Optimize Search Parameters
|
|
443
|
+
|
|
444
|
+
Control Grok search costs:
|
|
445
|
+
|
|
446
|
+
```typescript
|
|
447
|
+
grok_search({
|
|
448
|
+
query: "...",
|
|
449
|
+
max_search_results: 20, // Lower = cheaper
|
|
450
|
+
sources: [{
|
|
451
|
+
type: "web",
|
|
452
|
+
allowed_websites: ["python.org"] // Restrict domains
|
|
453
|
+
}]
|
|
454
|
+
})
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
### 6. Use Caching
|
|
458
|
+
|
|
459
|
+
Enable caching to avoid duplicate API calls:
|
|
460
|
+
|
|
461
|
+
```bash
|
|
462
|
+
TACHI_ENABLE_CACHE=true
|
|
463
|
+
TACHI_CACHE_TTL=3600 # 1 hour
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
---
|
|
467
|
+
|
|
468
|
+
## Troubleshooting
|
|
469
|
+
|
|
470
|
+
### "Invalid API Key" Error
|
|
471
|
+
|
|
472
|
+
**Symptoms:** Tool fails with "401 Unauthorized" or "Invalid API key"
|
|
473
|
+
|
|
474
|
+
**Solutions:**
|
|
475
|
+
1. Verify key is correct in `.env`
|
|
476
|
+
2. Check key hasn't expired (regenerate if needed)
|
|
477
|
+
3. Ensure no extra spaces or quotes around key
|
|
478
|
+
4. Restart the server after changing `.env`
|
|
479
|
+
|
|
480
|
+
### "Rate Limit Exceeded"
|
|
481
|
+
|
|
482
|
+
**Symptoms:** "429 Too Many Requests" error
|
|
483
|
+
|
|
484
|
+
**Solutions:**
|
|
485
|
+
1. Wait 1 minute and retry
|
|
486
|
+
2. Reduce request frequency
|
|
487
|
+
3. Upgrade to paid tier for higher limits
|
|
488
|
+
4. Use alternative tool/provider
|
|
489
|
+
|
|
490
|
+
### "Insufficient Credits"
|
|
491
|
+
|
|
492
|
+
**Symptoms:** "402 Payment Required" or "Insufficient funds"
|
|
493
|
+
|
|
494
|
+
**Solutions:**
|
|
495
|
+
1. Check provider billing dashboard
|
|
496
|
+
2. Add credits/payment method
|
|
497
|
+
3. Use alternative provider temporarily
|
|
498
|
+
|
|
499
|
+
### High Unexpected Costs
|
|
500
|
+
|
|
501
|
+
**Symptoms:** Bill higher than expected
|
|
502
|
+
|
|
503
|
+
**Solutions:**
|
|
504
|
+
1. Check provider usage dashboard
|
|
505
|
+
2. Review which tools are being used
|
|
506
|
+
3. Switch to `minimal` or `balanced` profile
|
|
507
|
+
4. Avoid `grok_search` with high `maxSearchSources`
|
|
508
|
+
5. Use `gpt-5-mini` instead of `gpt-5`
|
|
509
|
+
|
|
510
|
+
### API Key Not Working After Setup
|
|
511
|
+
|
|
512
|
+
**Symptoms:** Key added to `.env` but still getting errors
|
|
513
|
+
|
|
514
|
+
**Solutions:**
|
|
515
|
+
1. Restart the TachiBot server (IMPORTANT)
|
|
516
|
+
2. Check `.env` is in the correct directory
|
|
517
|
+
3. Verify no typos in key name (e.g., `PERPLEXITY_API_KEY` not `PERPLEXITY_KEY`)
|
|
518
|
+
4. Check file is named `.env` exactly (not `.env.example`)
|
|
519
|
+
|
|
520
|
+
---
|
|
521
|
+
|
|
522
|
+
## Security Best Practices
|
|
523
|
+
|
|
524
|
+
### Protect Your Keys
|
|
525
|
+
|
|
526
|
+
1. **Never commit `.env` to git**
|
|
527
|
+
- Add `.env` to `.gitignore`
|
|
528
|
+
- Use `.env.example` for templates
|
|
529
|
+
|
|
530
|
+
2. **Rotate keys periodically**
|
|
531
|
+
- Regenerate every 3-6 months
|
|
532
|
+
- Immediately if leaked
|
|
533
|
+
|
|
534
|
+
3. **Use separate keys per project**
|
|
535
|
+
- Don't reuse keys across projects
|
|
536
|
+
- Easier to track usage
|
|
537
|
+
|
|
538
|
+
4. **Set spending limits in provider dashboards**
|
|
539
|
+
- OpenAI: Hard limits in settings
|
|
540
|
+
- OpenRouter: Budget alerts
|
|
541
|
+
- Google Cloud: Budget alerts
|
|
542
|
+
|
|
543
|
+
### If a Key is Compromised
|
|
544
|
+
|
|
545
|
+
1. **Immediately revoke** the key in provider dashboard
|
|
546
|
+
2. **Generate new key**
|
|
547
|
+
3. **Update `.env`**
|
|
548
|
+
4. **Restart server**
|
|
549
|
+
5. **Review usage** for unauthorized activity
|
|
550
|
+
6. **Report to provider** if fraudulent charges
|
|
551
|
+
|
|
552
|
+
---
|
|
553
|
+
|
|
554
|
+
## Next Steps
|
|
555
|
+
|
|
556
|
+
- ✅ Got your API keys? → See [INSTALLATION.md](INSTALLATION.md)
|
|
557
|
+
- ✅ Configured `.env`? → See [QUICKSTART.md](QUICKSTART.md)
|
|
558
|
+
- ✅ Want to optimize costs? → See [TOOL_PROFILES.md](TOOL_PROFILES.md)
|
|
559
|
+
- ✅ Need help with tools? → See [TOOLS_REFERENCE.md](TOOLS_REFERENCE.md)
|
|
560
|
+
|
|
561
|
+
---
|
|
562
|
+
|
|
563
|
+
## Support
|
|
564
|
+
|
|
565
|
+
- **Issues:** https://github.com/byPawel/tachibot-mcp/issues
|
|
566
|
+
- **Discussions:** https://github.com/byPawel/tachibot-mcp/discussions
|
|
567
|
+
|
|
568
|
+
---
|
|
569
|
+
|
|
570
|
+
**Remember:** You only pay for what you use. Start with free tiers, monitor usage, and scale up as needed!
|