MCP server for distributing AI rules from GitLab repositories to IDEs
Project description
AIMCP
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.jsonfiles 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
fastmcpfor high-performance async operations
Installation
pip install aimcp
Quick Start
- 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"
- Run the server:
aimcp
- 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 winserror: Fail startup with detailed conflict reportmerge: 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file airulermcp-0.3.1.tar.gz.
File metadata
- Download URL: airulermcp-0.3.1.tar.gz
- Upload date:
- Size: 67.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acb82ad6db2fcd01d3f9f7f11cc9e5f70f57310a9774978df299d7d52340ee5a
|
|
| MD5 |
94bc53401e3a8b43a0b97e843d960053
|
|
| BLAKE2b-256 |
a326422a4ca180c65615650afd2129213927d4dc8daf81c6fadf18e0a2908d25
|
Provenance
The following attestation bundles were made for airulermcp-0.3.1.tar.gz:
Publisher:
publish.yml on junqed/aimcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
airulermcp-0.3.1.tar.gz -
Subject digest:
acb82ad6db2fcd01d3f9f7f11cc9e5f70f57310a9774978df299d7d52340ee5a - Sigstore transparency entry: 475944787
- Sigstore integration time:
-
Permalink:
junqed/aimcp@4471c1e3cc37cd6e38ab7d58991382fb739702af -
Branch / Tag:
refs/tags/0.3.1 - Owner: https://github.com/junqed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4471c1e3cc37cd6e38ab7d58991382fb739702af -
Trigger Event:
release
-
Statement type:
File details
Details for the file airulermcp-0.3.1-py3-none-any.whl.
File metadata
- Download URL: airulermcp-0.3.1-py3-none-any.whl
- Upload date:
- Size: 34.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a5e648fc1e1b310e7f40572b442ccba3757331e1e24d9fc5d4b6da3da658d51
|
|
| MD5 |
1379adc5ab927b283ab8e61866ed7df7
|
|
| BLAKE2b-256 |
a1bd350a59c27941cab516ca9396d6db30e14ceb248bd815782a9386cb855f97
|
Provenance
The following attestation bundles were made for airulermcp-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on junqed/aimcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
airulermcp-0.3.1-py3-none-any.whl -
Subject digest:
4a5e648fc1e1b310e7f40572b442ccba3757331e1e24d9fc5d4b6da3da658d51 - Sigstore transparency entry: 475944859
- Sigstore integration time:
-
Permalink:
junqed/aimcp@4471c1e3cc37cd6e38ab7d58991382fb739702af -
Branch / Tag:
refs/tags/0.3.1 - Owner: https://github.com/junqed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4471c1e3cc37cd6e38ab7d58991382fb739702af -
Trigger Event:
release
-
Statement type: