Metadata-Version: 2.4
Name: vedic-ai-mcp-server
Version: 1.0.0
Summary: MCP server for accessing Vedic scriptures in Claude Desktop and other LLM tools
Author-email: Vedic AI Platform <support@mysticvedic.com>
License: MIT
Project-URL: Homepage, https://mysticvedic.com
Project-URL: Documentation, https://github.com/yourusername/vedic-ai-platform/tree/main/mcp-server
Project-URL: Repository, https://github.com/yourusername/vedic-ai-platform
Project-URL: Issues, https://github.com/yourusername/vedic-ai-platform/issues
Project-URL: API, https://api.mysticvedic.com/docs
Keywords: mcp,vedic,scriptures,ai,llm,bhagavad-gita,vedas,claude,model-context-protocol
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Religion
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=0.9.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.6.0
Requires-Dist: python-dotenv>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: black>=24.0.0; extra == "dev"
Requires-Dist: ruff>=0.2.0; extra == "dev"
Dynamic: license-file

# Vedic AI MCP Server

> Model Context Protocol server for accessing Vedic scriptures and AI-powered philosophical Q&A

## Overview

The Vedic AI MCP Server enables Large Language Models (Claude, GPT-4, etc.) to directly access Vedic scriptures and get AI-powered answers to philosophical questions through standardized tools defined by the [Model Context Protocol](https://modelcontextprotocol.io).

## Features

### 🛠️ Tools (Functions LLMs can call)

1. **search_vedic_scriptures** - Search across all Vedic texts for relevant verses
2. **get_scripture_verse** - Retrieve a specific verse with Sanskrit, transliteration, and translation
3. **list_scriptures** - Get all available scriptures (Bhagavad Gita, 4 Vedas)
4. **get_scripture_chapters** - List all chapters in a scripture
5. **ask_vedic_question** - Ask philosophical questions with AI-powered answers grounded in scriptures

## Installation

### Prerequisites

- Python 3.11 or higher
- Access to Vedic AI Platform API (get your API key at https://mysticvedic.com)

### Setup

1. **Clone the repository** (if not already done):
   ```bash
   cd vedic-ai-platform/mcp-server
   ```

2. **Install dependencies**:
   ```bash
   pip install -r requirements.txt
   ```

3. **Configure environment**:
   ```bash
   cp .env.example .env
   # Edit .env to add your API credentials
   ```

4. **Configure in Claude Desktop** (or other MCP client):

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

   ```json
   {
     "mcpServers": {
       "vedic-ai": {
         "command": "python",
         "args": [
           "/absolute/path/to/vedic-ai-platform/mcp-server/src/server.py"
         ],
         "env": {
           "VEDIC_AI_API_URL": "https://api.mysticvedic.com/api/v1",
           "VEDIC_AI_API_KEY": "your_api_key_here"
         }
       }
     }
   }
   ```

5. **Restart Claude Desktop** to load the MCP server

## Usage

Once configured, you can ask Claude questions like:

- *"Search for verses about karma in Bhagavad Gita"*
- *"Get me verse 2:47 from Bhagavad Gita"*
- *"What scriptures are available?"*
- *"Ask a Vedic question: What is the nature of the self?"*

Claude will automatically use the appropriate tools to access the Vedic knowledge base.

## Configuration

### Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `VEDIC_AI_API_URL` | Base URL of Vedic AI API | `http://localhost:8000/api/v1` |
| `VEDIC_AI_API_KEY` | Your API key for authentication | (required) |
| `MCP_SERVER_NAME` | Server identifier | `vedic-ai` |
| `MCP_SERVER_VERSION` | Server version | `1.0.0` |

## Development

### Project Structure

```
mcp-server/
├── src/
│   ├── __init__.py
│   ├── server.py              # Main MCP server
│   ├── api_client.py          # API client for backend
│   └── tools/
│       ├── __init__.py
│       ├── search.py          # Search tools
│       ├── scriptures.py      # Scripture tools
│       └── query.py           # Query tools
├── tests/
├── requirements.txt
├── .env.example
└── README.md
```

### Running Tests

```bash
pytest tests/
```

### Code Formatting

```bash
black src/
ruff check src/
```

## Available Tools Reference

### search_vedic_scriptures

Search for verses across all scriptures.

**Parameters:**
- `query` (string, required): Search query
- `scriptures` (array, optional): Filter by specific scriptures
- `limit` (number, optional): Max results (default: 5, max: 20)

**Example:**
```json
{
  "query": "What is dharma?",
  "scriptures": ["bhagavad_gita"],
  "limit": 3
}
```

### get_scripture_verse

Get a specific verse.

**Parameters:**
- `scripture_id` (string, required): `bhagavad_gita`, `rig_veda`, etc.
- `chapter` (number, required): Chapter number
- `verse` (number, required): Verse number

**Example:**
```json
{
  "scripture_id": "bhagavad_gita",
  "chapter": 2,
  "verse": 47
}
```

### list_scriptures

Get all available scriptures. No parameters required.

### get_scripture_chapters

Get chapters from a scripture.

**Parameters:**
- `scripture_id` (string, required): Scripture identifier

**Example:**
```json
{
  "scripture_id": "bhagavad_gita"
}
```

### ask_vedic_question

Ask a philosophical question.

**Parameters:**
- `question` (string, required): Your question
- `context` (string, optional): Additional context

**Example:**
```json
{
  "question": "What is the nature of consciousness according to Vedic philosophy?",
  "context": "I'm interested in understanding the relationship between Atman and Brahman"
}
```

## Troubleshooting

### Server not appearing in Claude

1. Check that `claude_desktop_config.json` is in the correct location
2. Verify the absolute path to `server.py` is correct
3. Ensure Python is in your PATH
4. Check Claude Desktop logs: `~/Library/Logs/Claude/` (macOS)

### API Connection Errors

1. Verify `VEDIC_AI_API_URL` is correct
2. Check your API key is valid
3. Ensure you have internet connectivity
4. Test the API directly: `curl https://api.mysticvedic.com/api/v1/health`

### Import Errors

```bash
# Reinstall dependencies
pip install -r requirements.txt --upgrade
```

## Contributing

See the main project [CONTRIBUTING.md](../CONTRIBUTING.md) for guidelines.

## License

See [LICENSE](../LICENSE)

## Support

- Documentation: https://docs.mysticvedic.com
- API Issues: https://github.com/vedic-ai/platform/issues
- Email: support@mysticvedic.com

## Related Links

- [Model Context Protocol](https://modelcontextprotocol.io)
- [MCP Specification](https://spec.modelcontextprotocol.io)
- [Vedic AI Platform](https://mysticvedic.com)
- [Claude Desktop](https://claude.ai/download)
