semvec/pypi-packages huggingface dataset:
kg-rag 0.1.0
Knowledge Graph-based RAG system with MCP server integration
License: MIT
Requires Python: >=3.12

# KnowledgeGraphRAG with MCP Server

A Knowledge Graph-based RAG system with a modern MCP server for seamless integration with MCP-compatible clients like Claude Desktop.

## Quick Start

### 1. Install Dependencies
```bash
pip install -r requirements.txt
pip install fastmcp
```

### 2. Test the Setup
```bash
python test_mcp.py
```

### 3. Start the MCP Server
```bash
# Direct execution
python mcp_server.py

# Using startup scripts
# Windows:
start_mcp_server.bat

# Unix/Linux/macOS:
./start_mcp_server.sh
```

### 4. Configure Claude Desktop
Add to your Claude Desktop configuration:

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

```json
{
  "mcpServers": {
    "knowledgegraph-rag": {
      "command": "python",
      "args": ["C:/path/to/kg-rag/mcp_server.py"],
      "cwd": "C:/path/to/kg-rag"
    }
  }
}
```

## Core Files

### MCP Server
- **`mcp_server.py`** - Main MCP server implementation
- **`test_mcp.py`** - Test script for the MCP server
- **`setup_mcp.py`** - Automated dependency installation

### Configuration & Startup
- **`mcp_config.json`** - Claude Desktop configuration template
- **`start_mcp_server.bat`** - Windows startup script
- **`start_mcp_server.sh`** - Unix startup script

### Documentation
- **`FASTMCP_GUIDE.md`** - Comprehensive setup and usage guide

### KnowledgeGraphRAG Core
- **`kgrag/`** - Core RAG system implementation
- **`requirements.txt`** - Python dependencies
- **`rag.db`** - SQLite database for the knowledge graph

## Available Tools

- **index_document** - Index documents into the knowledge graph
- **query_documents** - Query and get AI-generated answers
- **list_documents** - List all indexed documents
- **remove_document** - Remove documents from the knowledge graph
- **get_document_stats** - Get document statistics

## Available Resources

- **knowledgegraph://document/{doc_name}** - Dynamic document resources

## Available Prompts

- **generate_query_prompt** - Generate prompts for querying topics
- **analyze_document_prompt** - Generate prompts for document analysis

## Example Usage

```
User: List the documents in the knowledge graph
Assistant: 📚 Documents in knowledge graph (2 total):
- Research Paper 2024
- Q1 Report

User: What are the key findings in the Research Paper 2024?
Assistant: 💬 Answer to 'What are the key findings in the Research Paper 2024?':
[AI-generated response based on the knowledge graph]
```

## Troubleshooting

1. **Import Errors**: Run `python test_mcp.py` to check setup
2. **Server Issues**: Check that `kgrag` module is accessible
3. **Claude Integration**: Verify paths in Claude Desktop config

For detailed information, see `FASTMCP_GUIDE.md`.

## Architecture

```
Claude Desktop → MCP Server → KnowledgeGraphRAG → SQLite Database
```

The MCP server provides a clean, type-safe interface to the KnowledgeGraphRAG system with minimal boilerplate code.
umf.py 1.0.0
The Universal Metadata Format
License: MIT
Requires Python: >=3.8

# UMF Python Parser

The Python Implementation of the [Universal Media Format](https://github.com/shmg-org/umf-specification).

## Example

```python
from umf import parse

source = """UMF Python Parser

[ Github ]
Author: IceBrick
Language: Python"""

metadata = parse(source)

print(metadata.get('Github', 'Author'))
```

## Installation

The package is available on [PyPI](https://pypi.org/project/umf.py/). You can install it using pip:

```bash
pip install umf.py
```

## License

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