Metadata-Version: 2.4
Name: veil-mcp
Version: 0.1.0
Summary: The best way to build MCP servers in Python. Turn any function into an AI-callable tool.
Author-email: Shivank Pandey <shivankpndy@gmail.com>
License: MIT
Project-URL: Homepage, https://veilysws.vercel.app
Project-URL: Repository, https://github.com/shivankpndy/veil-mcp
Project-URL: Docs, https://github.com/shivankpndy/veil-mcp#readme
Keywords: mcp,ai,agent,tools,llm,anthropic,openai,voice,veil
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.25.0; extra == "anthropic"
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == "openai"
Provides-Extra: groq
Requires-Dist: openai>=1.0.0; extra == "groq"
Provides-Extra: ollama
Requires-Dist: openai>=1.0.0; extra == "ollama"
Provides-Extra: http
Requires-Dist: aiohttp>=3.9.0; extra == "http"
Provides-Extra: all
Requires-Dist: anthropic>=0.25.0; extra == "all"
Requires-Dist: openai>=1.0.0; extra == "all"
Requires-Dist: aiohttp>=3.9.0; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Dynamic: license-file

# veil-mcp v2

The best way to build MCP servers in Python.

```bash
pip install veil-mcp
```

## Quick start — MCP server (Claude Desktop / Cursor)

```python
from veil_mcp import tool, MCPServer

@tool()
def turn_off_light():
    """Turn off the room light."""
    return "Light is off."

@tool(tags=["hardware"], timeout=5.0)
def toggle_relay(relay: int, state: bool) -> str:
    """Toggle a relay on or off.

    Args:
        relay (int): Relay number 1-4.
        state (bool): True for ON, False for OFF.
    """
    return f"Relay {relay} is {'ON' if state else 'OFF'}."

MCPServer(name="my-agent").run()          # stdio — for Claude Desktop / Cursor
MCPServer(name="my-agent").run_http()     # HTTP+SSE on port 8000
```

## Quick start — LLM adapter

```python
from veil_mcp import tool, LLMAdapter

@tool()
def get_time() -> str:
    """Get the current time."""
    from datetime import datetime
    return datetime.now().strftime("%I:%M %p")

adapter  = LLMAdapter(provider="anthropic")  # or openai, groq, ollama, mock
response = adapter.run("what time is it")
print(response.final_message)
```

## Install

```bash
pip install "veil-mcp[anthropic]"   # Claude
pip install "veil-mcp[openai]"      # GPT / Groq / Ollama
pip install "veil-mcp[all]"         # everything
```

## CLI

```bash
veil-mcp list                        # list all tools
veil-mcp schema --fmt mcp            # dump MCP schemas
veil-mcp inspect TOOL_NAME           # inspect a tool
veil-mcp call TOOL_NAME '{"key":"v"}'# call a tool directly
veil-mcp run server.py               # run as stdio MCP server
veil-mcp serve server.py --port 8000 # run as HTTP server
```

## Connect to Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "my-agent": {
      "command": "python",
      "args": ["path/to/server.py"]
    }
  }
}
```

## Providers

| Provider | Install | Key |
|---|---|---|
| Anthropic | `pip install anthropic` | `ANTHROPIC_API_KEY` |
| OpenAI | `pip install openai` | `OPENAI_API_KEY` |
| Groq | `pip install openai` | `GROQ_API_KEY` |
| Ollama | `pip install openai` | none (local) |
| Mock | none | none |

Made by Shivank for Hack Club Veil · 2026
