Skip to main content

MCP server for accessing Vedic scriptures in Claude Desktop and other LLM tools

Project description

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.

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

Setup

  1. Clone the repository (if not already done):

    cd vedic-ai-platform/mcp-server
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Configure environment:

    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

    {
      "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

pytest tests/

Code Formatting

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:

{
  "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:

{
  "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:

{
  "scripture_id": "bhagavad_gita"
}

ask_vedic_question

Ask a philosophical question.

Parameters:

  • question (string, required): Your question
  • context (string, optional): Additional context

Example:

{
  "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

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

Contributing

See the main project CONTRIBUTING.md for guidelines.

License

See LICENSE

Support

Related Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vedic_ai_mcp_server-1.0.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vedic_ai_mcp_server-1.0.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file vedic_ai_mcp_server-1.0.0.tar.gz.

File metadata

  • Download URL: vedic_ai_mcp_server-1.0.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for vedic_ai_mcp_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 22853e03c6f13a5895f41cf01102ef4095b3f1fa424c8b96ec34253cc59388d5
MD5 4100239bf29458a8889cc617c3c597b8
BLAKE2b-256 272fc723525add30ceb99b04ee90c4e24e4c3b062bf8c5c8e67374b0a424c612

See more details on using hashes here.

File details

Details for the file vedic_ai_mcp_server-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vedic_ai_mcp_server-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c17a31472bde7c777fb0274c2cd5513186b15071327500df05eca75d3c84a140
MD5 299c20e137b1e2be60ce216136357170
BLAKE2b-256 80c9d095d2b6d21b2e6442a1c500949306a0ab6c81dc0449cb4469a67baf1b37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page