Skip to main content
Glama

Online Kommentar MCP Server

Online Kommentar MCP Server

A Model Context Protocol (MCP) server that provides access to Swiss legal commentaries from onlinekommentar.ch. This server allows you to search and retrieve detailed legal commentaries on Swiss federal law through Claude Desktop or other MCP-compatible clients.

Features

  • Search Commentaries: Full-text search across legal commentaries with filtering options
  • Retrieve Individual Commentaries: Get detailed content for specific legal articles
  • Multi-language Support: Search in English, German, French, and Italian
  • Advanced Filtering: Filter by legislative act, sort by title or date
  • Pagination Support: Navigate through large result sets

Installation

Prerequisites

  • Node.js (version 14 or higher)
  • npm or yarn package manager
  • Claude Desktop (for MCP integration)

Setup

  1. Clone the repository:
    git clone https://github.com/self-tech-labs/onlinekommentar-mcp.git cd onlinekommentar-mcp
  2. Install dependencies:
    npm install
  3. Build the project:
    npm run build

Usage with Claude Desktop

Configuration

Add the following configuration to your Claude Desktop MCP settings file:

On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "online-kommentar": { "command": "node", "args": ["/path/to/onlinekommentar-mcp/build/index.js"] } } }

Replace /path/to/onlinekommentar-mcp with the actual path to your project directory.

Restart Claude Desktop

After adding the configuration, restart Claude Desktop to load the MCP server.

Available Tools

1. Search Commentaries

Search for legal commentaries using various filters.

Parameters:

  • search (required): Full-text search query
  • language (optional): Content language (en, de, fr, it)
  • legislative_act (optional): Filter by legislative act ID
  • sort (optional): Sort order (title, -title, date, -date)
  • page (optional): Page number for pagination

Example queries:

  • "Search for commentaries about intellectual property"
  • "Find German commentaries about data protection"
  • "Search for articles related to criminal law, sorted by date"

2. Get Commentary by ID

Retrieve detailed information about a specific commentary using its ID.

Parameters:

  • id (required): The unique identifier of the commentary

Example:

  • "Get commentary details for ID: 6d8aee6b-86d0-43f2-8110-2d5b7360dd18"

Examples

Search Example

Search for commentaries about "constitutional rights" in English

This will return a list of relevant commentaries with their IDs, titles, publication dates, and URLs.

Detailed Commentary Example

Get the full content of commentary ID: 7058f7a5-19d8-444e-a901-7bb635ded375

This will return comprehensive information including:

  • Full title and publication details
  • Authors and editors
  • Legislative act information
  • Complete commentary content
  • Legal text being commented on

Development

Project Structure

onlinekommentar-mcp/ ├── src/ │ └── index.ts # Main MCP server implementation ├── build/ # Compiled JavaScript output ├── package.json # Project dependencies and scripts ├── tsconfig.json # TypeScript configuration └── README.md # This file

Available Scripts

  • npm run build: Compile TypeScript to JavaScript
  • npm start: Run the compiled server (for testing)

API Integration

The server integrates with the onlinekommentar.ch API:

  • Base URL: https://onlinekommentar.ch/api
  • Endpoints:
    • /commentaries - Search commentaries
    • /commentaries/{id} - Get specific commentary

Technical Details

MCP Protocol

This server implements the Model Context Protocol specification, providing:

  • Tool registration for search and retrieval functions
  • Proper error handling and response formatting
  • JSON schema validation for parameters

Data Structure

Commentary objects include:

  • Unique identifiers
  • Multilingual titles and content
  • Author and editor information
  • Legislative act associations
  • Publication dates and metadata
  • Direct links to online versions

Troubleshooting

Common Issues

  1. Server not appearing in Claude Desktop:
    • Check the configuration file path and syntax
    • Ensure the build directory exists and contains compiled JavaScript
    • Restart Claude Desktop after configuration changes
  2. Build errors:
    • Verify Node.js version (14+ required)
    • Run npm install to ensure all dependencies are installed
    • Check for TypeScript compilation errors
  3. API connection issues:
    • Verify internet connectivity
    • Check if onlinekommentar.ch is accessible
    • Review error messages in Claude Desktop logs

Debugging

To debug the MCP server:

  1. Check Claude Desktop logs for error messages
  2. Test the API endpoints directly using curl:
    curl "https://onlinekommentar.ch/api/commentaries?search=test"
  3. Verify the build output in the build/ directory

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and add tests
  4. Commit your changes: git commit -am 'Add new feature'
  5. Push to the branch: git push origin feature-name
  6. Submit a pull request

License

This project is open source. Please refer to the license file for details.

Support

For issues and questions:

  • Open an issue on GitHub
  • Check the troubleshooting section above
  • Review the MCP protocol documentation

Acknowledgments


Note: This tool provides access to Swiss legal commentaries for informational purposes. Always consult qualified legal professionals for legal advice.

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Provides access to Swiss legal commentaries through Model Context Protocol, allowing users to search and retrieve detailed legal commentary content from onlinekommentar.ch in multiple languages.

  1. Features
    1. Installation
      1. Prerequisites
      2. Setup
    2. Usage with Claude Desktop
      1. Configuration
      2. Restart Claude Desktop
    3. Available Tools
      1. 1. Search Commentaries
      2. 2. Get Commentary by ID
    4. Examples
      1. Search Example
      2. Detailed Commentary Example
    5. Development
      1. Project Structure
      2. Available Scripts
      3. API Integration
    6. Technical Details
      1. MCP Protocol
      2. Data Structure
    7. Troubleshooting
      1. Common Issues
      2. Debugging
    8. Contributing
      1. License
        1. Support
          1. Acknowledgments

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              Enables Large Language Models to retrieve Jewish texts and commentaries from the Sefaria library through a standardized interface.
              Last updated -
              2
              Python
              MIT License
              • Linux
              • Apple
            • A
              security
              F
              license
              A
              quality
              An MCP server providing standardized access to Swiss court decisions through the entscheidsuche.ch API, allowing LLMs to search, retrieve, and analyze legal documents from Swiss jurisdictions.
              Last updated -
              3
              1
              JavaScript
              • Apple
              • Linux
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that enables large language models to access the latest trending news headlines and detailed content across various categories including recommended, domestic, technology, and sports news.
              Last updated -
              2
              Python
              • Apple
            • -
              security
              F
              license
              -
              quality
              A simple Model Context Protocol server that enables searching and retrieving relevant documentation snippets from Langchain, Llama Index, and OpenAI official documentation.
              Last updated -
              Python
              • Apple
              • Linux

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/self-tech-labs/onlinekommentar-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server