Metadata-Version: 2.4
Name: legion-mcp
Version: 0.1.251205.1
Summary: LEGION Knowledge & Code Intelligence MCP Server for Claude
Project-URL: Homepage, https://github.com/Vetlyx/LEGION
Project-URL: Repository, https://github.com/Vetlyx/LEGION
Project-URL: Documentation, https://github.com/Vetlyx/LEGION#readme
Author-email: Vetlyx <info@vetlyx.com>
License-Expression: MIT
Keywords: ai,claude,code-intelligence,knowledge-management,mcp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: claude-agent-sdk>=0.1.9
Requires-Dist: fastmcp>=0.1.0
Requires-Dist: grpcio-tools>=1.60.0
Requires-Dist: grpcio>=1.60.0
Requires-Dist: loguru>=0.7.0
Requires-Dist: protobuf>=4.25.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# LEGION MCP

Knowledge & Code Intelligence MCP Server for Claude.

## Installation

```bash
pip install git+https://github.com/Vetlyx/LEGION.git#subdirectory=legion-mcp
```

## Configuration

### Environment Variables

```bash
# Required: gRPC server connection
GRPC_SERVER_HOST=localhost
GRPC_SERVER_PORT=50051

# Required: Authentication
MCP_USER_EMAIL=your@email.com
MCP_USER_PASSWORD=your_password
```

### Claude Desktop Configuration

Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "legion": {
      "command": "legion-mcp",
      "env": {
        "GRPC_SERVER_HOST": "localhost",
        "GRPC_SERVER_PORT": "50051",
        "MCP_USER_EMAIL": "your@email.com",
        "MCP_USER_PASSWORD": "your_password"
      }
    }
  }
}
```

## Available Tools

### Knowledge Management
- `queryKnowledge` - Search docs with hybrid retrieval (vector + graph + reranking)
- `fastQuery` - Fast vector-only search
- `createKnowledge` - Store documentation/notes
- `searchByTags` - Filter by metadata fields

### Code Intelligence
- `findSimilarCode` - Search code by natural language or snippet
- `createCode` - Index source code files
- `analyzeImpact` - Analyze blast radius of code changes
- `traceExecutionFlow` - Trace function call chains

### Expertise & Lessons
- `queryExpertise` - Search guides/tutorials
- `createExpertise` - Store structured knowledge
- `queryLessons` - Search past resolved issues
- `recordLesson` - Document resolved bugs

### Utility
- `getProjects` - List available projects
- `exploreGraph` - Run custom Cypher queries

## Requirements

- Python 3.10+
- Running LEGION gRPC server
- Valid LEGION user credentials
