MCP server for Colectica Repository REST API
Project description
Colectica MCP Server
MCP server for Colectica Repository REST API with:
- OpenAPI/Swagger discovery
- operation invocation by OpenAPI operationId or synthesized id (
METHOD_path_segments) - Basic Auth and Bearer Token support
- stdio transport now, optional streamable-http transport switch
1. Install
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .
2. Configure
Copy .env.example to .env and set values:
COLECTICA_BASE_URL(your Colectica Portal URL)- either
COLECTICA_BEARER_TOKENorCOLECTICA_USERNAME+COLECTICA_PASSWORD(or both)
Optional:
COLECTICA_OPENAPI_CACHE_TTL_SECONDS(default300; set0to disable cache)COLECTICA_RETRY_MAX_RETRIES(default2)COLECTICA_RETRY_BASE_SECONDS(default0.5)COLECTICA_RETRY_MAX_SECONDS(default8)
3. Run MCP server
stdio (default)
colectica-mcp --transport stdio
streamable-http (optional)
colectica-mcp --transport streamable-http --mount-path /mcp
4. Available MCP tools
health_check(auth_mode="auto")list_operations(auth_mode="auto")find_operations(query, auth_mode="auto", limit=50)find_ddi_operations(auth_mode="auto", limit=50)call_operation(operation_id, arguments, auth_mode="auto")call_endpoint(method, path, arguments, auth_mode="auto")operation_details(operation_id, auth_mode="auto")call_operation_paginated(operation_id, arguments, auth_mode="auto", max_pages=20, items_path=None)list_operation_categories(auth_mode="auto")list_operations_by_category(category, auth_mode="auto", limit=200)get_repository_info(auth_mode="auto")get_item(arguments, auth_mode="auto")search(arguments, auth_mode="auto")register_item(arguments, auth_mode="auto")get_item_by_urn(urn, auth_mode="auto")register_item_body(body, auth_mode="auto")get_ddi_fragment(agency, identifier, version=None, auth_mode="auto")get_ddi_set_fragment(agency, identifier, version=None, auth_mode="auto")get_item_json(agency, identifier, version=None, auth_mode="auto")get_item_json_set(agency, identifier, version=None, auth_mode="auto")get_item_json_set_filtered(body, auth_mode="auto")
5. Recommended usage flow
health_checklist_operationslist_operation_categoriesto see API groups (Agency, Comment, Ddi, Event, Item, Permission, Query, Rating, Replication, Repository, Set, Setting, Tag, Token, Transaction, VersionNumber)list_operations_by_categoryto narrow to one groupcall_operationusing operationId and arguments from your Swagger schema
For request bodies, pass arguments.body.
If you prefer to execute directly from HTTP route + verb, use call_endpoint(method, path, arguments, auth_mode).
If your OpenAPI spec does not provide operationId values, use synthesized ids in this format:
METHOD_<normalized_path>- Example:
GET /api/v1/ddi/{agency}/{identifier}->GET_api_v1_ddi_agency_identifier
Optional for non-JSON operations:
arguments.content_type(for exampleapplication/x-www-form-urlencodedormultipart/form-data)
Use operation_details to inspect supported parameters and request body content types before invoking.
For paged endpoints, use call_operation_paginated to aggregate items across pages. The server will follow continuation tokens when available, including body tokens like nextResult for query endpoints.
6. DDI integration workflow
Use this sequence to integrate with DDI-focused Colectica endpoints:
- Call convenience wrappers directly:
get_ddi_fragment,get_ddi_set_fragment,get_item_json,get_item_json_set. - Use
get_item_json_set_filteredfor selective graph traversal. - For advanced/non-wrapped routes, run
find_ddi_operationsand confirm withoperation_details(operation_id). - Execute custom integration calls via
call_operationusing typedargumentsandarguments.body. - For large result sets, switch to
call_operation_paginated.
7. Verification commands
Run Colectica server tool unit tests locally:
python -m unittest tests/test_server_tools.py tests/test_client_pagination.py -v
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
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 colectica_mcp_server-0.1.4.tar.gz.
File metadata
- Download URL: colectica_mcp_server-0.1.4.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6815bcc28b95072211d6f5baa3a6435183f648b559d7976f870816bac05ffb7f
|
|
| MD5 |
43fc25a73cd25e9370116465e94d880b
|
|
| BLAKE2b-256 |
01cd269554b0710be4c63f31bdcad985a9ce8383c2d27dbd0266d7aa8760b12d
|
Provenance
The following attestation bundles were made for colectica_mcp_server-0.1.4.tar.gz:
Publisher:
publish-to-pypi.yml on Keayoub/colectica-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
colectica_mcp_server-0.1.4.tar.gz -
Subject digest:
6815bcc28b95072211d6f5baa3a6435183f648b559d7976f870816bac05ffb7f - Sigstore transparency entry: 1587611753
- Sigstore integration time:
-
Permalink:
Keayoub/colectica-mcp-server@4ebc4b0997b099962d23675f08492d3b6374e981 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Keayoub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@4ebc4b0997b099962d23675f08492d3b6374e981 -
Trigger Event:
push
-
Statement type:
File details
Details for the file colectica_mcp_server-0.1.4-py3-none-any.whl.
File metadata
- Download URL: colectica_mcp_server-0.1.4-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee50a550a625e479a9af55045b959fca1eced35efca01c33d27a9ac597726854
|
|
| MD5 |
10ebbcc570c7fac52a6305f226a29747
|
|
| BLAKE2b-256 |
f2e4a6ede6ee22df99a3bff7c87371b103c75254ce17e0681474a2f4f5b6fd9c
|
Provenance
The following attestation bundles were made for colectica_mcp_server-0.1.4-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on Keayoub/colectica-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
colectica_mcp_server-0.1.4-py3-none-any.whl -
Subject digest:
ee50a550a625e479a9af55045b959fca1eced35efca01c33d27a9ac597726854 - Sigstore transparency entry: 1587611788
- Sigstore integration time:
-
Permalink:
Keayoub/colectica-mcp-server@4ebc4b0997b099962d23675f08492d3b6374e981 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Keayoub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@4ebc4b0997b099962d23675f08492d3b6374e981 -
Trigger Event:
push
-
Statement type: