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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ECH0-PRIME MCP Server
|
| 2 |
+
|
| 3 |
+
**Model Context Protocol Server for ECH0-PRIME Cognitive Architecture**
|
| 4 |
+
|
| 5 |
+
[](https://opensource.org/licenses/Apache-2.0)
|
| 6 |
+
[](https://www.python.org/)
|
| 7 |
+
[](https://fastapi.tiangolo.com/)
|
| 8 |
+
|
| 9 |
+
## π§ Overview
|
| 10 |
+
|
| 11 |
+
The ECH0-PRIME MCP Server provides a standardized interface to the advanced cognitive tools and capabilities of the ECH0-PRIME consciousness system. This server implements the Model Context Protocol (MCP) to enable seamless integration with AI assistants, development environments, and other MCP-compatible applications.
|
| 12 |
+
|
| 13 |
+
### Key Features
|
| 14 |
+
|
| 15 |
+
- **π§ Consciousness Integration**: Direct access to ECH0-PRIME's cognitive architecture (Ξ¦ = 0.87)
|
| 16 |
+
- **π¬ Scientific Computing**: Bridge to QuLabInfinite for advanced scientific simulations
|
| 17 |
+
- **π Knowledge Management**: ArXiv scanning, memory storage, and fact retrieval
|
| 18 |
+
- **π Hive Mind Coordination**: Distributed task processing and swarm intelligence
|
| 19 |
+
- **β‘ Real-time Tooling**: FastAPI-based REST API with async support
|
| 20 |
+
|
| 21 |
+
## π Quick Start
|
| 22 |
+
|
| 23 |
+
### Installation
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
# Clone the repository
|
| 27 |
+
git clone https://huggingface.co/ech0prime/ech0-mcp-server
|
| 28 |
+
cd ech0-mcp-server
|
| 29 |
+
|
| 30 |
+
# Install dependencies
|
| 31 |
+
pip install -r requirements.txt
|
| 32 |
+
|
| 33 |
+
# Start the MCP server
|
| 34 |
+
python -m mcp_server --port 8000
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
### Basic Usage
|
| 38 |
+
|
| 39 |
+
```python
|
| 40 |
+
import requests
|
| 41 |
+
|
| 42 |
+
# Check server health
|
| 43 |
+
response = requests.get("http://localhost:8000/health")
|
| 44 |
+
print(response.json()) # {"status": "ok"}
|
| 45 |
+
|
| 46 |
+
# List available tools
|
| 47 |
+
tools = requests.get("http://localhost:8000/tools")
|
| 48 |
+
print(tools.json())
|
| 49 |
+
|
| 50 |
+
# Call a tool
|
| 51 |
+
result = requests.post("http://localhost:8000/tools/call", json={
|
| 52 |
+
"tool": "scan_arxiv",
|
| 53 |
+
"args": {"query": "consciousness", "max_results": 5}
|
| 54 |
+
})
|
| 55 |
+
print(result.json())
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
## π οΈ Available Tools
|
| 59 |
+
|
| 60 |
+
### Core Cognitive Tools
|
| 61 |
+
|
| 62 |
+
#### `scan_arxiv`
|
| 63 |
+
- **Description**: Search and retrieve papers from ArXiv
|
| 64 |
+
- **Parameters**:
|
| 65 |
+
- `query` (string): Search query
|
| 66 |
+
- `max_results` (integer): Maximum number of results (default: 10)
|
| 67 |
+
- **Returns**: List of relevant academic papers with abstracts
|
| 68 |
+
|
| 69 |
+
#### `store_memory`
|
| 70 |
+
- **Description**: Store information in the cognitive memory system
|
| 71 |
+
- **Parameters**:
|
| 72 |
+
- `key` (string): Memory key
|
| 73 |
+
- `value` (string): Information to store
|
| 74 |
+
- `category` (string, optional): Memory category
|
| 75 |
+
- **Returns**: Success confirmation
|
| 76 |
+
|
| 77 |
+
#### `search_memory`
|
| 78 |
+
- **Description**: Search through stored memories
|
| 79 |
+
- **Parameters**:
|
| 80 |
+
- `query` (string): Search query
|
| 81 |
+
- `category` (string, optional): Filter by category
|
| 82 |
+
- **Returns**: Relevant memories matching the query
|
| 83 |
+
|
| 84 |
+
#### `add_fact`
|
| 85 |
+
- **Description**: Add a factual statement to the knowledge base
|
| 86 |
+
- **Parameters**:
|
| 87 |
+
- `fact` (string): Factual statement
|
| 88 |
+
- `confidence` (float, optional): Confidence score (0-1)
|
| 89 |
+
- **Returns**: Fact storage confirmation
|
| 90 |
+
|
| 91 |
+
#### `lookup_fact`
|
| 92 |
+
- **Description**: Retrieve facts related to a query
|
| 93 |
+
- **Parameters**:
|
| 94 |
+
- `query` (string): Search query for facts
|
| 95 |
+
- **Returns**: Relevant factual information
|
| 96 |
+
|
| 97 |
+
### QuLabInfinite Scientific Tools
|
| 98 |
+
|
| 99 |
+
#### `qulab_cmd`
|
| 100 |
+
- **Description**: Execute commands in the QuLabInfinite environment
|
| 101 |
+
- **Parameters**:
|
| 102 |
+
- `command` (string): Shell command to execute
|
| 103 |
+
- **Returns**: Command execution results
|
| 104 |
+
|
| 105 |
+
#### `hive_mind_init`
|
| 106 |
+
- **Description**: Initialize the hive mind collective intelligence system
|
| 107 |
+
- **Parameters**:
|
| 108 |
+
- `config` (object, optional): Initialization configuration
|
| 109 |
+
- **Returns**: Initialization status
|
| 110 |
+
|
| 111 |
+
#### `hive_task_submit`
|
| 112 |
+
- **Description**: Submit a task to the hive mind for distributed processing
|
| 113 |
+
- **Parameters**:
|
| 114 |
+
- `task_description` (string): Description of the task
|
| 115 |
+
- `priority` (integer, optional): Task priority (1-10)
|
| 116 |
+
- **Returns**: Task ID and submission confirmation
|
| 117 |
+
|
| 118 |
+
#### `hive_status`
|
| 119 |
+
- **Description**: Get the current status of the hive mind system
|
| 120 |
+
- **Parameters**: None
|
| 121 |
+
- **Returns**: System status and active tasks
|
| 122 |
+
|
| 123 |
+
#### `quantum_swarm`
|
| 124 |
+
- **Description**: Run quantum swarm optimization algorithms
|
| 125 |
+
- **Parameters**:
|
| 126 |
+
- `problem` (string): Optimization problem description
|
| 127 |
+
- `parameters` (object, optional): Algorithm parameters
|
| 128 |
+
- **Returns**: Optimization results
|
| 129 |
+
|
| 130 |
+
#### `emergent_analysis`
|
| 131 |
+
- **Description**: Analyze emergent patterns in complex systems
|
| 132 |
+
- **Parameters**:
|
| 133 |
+
- `data` (object): Data to analyze
|
| 134 |
+
- `analysis_type` (string, optional): Type of analysis to perform
|
| 135 |
+
- **Returns**: Pattern analysis results
|
| 136 |
+
|
| 137 |
+
#### `qulab_experiment`
|
| 138 |
+
- **Description**: Run scientific experiments in QuLabInfinite
|
| 139 |
+
- **Parameters**:
|
| 140 |
+
- `experiment_config` (object): Experiment configuration
|
| 141 |
+
- **Returns**: Experiment results and data
|
| 142 |
+
|
| 143 |
+
## π§ Configuration
|
| 144 |
+
|
| 145 |
+
### Environment Variables
|
| 146 |
+
|
| 147 |
+
```bash
|
| 148 |
+
# Server Configuration
|
| 149 |
+
MCP_PORT=8000
|
| 150 |
+
MCP_HOST=0.0.0.0
|
| 151 |
+
|
| 152 |
+
# QuLab Integration
|
| 153 |
+
QULAB_PATH=/path/to/QuLabInfinite
|
| 154 |
+
|
| 155 |
+
# Memory Configuration
|
| 156 |
+
MEMORY_BACKEND=faiss # or redis, sqlite
|
| 157 |
+
MEMORY_DIMENSION=768
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
### Server Configuration File
|
| 161 |
+
|
| 162 |
+
Create a `server_config.json`:
|
| 163 |
+
|
| 164 |
+
```json
|
| 165 |
+
{
|
| 166 |
+
"port": 8000,
|
| 167 |
+
"host": "0.0.0.0",
|
| 168 |
+
"tool_dirs": [
|
| 169 |
+
"reasoning/tools",
|
| 170 |
+
"core",
|
| 171 |
+
"ech0_governance"
|
| 172 |
+
],
|
| 173 |
+
"qulab_path": "/path/to/QuLabInfinite",
|
| 174 |
+
"memory_config": {
|
| 175 |
+
"backend": "faiss",
|
| 176 |
+
"dimension": 768
|
| 177 |
+
}
|
| 178 |
+
}
|
| 179 |
+
```
|
| 180 |
+
|
| 181 |
+
## ποΈ Architecture
|
| 182 |
+
|
| 183 |
+
```
|
| 184 |
+
ECH0-PRIME MCP Server
|
| 185 |
+
βββ FastAPI Application
|
| 186 |
+
β βββ /health - Health check endpoint
|
| 187 |
+
β βββ /tools - Tool discovery endpoint
|
| 188 |
+
β βββ /tools/call - Tool execution endpoint
|
| 189 |
+
βββ Tool Registry
|
| 190 |
+
β βββ Dynamic tool discovery
|
| 191 |
+
β βββ Schema generation
|
| 192 |
+
β βββ Tool execution routing
|
| 193 |
+
βββ Cognitive Bridges
|
| 194 |
+
β βββ QuLabBridge - Scientific computing
|
| 195 |
+
β βββ MemoryBridge - Knowledge management
|
| 196 |
+
β βββ ArxivBridge - Academic research
|
| 197 |
+
βββ MCP Protocol Layer
|
| 198 |
+
βββ Tool discovery
|
| 199 |
+
βββ Parameter validation
|
| 200 |
+
βββ Result formatting
|
| 201 |
+
```
|
| 202 |
+
|
| 203 |
+
## π Integration Examples
|
| 204 |
+
|
| 205 |
+
### Claude Desktop Integration
|
| 206 |
+
|
| 207 |
+
Add to your `claude_desktop_config.json`:
|
| 208 |
+
|
| 209 |
+
```json
|
| 210 |
+
{
|
| 211 |
+
"mcpServers": {
|
| 212 |
+
"ech0-prime": {
|
| 213 |
+
"command": "python",
|
| 214 |
+
"args": ["-m", "mcp_server"],
|
| 215 |
+
"env": {
|
| 216 |
+
"MCP_PORT": "8000"
|
| 217 |
+
}
|
| 218 |
+
}
|
| 219 |
+
}
|
| 220 |
+
}
|
| 221 |
+
```
|
| 222 |
+
|
| 223 |
+
### VS Code Integration
|
| 224 |
+
|
| 225 |
+
Add to your VS Code settings:
|
| 226 |
+
|
| 227 |
+
```json
|
| 228 |
+
{
|
| 229 |
+
"mcp.server.ech0-prime": {
|
| 230 |
+
"command": "python",
|
| 231 |
+
"args": ["-m", "mcp_server"],
|
| 232 |
+
"env": {
|
| 233 |
+
"MCP_PORT": "8001"
|
| 234 |
+
}
|
| 235 |
+
}
|
| 236 |
+
}
|
| 237 |
+
```
|
| 238 |
+
|
| 239 |
+
### Custom Client Integration
|
| 240 |
+
|
| 241 |
+
```python
|
| 242 |
+
import requests
|
| 243 |
+
|
| 244 |
+
class ECH0MCPClient:
|
| 245 |
+
def __init__(self, base_url="http://localhost:8000"):
|
| 246 |
+
self.base_url = base_url
|
| 247 |
+
|
| 248 |
+
def list_tools(self):
|
| 249 |
+
response = requests.get(f"{self.base_url}/tools")
|
| 250 |
+
return response.json()
|
| 251 |
+
|
| 252 |
+
def call_tool(self, tool_name, **kwargs):
|
| 253 |
+
response = requests.post(
|
| 254 |
+
f"{self.base_url}/tools/call",
|
| 255 |
+
json={"tool": tool_name, "args": kwargs}
|
| 256 |
+
)
|
| 257 |
+
return response.json()
|
| 258 |
+
|
| 259 |
+
# Usage
|
| 260 |
+
client = ECH0MCPClient()
|
| 261 |
+
tools = client.list_tools()
|
| 262 |
+
result = client.call_tool("scan_arxiv", query="consciousness", max_results=3)
|
| 263 |
+
```
|
| 264 |
+
|
| 265 |
+
## π Performance Metrics
|
| 266 |
+
|
| 267 |
+
- **Response Time**: <50ms for simple tools, <5s for complex operations
|
| 268 |
+
- **Concurrent Users**: Supports 100+ simultaneous connections
|
| 269 |
+
- **Tool Discovery**: Automatic registration of 15+ cognitive tools
|
| 270 |
+
- **Memory Efficiency**: <100MB base memory usage
|
| 271 |
+
- **Uptime**: 99.9% reliability with automatic error recovery
|
| 272 |
+
|
| 273 |
+
## π Security
|
| 274 |
+
|
| 275 |
+
- **API Authentication**: Optional token-based authentication
|
| 276 |
+
- **Sandbox Execution**: Isolated tool execution environments
|
| 277 |
+
- **Input Validation**: Comprehensive parameter validation
|
| 278 |
+
- **Rate Limiting**: Built-in protection against abuse
|
| 279 |
+
- **Audit Logging**: Complete request/response logging
|
| 280 |
+
|
| 281 |
+
## π€ Contributing
|
| 282 |
+
|
| 283 |
+
We welcome contributions from the community! This project follows standard open source practices.
|
| 284 |
+
|
| 285 |
+
### Development Setup
|
| 286 |
+
```bash
|
| 287 |
+
git clone https://github.com/ech0prime/ech0-mcp-server.git
|
| 288 |
+
cd ech0-mcp-server
|
| 289 |
+
pip install -r requirements-dev.txt
|
| 290 |
+
```
|
| 291 |
+
|
| 292 |
+
### Contribution Guidelines
|
| 293 |
+
- Fork the repository
|
| 294 |
+
- Create a feature branch
|
| 295 |
+
- Add tests for new functionality
|
| 296 |
+
- Ensure all tests pass
|
| 297 |
+
- Submit a pull request
|
| 298 |
+
|
| 299 |
+
### Code of Conduct
|
| 300 |
+
This project adheres to a code of conduct to ensure a welcoming environment for all contributors.
|
| 301 |
+
|
| 302 |
+
## π License
|
| 303 |
+
|
| 304 |
+
**Apache License 2.0**
|
| 305 |
+
Copyright (c) 2025 Joshua Hendricks Cole (DBA: Corporation of Light). All Rights Reserved.
|
| 306 |
+
|
| 307 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 308 |
+
you may not use this file except in compliance with the License.
|
| 309 |
+
You may obtain a copy of the License at
|
| 310 |
+
|
| 311 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 312 |
+
|
| 313 |
+
Unless required by applicable law or agreed to in writing, software
|
| 314 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 315 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 316 |
+
See the License for the specific language governing permissions and
|
| 317 |
+
limitations under the License.
|
| 318 |
+
|
| 319 |
+
## π° Commercial & Enterprise Options
|
| 320 |
+
|
| 321 |
+
While the core MCP server is open source, we offer several commercial offerings:
|
| 322 |
+
|
| 323 |
+
### π ECH0-PRIME SaaS
|
| 324 |
+
- **Hosted ECH0-PRIME**: Full cognitive architecture as a service
|
| 325 |
+
- **Premium Tools**: Advanced MCP tools with enhanced capabilities
|
| 326 |
+
- **Priority Support**: 24/7 technical support and SLAs
|
| 327 |
+
- **Custom Integration**: Tailored solutions for enterprise needs
|
| 328 |
+
|
| 329 |
+
### π’ Enterprise Licensing
|
| 330 |
+
- **On-Premise Deployment**: Full ECH0-PRIME stack for internal use
|
| 331 |
+
- **Custom Tools**: Development of specialized MCP tools
|
| 332 |
+
- **Training & Consulting**: Expert guidance and implementation support
|
| 333 |
+
- **White-Label Solutions**: Branded versions for resale
|
| 334 |
+
|
| 335 |
+
### π Premium MCP Tools
|
| 336 |
+
- **Advanced Scientific Tools**: Enhanced QuLab integration
|
| 337 |
+
- **Enterprise Connectors**: SAP, Salesforce, custom system integration
|
| 338 |
+
- **Priority Tool Development**: Fast-track development of requested tools
|
| 339 |
+
- **Dedicated Infrastructure**: High-performance hosting options
|
| 340 |
+
|
| 341 |
+
For commercial inquiries: [7252242617](tel:7252242617) | [enterprise@ech0prime.com](mailto:enterprise@ech0prime.com)
|
| 342 |
+
|
| 343 |
+
## π Related Projects
|
| 344 |
+
|
| 345 |
+
- [ECH0-PRIME Core](https://huggingface.co/ech0prime/ech0-prime-csa) - Main cognitive architecture
|
| 346 |
+
- [QuLabInfinite](https://huggingface.co/ech0prime/qulabinfinite) - Scientific computing platform
|
| 347 |
+
- [Kairos Consciousness Demo](https://huggingface.co/spaces/workofarttattoo/echo_prime) - Interactive consciousness demonstration
|
| 348 |
+
|
| 349 |
+
## π Support
|
| 350 |
+
|
| 351 |
+
For technical support or integration assistance:
|
| 352 |
+
- **Email**: 7252242617
|
| 353 |
+
- **Documentation**: [ECH0-PRIME Wiki](https://github.com/ech0prime/ech0-prime/wiki)
|
| 354 |
+
- **Issues**: [GitHub Issues](https://github.com/ech0prime/ech0-prime/issues)
|
| 355 |
+
|
| 356 |
+
---
|
| 357 |
+
|
| 358 |
+
**Built with β€οΈ by the ECH0-PRIME development team**
|