# Jaraco Website MCP Server

The Jaraco Website MCP Server provides programmatic access to all website content including blog posts, services, and categories. It enables AI agents and other clients to read content and draft emails for different services.

## Overview

The MCP (Model Context Protocol) server exposes the Jaraco website content as structured resources that can be accessed by AI agents, chatbots, or other applications. The server provides **read-only access** to all content and includes a tool for drafting service-specific emails.

## Features

- **Read Blog Posts**: Access all blog posts in multiple languages
- **Read Services**: Access all service descriptions and details
- **Browse Categories**: Explore content organized by categories
- **Draft Emails**: Generate service-specific email templates with appropriate default text

## Available Resources

### Resource Types

| Type | URI Pattern | Description |
|------|-------------|-------------|
| Blog Posts | `blog_posts/{slug}[.{language}]` | Individual blog posts |
| Services | `services/{slug}[.{language}]` | Service descriptions |
| Categories | `categories/{slug}` | Content categories |

### Supported Languages

All content is available in the following languages:
- English (`en`)
- German (`de`)
- French (`fr`)
- Spanish (`es`)
- Dutch (`nl`)

If no language is specified, English is used by default.

## Connecting to the MCP Server

### Prerequisites

1. Python 3.8 or higher
2. MCP client library for your programming language

### Connection Information

- **Server Address**: `https://jarakube.eu/mcp` 
- **Server Name**: `jaraco-website`
- **Version**: `1.0.0`
- **MCP SDK**: v2.2.0+

### Example Connection (Python)

```python
from mcp.client import Client

async def connect_to_mcp():
    # Connect to the MCP server using Streamable HTTP transport
    client = Client("jaraco-website", url="https://jarakube.eu/mcp")
    await client.connect()
    
    # List all resources
    resources = await client.list_resources()
    
    # Read a specific blog post
    post = await client.read_resource("blog_posts/from-data-chaos-to-efficient-automation")
    
    # Draft an email for a service
    email = await client.call_tool(
        "draft_email",
        {
            "service_slug": "software-development",
            "language": "en",
            "sender_name": "John Doe",
            "sender_email": "john@example.com",
            "custom_text": "I need help with a custom web application."
        }
    )
    
    await client.disconnect()
```

**Note**: The MCP SDK v2 client automatically handles the Streamable HTTP transport. The endpoint is `/mcp` by default.

## Using the MCP Server

### Listing Resources

To list all available resources:

```python
resources = await client.list_resources()
```

To list resources of a specific type:

```python
# List only blog posts
blog_posts = await client.list_resources("blog_posts/")

# List only services
services = await client.list_resources("services/")

# List only categories
categories = await client.list_resources("categories/")
```

### Reading Resources

To read a specific resource:

```python
# Read a blog post
post = await client.read_resource("blog_posts/from-data-chaos-to-efficient-automation")

# Read a blog post in German
post_de = await client.read_resource("blog_posts/from-data-chaos-to-efficient-automation.de")

# Read a service
service = await client.read_resource("services/software-development")

# Read a category
category = await client.read_resource("categories/software-engineering")
```

### Drafting Emails

The `draft_email` tool generates service-specific email templates. It supports the following parameters:

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `service_slug` | string | Yes | - | The service identifier (e.g., "software-development") |
| `language` | string | No | "en" | Language for the email template |
| `recipient` | string | No | "info@jaraco.de" | Recipient email address |
| `subject` | string | No | Auto-generated | Custom email subject |
| `custom_text` | string | No | "" | Additional text to include in the email |
| `sender_name` | string | No | "" | Sender's name |
| `sender_email` | string | No | "" | Sender's email address |
| `sender_phone` | string | No | "" | Sender's phone number |

**Example**:

```python
email = await client.call_tool(
    "draft_email",
    {
        "service_slug": "software-development",
        "language": "en",
        "recipient": "info@jaraco.de",
        "sender_name": "Jane Smith",
        "sender_email": "jane@company.com",
        "sender_phone": "+1234567890",
        "custom_text": "We are looking to develop a custom web application for our e-commerce platform. We need expertise in React, Node.js, and database design."
    }
)
```

**Response Format**:

```json
{
  "subject": "Inquiry: Software Development Services",
  "body": "Dear Jaraco Team,\n\nWe are looking to develop a custom web application for our e-commerce platform. We need expertise in React, Node.js, and database design.\n\n[Additional template content...]\n\n---\nJaraco GmbH\nSoftware Engineering · Münster\nPhone: +49 176 85952637\nEmail: info@jaraco.de\nWebsite: https://jaraco-gmbh.de",
  "to": ["info@jaraco.de"],
  "cc": [],
  "bcc": [],
  "headers": {
    "From": "Jane Smith <jane@company.com>",
    "Reply-To": "jane@company.com"
  }
}
```

## Available Services

The following services are available through the MCP server:

| Service Slug | Description |
|--------------|-------------|
| `software-development` | Custom software development services |
| `consulting` | IT consulting and advisory services |
| `it-architecture` | IT architecture design and review |
| `linux-consulting` | Linux system consulting |
| `code-review` | Code review and quality assessment |
| `technology-assessment` | Technology stack evaluation |

## Available Categories

Content is organized into the following categories:

| Category Slug | Description |
|---------------|-------------|
| `software-engineering` | Software development and engineering |
| `consulting` | Consulting services |
| `linux` | Linux and infrastructure services |
| `automation` | Automation and workflow improvement |


## API Reference

### list_resources

List all available resources or filter by type.

**Request**:
```json
{
  "uri": "blog_posts/"  // Optional: filter by resource type
}
```

**Response**:
```json
{
  "resources": [
    {
      "uri": "blog_posts/from-data-chaos-to-efficient-automation",
      "name": "From Data Chaos to Efficient Automation",
      "description": "How to transform...",
      "mimeType": "text/markdown",
      "size": 12345
    },
    {
      "uri": "services/software-development",
      "name": "Software Development",
      "description": "Custom software development...",
      "mimeType": "text/markdown",
      "size": 6789
    }
  ]
}
```

### read_resource

Read a specific resource by URI.

**Request**:
```json
{
  "uri": "blog_posts/from-data-chaos-to-efficient-automation"
}
```

**Response**:
```json
{
  "contents": [
    {
      "type": "text",
      "text": "# From Data Chaos to Efficient Automation\n\n...",
      "mimeType": "text/markdown"
    }
  ],
  "resourceTemplate": null
}
```

### call_tool (draft_email)

Draft an email for a service.

**Request**:
```json
{
  "name": "draft_email",
  "arguments": {
    "service_slug": "software-development",
    "language": "en",
    "sender_name": "John Doe",
    "sender_email": "john@example.com",
    "custom_text": "I need help with..."
  }
}
```

**Response**:
```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"subject\": \"Inquiry: Software Development Services\", ...}",
      "mimeType": "application/json"
    }
  ],
  "isError": false
}
```

## Security

- The MCP server provides **read-only access** to content
- No authentication is required by default (can be added if needed)
- All inputs are validated before processing
- Rate limiting is configured to prevent abuse

## Support

For questions or issues with the MCP server:

- **Email**: info@jaraco.de
- **Website**: https://jaraco-gmbh.de
- **GitHub**: https://github.com/jaracogmbh/jaraco-website

## Version History

- **1.0.0**: Initial release with blog posts, services, categories, and email drafting
