atabey-mcp 0.0.12 → 0.0.13

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/README.md CHANGED
@@ -6,94 +6,238 @@
6
6
 
7
7
  The **Model Context Protocol (MCP)** server for [Agent Atabey](https://www.npmjs.com/package/atabey).
8
8
 
9
- Bu paket, AI asistanları (Claude Code, Gemini CLI, Cursor, Antigravity CLI) ile yerel proje ortamınız arasında köprü görevi görür. 30+ araç ile güvenli, denetimli ve tip-güvenli bir etkileşim sağlar.
9
+ This package bridges AI assistants (Claude Code, Gemini CLI, Cursor, Codex, Antigravity) with your local project environment. Provides **30+ secure, audited, type-safe tools** across 10 categories. Includes the **Hermes Control Center** dashboard with 8 live modules.
10
10
 
11
- ## 🚀 Özellikler / Features
11
+ > **Main Package:** [`atabey`](https://www.npmjs.com/package/atabey) (CLI + Framework)
12
12
 
13
- | Özellik | Açıklama |
14
- |---------|----------|
15
- | **Sıkı Yönetişim** | Zero Type Hole, Zero Console politikaları, AST analizi ile denetim |
16
- | **Cerrahi Düzenleme** | `patch_file` ve `replace_text` ile tam dosya yeniden yazımı yerine satır bazlı düzenleme |
17
- | **Hermes Message Broker** | Uzman ajanlar arası asenkron iletişim (`@manager`, `@architect`, `@security`, vb.) |
18
- | **Bellek Yönetimi** | Proje geçmişinin tamamını dökmek yerine hedeflenmiş, budanmış bağlam |
19
- | **Risk Engine** | Yüksek riskli işlemler için otomatik engelleme veya insan onayı |
13
+ ---
14
+
15
+ ## 📋 Table of Contents
20
16
 
21
- ## 📦 Kurulum / Installation
17
+ - [Installation](#installation)
18
+ - [How It Works](#how-it-works)
19
+ - [Hermes Control Center Dashboard](#hermes-control-center-dashboard)
20
+ - [Provided Tools (30+)](#provided-tools-30)
21
+ - [MCP Configuration](#mcp-configuration)
22
+ - [Development](#development)
23
+ - [Testing](#testing)
24
+
25
+ ---
26
+
27
+ ## Installation
22
28
 
23
29
  ```bash
24
- # Global kurulum (genelde init ile otomatik gelir)
30
+ # Run with npx (no install needed)
31
+ npx atabey-mcp
32
+
33
+ # Global install
25
34
  npm install -g atabey-mcp
26
35
 
27
- # Projeye ekleme
36
+ # Add to project
28
37
  npm install atabey-mcp
29
38
  ```
30
39
 
31
- ## 🛠️ Sağlanan Araçlar / Provided Tools (30+)
32
-
33
- ### 📁 Dosya Sistemi / File System
34
- | Araç | Açıklama |
35
- |------|---------|
36
- | `read_file` | Dosya okuma |
37
- | `write_file` | Dosya yazma |
38
- | `replace_text` | Metin değiştirme |
39
- | `patch_file` | Yama uygulama |
40
- | `batch_surgical_edit` | Toplu cerrahi düzenleme |
41
- | `list_dir` | Dizin listeleme |
42
- | `grep_search` | Regex arama |
43
-
44
- ### 🎛️ Kontrol Paneli / Control Plane
45
- | Araç | Açıklama |
46
- |------|---------|
47
- | `acquire_lock` | Kaynak kilidi al |
48
- | `release_lock` | Kaynak kilidini bırak |
49
- | `register_agent` | Ajan kaydet |
50
-
51
- ### 🔍 Arama & Haritalama / Search & Map
52
- | Araç | Açıklama |
53
- |------|---------|
54
- | `get_project_map` | Proje haritası |
55
- | `get_project_gaps` | Proje boşlukları |
56
- | `search_knowledge` | Bilgi tabanında ara |
57
- | `store_knowledge` | Bilgi tabanına ekle |
58
-
59
- ### 📊 Kalite & Gözlem / Quality & Observability
60
- | Araç | Açıklama |
61
- |------|---------|
62
- | `check_lint` | Lint kontrolü |
63
- | `check_compliance` | Uyumluluk denetimi |
64
- | `run_tests` | Test çalıştır |
65
- | `get_system_health` | Sistem sağlığı |
66
- | `check_active_ports` | Port denetimi |
67
- | `audit_dependencies` | Bağımlılık denetimi |
68
-
69
- ### 💬 Mesajlaşma / Messaging
70
- | Araç | Açıklama |
71
- |------|---------|
72
- | `send_agent_message` | Ajanlar arası mesaj |
73
- | `log_agent_action` | Ajan eylemlerini logla |
74
-
75
- ### 🧠 Bellek & Framework / Memory & Framework
76
- | Araç | Açıklama |
77
- |------|---------|
78
- | `read_project_memory` | Proje hafızasını oku |
79
- | `update_project_memory` | Proje hafızasını güncelle |
80
- | `get_memory_insights` | Bellek içgörüleri |
81
- | `get_framework_status` | Framework durumu |
82
-
83
- ### ⚡ Çalıştırma / Execution
84
- | Araç | Açıklama |
85
- |------|---------|
86
- | `run_shell_command` | Shell komutu çalıştır |
87
- | `run_tests` | Test çalıştır |
88
-
89
- ## 🔧 Claude Code ile Kullanım
40
+ ---
41
+
42
+ ## How It Works
43
+
44
+ Atabey MCP Server connects your AI assistant to your project via the **Model Context Protocol**:
45
+
46
+ ```
47
+ AI Assistant (Claude/Gemini/Cursor)
48
+
49
+ ▼ MCP Protocol (stdio transport)
50
+
51
+ Atabey MCP Server (30+ tools)
52
+
53
+
54
+ Your Project (files, database, git, shell)
55
+ ```
56
+
57
+ When you type `@backend Create login API` in your AI chat:
58
+ 1. The AI calls `send_agent_message` tool via MCP
59
+ 2. Atabey routes it through `RoutingEngine`
60
+ 3. The `@backend` agent executes the task
61
+ 4. `QualityGate` validates the output
62
+ 5. Result is stored in `Vector Memory`
63
+
64
+ **No separate terminal needed. No CLI commands for daily use.**
65
+
66
+ ---
67
+
68
+ ## Hermes Control Center Dashboard
69
+
70
+ The MCP package includes a real-time WebSocket dashboard with 8 live modules:
71
+
72
+ | Module | Description | Update |
73
+ |--------|-------------|--------|
74
+ | 🤖 **Agent Monitor** | 13 AI agent status + live tasks | WS (5s) |
75
+ | 📨 **Hermes Messages** | Agent message queue + filtering | WS (5s) |
76
+ | 🔐 **Approval Center** | Human-in-the-Loop approvals | WS |
77
+ | 📋 **Task Planner** | Task DAG + progress tracking | REST (5s) |
78
+ | 📝 **Agent Logs** | Execution logs + agent filter | WS (5s) |
79
+ | ⚠️ **Error Tracker** | Lint/compliance/security errors | WS |
80
+ | 🧠 **Memory Insights** | Vector memory search | REST |
81
+ | 🛡️ **Compliance** | Quality gate violations | REST (15s) |
82
+
83
+ ```bash
84
+ # Start dashboard (default port: 5858)
85
+ npx atabey dashboard
86
+ # Browser: http://localhost:5858
87
+ ```
88
+
89
+ ### Dashboard Components
90
+
91
+ ```
92
+ framework-mcp/dashboard/src/
93
+ ├── App.tsx # Main app, routing and WS management
94
+ ├── main.tsx # React entry point
95
+ ├── styles.ts # PandaCSS styles
96
+ ├── components/
97
+ │ ├── AdapterSkillsPanel.tsx # Adapter skill mapping
98
+ │ ├── AgentMonitor.tsx # Agent status monitoring
99
+ │ ├── ApprovalCenter.tsx # Approval center
100
+ │ ├── CompliancePanel.tsx # Compliance control panel
101
+ │ ├── ErrorTracker.tsx # Error tracking
102
+ │ ├── GatewayPanel.tsx # LLM Gateway management
103
+ │ ├── HermesBrokerView.tsx # Hermes message queue
104
+ │ ├── HermesStats.tsx # Hermes statistics
105
+ │ ├── LogViewer.tsx # Log viewer
106
+ │ ├── MemoryInsights.tsx # Memory insights
107
+ │ ├── PlanViewer.tsx # Plan viewer
108
+ │ └── QualityPanel.tsx # Quality panel
109
+ └── hooks/
110
+ ├── useApi.ts # REST API hook
111
+ └── useWS.ts # WebSocket hook
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Provided Tools (30+)
117
+
118
+ ### File System
119
+
120
+ | Tool | Description | Zod Validation |
121
+ |------|-------------|----------------|
122
+ | `read_file` | Read file content with line range | ✅ |
123
+ | `write_file` | Atomic file write with directory creation | ✅ |
124
+ | `replace_text` | Surgical text replacement | ✅ |
125
+ | `patch_file` | Safe line-range update | ✅ |
126
+ | `batch_surgical_edit` | Multi-file batch editing | ✅ |
127
+
128
+ ### Search & Exploration
129
+
130
+ | Tool | Description |
131
+ |------|-------------|
132
+ | `list_dir` | List directory contents |
133
+ | `grep_search` | Recursive regex search |
134
+ | `get_project_map` | Project structure tree |
135
+ | `get_project_gaps` | Find TODOs, FIXMEs, gaps |
136
+
137
+ ### Control Plane
138
+
139
+ | Tool | Description |
140
+ |------|-------------|
141
+ | `acquire_lock` | Acquire resource lock |
142
+ | `release_lock` | Release resource lock |
143
+ | `register_agent` | Register agent instance |
144
+
145
+ ### Messaging (Hermes Protocol)
146
+
147
+ | Tool | Description |
148
+ |------|-------------|
149
+ | `send_agent_message` | Hermes protocol messaging |
150
+ | `log_agent_action` | Log agent actions |
151
+ | `ask_human` | Wait for human input |
152
+
153
+ ### Memory
154
+
155
+ | Tool | Description |
156
+ |------|-------------|
157
+ | `read_project_memory` | Read central memory |
158
+ | `update_project_memory` | Update memory section |
159
+ | `get_memory_insights` | Memory summaries |
160
+ | `store_knowledge` | Store vector knowledge |
161
+ | `search_knowledge` | Search vector memory |
162
+ | `delete_knowledge` | Delete knowledge entry |
163
+
164
+ ### Framework & Quality
165
+
166
+ | Tool | Description |
167
+ |------|-------------|
168
+ | `get_framework_status` | Framework status |
169
+ | `run_tests` | Run test suites |
170
+ | `check_lint` | Run ESLint |
171
+ | `update_contract_hash` | Sync contract hash |
172
+ | `orchestrate_loop` | Process Hermes messages |
173
+ | `submit_plan` | Submit DAG task plan |
174
+ | `audit_dependencies` | Audit package.json |
175
+ | `get_system_health` | CPU/RAM metrics |
176
+ | `check_active_ports` | Port monitoring |
177
+
178
+ ### Quality
179
+
180
+ | Tool | Description |
181
+ |------|-------------|
182
+ | `analyze_code_quality` | Code quality analysis |
183
+ | `check_architecture_compliance` | Architecture compliance check |
184
+ | `check_lint` | ESLint validation |
185
+
186
+ ### Observability
187
+
188
+ | Tool | Description |
189
+ |------|-------------|
190
+ | `get_health` | System health |
191
+ | `check_ports` | Port status |
192
+
193
+ ### Shell
194
+
195
+ | Tool | Description |
196
+ |------|-------------|
197
+ | `run_shell_command` | Execute shell commands |
198
+
199
+ ---
200
+
201
+ ## LLM Gateway Tools
202
+
203
+ ### `llm_gateway_query`
204
+
205
+ Sends queries to LLM providers with load balancing, circuit breaker, and rate limiting.
206
+
207
+ **Parameters:**
208
+ - `provider` (string): LLM provider name (`openai`, `anthropic`, `google`, `groq`, `ollama`)
209
+ - `model` (string): Model name
210
+ - `messages` (array): Chat messages
211
+ - `options` (object, optional): Temperature, max tokens, etc.
212
+
213
+ ### `llm_gateway_status`
214
+
215
+ Returns gateway status and provider statistics.
216
+
217
+ **Supported Providers:**
218
+
219
+ | Provider | Models | Status |
220
+ |----------|--------|--------|
221
+ | OpenAI | GPT-4, GPT-4o, o3, o4-mini | ✅ |
222
+ | Anthropic | Claude Opus 4.5, Sonnet 4.5, Haiku 3.5 | ✅ |
223
+ | Google | Gemini 2.5 Pro, Flash, Flash-Lite | ✅ |
224
+ | Groq | Llama, Mixtral | ✅ |
225
+ | Ollama | Local models | ✅ |
226
+
227
+ ---
228
+
229
+ ## MCP Configuration
230
+
231
+ ### Claude Code
232
+
233
+ Add to your `mcp.json`:
90
234
 
91
235
  ```json
92
236
  {
93
237
  "mcpServers": {
94
238
  "atabey": {
95
- "command": "node",
96
- "args": ["/path/to/atabey-mcp/dist/index.js"],
239
+ "command": "npx",
240
+ "args": ["atabey-mcp"],
97
241
  "env": {
98
242
  "ATABEY_PROJECT_ROOT": "/path/to/your/project"
99
243
  }
@@ -102,14 +246,117 @@ npm install atabey-mcp
102
246
  }
103
247
  ```
104
248
 
105
- ## 📖 Daha Fazla Bilgi
249
+ ### Environment Variables
250
+
251
+ | Variable | Description | Default |
252
+ |----------|-------------|---------|
253
+ | `ATABEY_PROJECT_ROOT` | Project root directory | `process.cwd()` |
254
+ | `PORT` or `DASHBOARD_PORT` | Dashboard port | `5858` |
255
+ | `NODE_ENV` | Environment (production/development) | `development` |
256
+
257
+ ### Gemini CLI
258
+
259
+ ```bash
260
+ gemini config set mcpServers.atabey.command "npx"
261
+ gemini config set mcpServers.atabey.args "[\"atabey-mcp\"]"
262
+ ```
263
+
264
+ ### Cursor
265
+
266
+ ```json
267
+ // .cursor/mcp.json
268
+ {
269
+ "mcpServers": {
270
+ "atabey": {
271
+ "command": "npx",
272
+ "args": ["atabey-mcp"]
273
+ }
274
+ }
275
+ }
276
+ ```
277
+
278
+ ---
279
+
280
+ ## Development
281
+
282
+ ```bash
283
+ # Install dependencies
284
+ npm install
285
+
286
+ # Build
287
+ npm run build
288
+
289
+ # Build dashboard
290
+ npm run build --prefix dashboard
291
+
292
+ # Development mode
293
+ npm run dev
294
+ ```
295
+
296
+ ### Project Structure
297
+
298
+ ```
299
+ framework-mcp/
300
+ ├── src/
301
+ │ ├── index.ts # MCP Server (Stdio Transport)
302
+ │ ├── constants.ts # MCP-specific constants
303
+ │ ├── declarations.d.ts # Type declarations
304
+ │ ├── resources/ # MCP Resources
305
+ │ ├── tools/
306
+ │ │ ├── definitions.ts # Tool definitions
307
+ │ │ ├── index.ts # Tool handlers
308
+ │ │ ├── schemas.ts # Zod validation schemas
309
+ │ │ ├── types.ts # Tool types
310
+ │ │ ├── control_plane/ # Lock, Registry
311
+ │ │ ├── file_system/ # Read, Write, Edit, Patch
312
+ │ │ ├── framework/ # Status, Test, Orchestrate
313
+ │ │ ├── gateway/ # LLM Gateway
314
+ │ │ ├── memory/ # Knowledge management
315
+ │ │ ├── messaging/ # Hermes messaging
316
+ │ │ ├── observability/ # Health, Port
317
+ │ │ ├── quality/ # Code quality
318
+ │ │ ├── search/ # Grep, Map, Gap
319
+ │ │ └── shell/ # Command execution
320
+ │ └── utils/ # Utilities
321
+ ├── dashboard/ # React Dashboard
322
+ └── tests/ # Tests
323
+ ```
324
+
325
+ ---
326
+
327
+ ## Testing
328
+
329
+ ```bash
330
+ # Run all tests
331
+ npm test
332
+
333
+ # Run specific test
334
+ npx vitest run tests/tools/file_system/file_system_tools.test.ts
335
+ ```
336
+
337
+ ### Current Test Files
338
+
339
+ | Test File | Scope |
340
+ |-----------|-------|
341
+ | `file_system/file_system_tools.test.ts` | Basic file system tools |
342
+ | `file_system/compliance-risk.test.ts` | Compliance risk analysis |
343
+ | `file_system/permissions.test.ts` | Permission controls |
344
+ | `messaging/send_message.test.ts` | Hermes messaging |
345
+ | `quality/check_lint.test.ts` | ESLint validation |
346
+ | `shell/run_command.test.ts` | Shell commands |
347
+
348
+ > **Note:** Gateway module tests are in the main package: `tests/modules/gateway/`
349
+
350
+ ---
106
351
 
107
- Tüm dokümantasyon, mimari detaylar ve kurumsal iletişim için ana depoyu ziyaret edin:
352
+ ## More Information
108
353
 
109
- - **Ana Paket:** [atabey](https://www.npmjs.com/package/atabey)
354
+ - **Main Package:** [`atabey`](https://www.npmjs.com/package/atabey) (CLI + Framework)
110
355
  - **GitHub:** [github.com/ysf-bkr/atabey](https://github.com/ysf-bkr/atabey)
356
+ - **Documentation:** [ARCHITECTURE.md](../ARCHITECTURE.md)
357
+ - **Contributing:** [CONTRIBUTING.md](../CONTRIBUTING.md)
111
358
  - **Enterprise:** ybekar@msn.com
112
359
 
113
360
  ---
114
361
 
115
- *Developed by **Yusuf BEKAR** — "Order from Chaos"*
362
+ *Developer: **Yusuf BEKAR** — "Order from Chaos"*