Skip to main content

MCP server for distributing AI rules from GitLab repositories to IDEs

Project description

AIMCP

PyPI version Python 3.13+ License: MIT

AIMCP is an MCP (Model Context Protocol) server that enables teams to distribute MCP tool specifications from GitLab repositories to IDEs like Cursor and VS Code. The server discovers tools.json files in repositories, dynamically generates MCP tools from their specifications, and serves referenced files as resources through a secure URI scheme.

Features

  • GitLab Integration: Automatically discovers and fetches tools.json files from configured repositories
  • Dynamic Tool Generation: Creates MCP tools from specifications at runtime
  • Secure Resource Access: Serves repository files via aimcp:// URI scheme with access control
  • Dual Caching: Caches both tool specifications and file content for optimal performance
  • Conflict Resolution: Handles duplicate tool names across repositories with configurable strategies
  • Async Architecture: Built on fastmcp for high-performance async operations

Installation

pip install aimcp

Quick Start

  1. Create a configuration file config.yaml:
gitlab:
  base_url: "https://gitlab.example.com"
  token: "your-gitlab-token"
  repositories:
    - path: "team/tools-repo"
      branch: "main"

cache:
  type: "memory"
  ttl: 3600

conflict_resolution: "prefix"
  1. Run the server:
aimcp
  1. Connect your IDE to the MCP server at the configured endpoint.

Tool Specifications

Each repository must contain a tools.json file following the MCP specification. Example:

{
  "tools": [
    {
      "name": "analyze_code",
      "description": "Analyze code quality and suggest improvements",
      "resourceRefs": ["analyzer_script", "analyzer_rules"]
      }
    }
  ],
  "resources": [
    {
      "name": "analyzer_script",
      "uri": "scripts/analyze.py",
    },
    {
      "name": "analyzer_rules",
      "uri": "configs/rules.yaml"
    }
  ]
}

Configuration

Conflict Resolution Strategies

  • prefix: Add repository prefix to tool names (repo1_toolname, repo2_toolname)
  • priority: First repository in configuration order wins
  • error: Fail startup with detailed conflict report
  • merge: Combine tool descriptions and resource lists

Cache Options

  • memory: In-memory caching (default)
  • redis: Redis-backed caching for distributed setups (not implemented)

Development

Prerequisites

  • Python 3.13+
  • uv (recommended package manager)

Setup

# Clone the repository
git clone https://github.com/yourusername/aimcp.git
cd aimcp

# Install dependencies
uv sync --dev

# Run tests
uv run pytest

# Run linting
uv run ruff check .

# Run type checking
uv run mypy .

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Vibe coding product

Generated with Claude

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

airulermcp-0.2.1.tar.gz (69.3 kB view details)

Uploaded Source

Built Distribution

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

airulermcp-0.2.1-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file airulermcp-0.2.1.tar.gz.

File metadata

  • Download URL: airulermcp-0.2.1.tar.gz
  • Upload date:
  • Size: 69.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for airulermcp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d8b786bb8faa52bb67bc1d4d6f75da629d4941a0edfc4bc1d964d982e86d16dd
MD5 5de00dd035fa191ddd27ca2d92033d1f
BLAKE2b-256 d9eab0e530ac41ae24b36ed82859ba270d1c900c9f34b5c7783d47a9e87905bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for airulermcp-0.2.1.tar.gz:

Publisher: publish.yml on junqed/aimcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file airulermcp-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: airulermcp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 36.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for airulermcp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e59ec7f79635e942b7e286451b73af38b5551a96ab7f47b78a6c6f9f97708270
MD5 8322111b4e2b081db6eaae47ef7d67b0
BLAKE2b-256 f829ae98c36b631841b614e89de54e8a51d79728909d473ef09c2016d34fac0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for airulermcp-0.2.1-py3-none-any.whl:

Publisher: publish.yml on junqed/aimcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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