Supports configuration via the Claude Desktop MCP settings file located in the macOS Application Support directory.
Runs as a Node.js application that can be integrated with Claude Desktop through the MCP configuration.
Built with TypeScript for type safety and compiled to JavaScript for execution.
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
- Clone the repository:
- Install dependencies:
- Build the project:
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
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 querylanguage
(optional): Content language (en
,de
,fr
,it
)legislative_act
(optional): Filter by legislative act IDsort
(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
This will return a list of relevant commentaries with their IDs, titles, publication dates, and URLs.
Detailed Commentary Example
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
Available Scripts
npm run build
: Compile TypeScript to JavaScriptnpm 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
- 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
- Build errors:
- Verify Node.js version (14+ required)
- Run
npm install
to ensure all dependencies are installed - Check for TypeScript compilation errors
- 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:
- Check Claude Desktop logs for error messages
- Test the API endpoints directly using curl:
- Verify the build output in the
build/
directory
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes and add tests
- Commit your changes:
git commit -am 'Add new feature'
- Push to the branch:
git push origin feature-name
- 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
- onlinekommentar.ch for providing the legal commentary API
- Model Context Protocol for the integration framework
- Swiss legal community for comprehensive commentary resources
Note: This tool provides access to Swiss legal commentaries for informational purposes. Always consult qualified legal professionals for legal advice.
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.
Related MCP Servers
- AsecurityAlicenseAqualityEnables Large Language Models to retrieve Jewish texts and commentaries from the Sefaria library through a standardized interface.Last updated -2PythonMIT License
- AsecurityFlicenseAqualityAn 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 -31JavaScript
Juhe News MCP Serverofficial
AsecurityFlicenseAqualityA 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 -2Python- -securityFlicense-qualityA simple Model Context Protocol server that enables searching and retrieving relevant documentation snippets from Langchain, Llama Index, and OpenAI official documentation.Last updated -Python