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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32dc112
f1b19d3
 
32dc112
 
 
f1b19d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
---

title: MissionControlMCP - Enterprise Automation Tools
emoji: πŸš€
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: "5.48.0"
app_file: app.py
pinned: false
tags:
- building-mcp-track-enterprise
- mcp-in-action-track-enterprise
- mcp
- anthropic
- enterprise-automation
- gradio-hackathon
- ai-agents
- mcp-server
---


# πŸš€ MissionControlMCP

**Enterprise Automation MCP Server for Document Analysis, Data Processing & Business Intelligence**

A fully functional Model Context Protocol (MCP) server providing 8 powerful enterprise automation tools for document processing, web scraping, semantic search, data visualization, and business analytics.

Built for the **MCP 1st Birthday Hackathon – Winter 2025** (Tracks: Building MCP + MCP in Action - Enterprise).

πŸ† **Hackathon Submission** | πŸ”§ **Both Tracks** | 🏒 **Enterprise Category**

---

## πŸ“± Social Media & Links

- 🎬 **Demo Video:** [Watch on YouTube](https://youtube.com/shorts/sElW_r3o3Og?feature=share) ⭐ **NEW**
- πŸ”— **LinkedIn Post:** [View Announcement](https://www.linkedin.com/posts/albaraa-alolabi_mcphackathon-gradiohackathon-huggingface-activity-7395722042223886336-kp7K?utm_source=share&utm_medium=member_desktop)
- πŸš€ **Live Demo:** [Try on Hugging Face](https://huggingface.co/spaces/MCP-1st-Birthday/MissionControlMCP)
- πŸ’» **GitHub Repository:** [Source Code](https://github.com/AlBaraa-1/MCPs-1st-Birthday-Hackathon/tree/main/mission_control_mcp)

---

## πŸ“‹ Table of Contents

- [Overview](#overview)
- [Features](#features)
- [Tools](#tools)
- [Installation](#installation)
- [Usage](#usage)
- [Tool Examples](#tool-examples)
- [Claude Desktop Integration](#claude-desktop-integration)
- [Development](#development)
- [Testing](#testing)
- [Architecture](#architecture)
- [Hackathon Submission](#hackathon-submission)

---

## 🎯 Overview

**MissionControlMCP** is an enterprise-grade MCP server that provides intelligent automation capabilities through 8 specialized tools. It enables AI assistants like Claude to perform complex document processing, data analysis, web research, and business intelligence tasks.

### Key Capabilities

- **πŸ“„ Document Processing**: Extract text from PDFs, process and summarize content
- **🌐 Web Intelligence**: Fetch and parse web content with clean text extraction
- **πŸ” Semantic Search**: RAG-based vector search using FAISS and sentence transformers
- **πŸ“Š Data Visualization**: Generate charts from CSV/JSON data
- **πŸ”„ File Conversion**: Convert between PDF, TXT, and CSV formats
- **πŸ“§ Email Classification**: Classify email intents using NLP
- **πŸ“ˆ KPI Generation**: Calculate business metrics and generate insights

---

## πŸ§ͺ Quick Test

```bash

# Test all tools with sample files

python demo.py

```

**See [TESTING.md](TESTING.md) for complete testing guide with examples!**

---

## ✨ Features

- βœ… **8 Production-Ready Tools** for enterprise automation
- βœ… **MCP Compliant** - Works with Claude Desktop and any MCP client
- βœ… **Type-Safe** - Built with Python 3.11+ and type hints
- βœ… **Modular Architecture** - Clean separation of concerns
- βœ… **Comprehensive Testing** - Test suite included
- βœ… **Well Documented** - Clear schemas and examples
- βœ… **Vector Search** - RAG implementation with FAISS
- βœ… **Data Visualization** - Base64 encoded chart generation
- βœ… **NLP Classification** - Rule-based intent detection

---

## πŸ› οΈ Tools

### 1. **pdf_reader**

Extract text and metadata from PDF files.



**Input:**

- `file_path`: Path to PDF file



**Output:**
- Extracted text from all pages
- Page count
- Document metadata (author, title, dates)

---

### 2. **text_extractor**

Process and extract information from text.



**Input:**

- `text`: Raw text to process

- `operation`: 'clean', 'summarize', 'chunk', or 'keywords'

- `max_length`: Max length for summaries (default: 500)



**Output:**
- Processed text
- Word count
- Operation metadata

---

### 3. **web_fetcher**

Fetch and extract content from web URLs.



**Input:**

- `url`: URL to fetch

- `extract_text_only`: Extract text only (default: true)



**Output:**

- Clean text content or HTML

- HTTP status code

- Response metadata



---



### 4. **rag_search**
Semantic search using RAG (Retrieval Augmented Generation).

**Input:**
- `query`: Search query
- `documents`: List of documents to search
- `top_k`: Number of results (default: 3)

**Output:**
- Ranked search results with similarity scores
- Document snippets
- Relevance rankings

---

### 5. **data_visualizer**

Create data visualizations and charts.



**Input:**

- `data`: JSON or CSV string data

- `chart_type`: 'bar', 'line', 'pie', or 'scatter'

- `x_column`, `y_column`: Column names

- `title`: Chart title



**Output:**
- Base64 encoded PNG image
- Chart dimensions
- Column information

---

### 6. **file_converter**

Convert files between formats.



**Input:**

- `input_path`: Path to input file

- `output_format`: 'txt', 'csv', or 'pdf'

- `output_path`: Optional output path



**Output:**
- Output file path
- Conversion status
- File size

**Supported Conversions:**
- PDF β†’ TXT
- TXT β†’ CSV
- CSV β†’ TXT

---

### 7. **email_intent_classifier**
Classify email intent using NLP.

**Input:**
- `email_text`: Email content to classify

**Output:**
- Primary intent (inquiry, complaint, request, feedback, meeting, order, urgent, follow_up, thank_you, application)
- Confidence score
- Secondary intents

---

### 8. **kpi_generator**

Generate business KPIs and insights.



**Input:**

- `data`: JSON string with business data

- `metrics`: List of metrics - 'revenue', 'growth', 'efficiency', 'customer', 'operational'



**Output:**

- Calculated KPIs

- Executive summary

- Key trends and insights



---



## πŸ“¦ Installation



### Prerequisites



- Python 3.11 or higher

- pip or uv package manager



### Setup



1. **Clone or download the repository:**



```bash

cd mission_control_mcp

```



2. **Install dependencies:**



```bash

pip install -r requirements.txt

```



Or using `uv`:



```bash

uv pip install -r requirements.txt

```



### Dependencies



- `mcp` - Model Context Protocol SDK

- `pypdf2` - PDF processing

- `requests` + `beautifulsoup4` - Web scraping

- `pandas` + `numpy` - Data processing

- `faiss-cpu` + `sentence-transformers` - Vector search

- `matplotlib` + `seaborn` - Data visualization

- `scikit-learn` + `nltk` - NLP and ML



---



## πŸš€ Usage



### Running the Server



#### For Development/Testing:



```bash

uvx mcp dev mission_control_mcp/mcp_server.py

```



Or with Python directly:



```bash

python mcp_server.py

```



#### For Production:



The server runs via stdio and is designed to be integrated with MCP clients like Claude Desktop.



---



## πŸ’‘ Tool Examples



### Example 1: Text Extraction & Summarization



```json

{

  "tool": "text_extractor",

  "arguments": {

    "text": "Your long document text here...",

    "operation": "summarize",

    "max_length": 200

  }

}

```



### Example 2: Web Content Fetching



```json

{

  "tool": "web_fetcher",

  "arguments": {

    "url": "https://example.com/article",

    "extract_text_only": true

  }

}

```



### Example 3: Semantic Search



```json

{

  "tool": "rag_search",

  "arguments": {

    "query": "machine learning algorithms",

    "documents": [

      "Document 1 about neural networks...",

      "Document 2 about decision trees...",

      "Document 3 about clustering..."

    ],

    "top_k": 3

  }

}

```



### Example 4: Data Visualization



```json

{

  "tool": "data_visualizer",

  "arguments": {

    "data": "{\"month\": [\"Jan\", \"Feb\", \"Mar\"], \"sales\": [1000, 1500, 1200]}",

    "chart_type": "bar",

    "x_column": "month",

    "y_column": "sales",

    "title": "Q1 Sales Report"

  }

}

```



### Example 5: Email Intent Classification



```json

{

  "tool": "email_intent_classifier",

  "arguments": {

    "email_text": "Hi, I need help with my recent order. It hasn't arrived yet and I'm wondering about the tracking status."

  }

}

```



### Example 6: KPI Generation



```json

{

  "tool": "kpi_generator",

  "arguments": {

    "data": "{\"revenue\": 1000000, \"costs\": 600000, \"customers\": 500, \"current_revenue\": 1000000, \"previous_revenue\": 800000}",

    "metrics": ["revenue", "growth", "efficiency"]

  }

}

```



---



## πŸ–₯️ Claude Desktop Integration



### Configuration



Add to your Claude Desktop config file (`claude_desktop_config.json`):



**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`

```json

{

  "mcpServers": {

    "mission-control": {

      "command": "python",

      "args": [

        "C:/Users/YourUser/path/to/mission_control_mcp/mcp_server.py"

      ]

    }

  }

}

```

Or with `uvx`:

```json

{

  "mcpServers": {

    "mission-control": {

      "command": "uvx",

      "args": [

        "mcp",

        "run",

        "C:/Users/YourUser/path/to/mission_control_mcp/mcp_server.py"

      ]

    }

  }

}

```

### Usage in Claude

After configuration, restart Claude Desktop. You can then ask Claude to:

- "Extract text from this PDF file"
- "Fetch content from this website and summarize it"
- "Search these documents for information about X"
- "Create a bar chart from this sales data"
- "Classify the intent of this email"
- "Generate KPIs from this business data"

---

## πŸ§ͺ Testing

Run the comprehensive demo:

```bash

python demo.py

```

The demo includes:
- Text extraction and processing tests
- Web fetching tests
- RAG search demonstrations
- Data visualization generation
- Email classification examples
- KPI calculation tests
- Example JSON inputs for all tools

---

## πŸ—οΈ Architecture

```

mission_control_mcp/

β”œβ”€β”€ mcp_server.py              # Main MCP server

β”œβ”€β”€ app.py                     # Gradio web interface

β”œβ”€β”€ demo.py                    # Demo & test suite

β”œβ”€β”€ requirements.txt           # Dependencies

β”œβ”€β”€ README.md                  # Documentation

β”‚

β”œβ”€β”€ tools/                     # Tool implementations

β”‚   β”œβ”€β”€ pdf_reader.py

β”‚   β”œβ”€β”€ text_extractor.py

β”‚   β”œβ”€β”€ web_fetcher.py

β”‚   β”œβ”€β”€ rag_search.py

β”‚   β”œβ”€β”€ data_visualizer.py

β”‚   β”œβ”€β”€ file_converter.py

β”‚   β”œβ”€β”€ email_intent_classifier.py

β”‚   └── kpi_generator.py

β”‚

β”œβ”€β”€ models/                   # Data schemas

β”‚   └── schemas.py

β”‚

└── utils/                    # Utilities

    β”œβ”€β”€ helpers.py            # Helper functions

    └── rag_utils.py          # RAG/vector search utilities

```

### Design Principles

- **Modularity**: Each tool is independently implemented
- **Type Safety**: Pydantic schemas for validation
- **Error Handling**: Comprehensive error catching and logging
- **Clean Code**: Well-documented with docstrings
- **Testability**: Easy to test individual components

---

## πŸŽ–οΈ Hackathon Submission

### Track 1: MCP Server

**Server Name:** MissionControlMCP

**Description:** Enterprise automation MCP server providing 8 specialized tools for document processing, web intelligence, semantic search, data visualization, and business analytics.

### Key Features for Judges

1. **Production-Ready**: All 8 tools are fully implemented and tested
2. **MCP Compliant**: Follows MCP specification precisely
3. **Real-World Value**: Solves actual enterprise automation needs
4. **Clean Architecture**: Modular, maintainable, well-documented code
5. **Advanced Features**: RAG search with FAISS, data visualization, NLP classification
6. **Comprehensive Testing**: Full test suite with examples
7. **Easy Integration**: Works seamlessly with Claude Desktop

### Technical Highlights

- **Vector Search**: FAISS-based semantic search with sentence transformers
- **NLP Classification**: Rule-based email intent classifier with confidence scoring
- **Data Visualization**: Dynamic chart generation with matplotlib
- **File Processing**: Multi-format support (PDF, TXT, CSV)
- **Web Intelligence**: Smart web scraping with clean text extraction
- **Business Intelligence**: KPI calculation with trend analysis

---

## πŸ“ Documentation & Examples

- **[EXAMPLES.md](EXAMPLES.md)** - Real-world use cases, workflows, and ROI examples
- **[TESTING.md](TESTING.md)** - Complete testing guide with examples
- **[ARCHITECTURE.md](ARCHITECTURE.md)** - System design and architecture details
- **[API.md](API.md)** - Complete API documentation
- **[examples/](examples/)** - Sample files for testing all tools:
  - `sample_report.txt` - Business report for text extraction
  - `business_data.csv` - Financial data for visualization & KPIs
  - `sample_email_*.txt` - Email samples for intent classification
  - `sample_documents.txt` - Documents for RAG search testing

---

## οΏ½πŸ“ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Created for the MCP 1st Birthday Hackathon – Winter 2025.

---

## 🀝 Contributing

This project was built for the hackathon, but improvements and suggestions are welcome! Check out [EXAMPLES.md](EXAMPLES.md) for usage patterns and best practices.

---

## πŸ“§ Contact

For questions about this MCP server, please reach out through the hackathon channels.

---

## 🌟 Acknowledgments

- Built with the [Model Context Protocol SDK](https://github.com/modelcontextprotocol)
- Powered by sentence-transformers, FAISS, and other open-source libraries
- Created for the MCP 1st Birthday Hackathon 2025

---

**Happy Automating! πŸš€**