Labsco
RaphFaure logo

inception-mcp

from RaphFaure

MCP server and CLI for managing INCEpTION projects, documents, and exports through the AERO v1 REST API.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

inception-mcp

A wrapper around INCEpTION's AERO v1 REST API, exposing corpus management operations as MCP tools and CLI commands.

Annotations are always performed by human annotators inside the INCEpTION interface. This package does not annotate: it handles corpus management tasks (upload, export, monitoring, import) that can be automated or delegated to an agent.

"Upload all .txt files in gutenberg/processed/ to project 1."
"Export annotations for document 42 by user admin in ctsv3 format to data/annot.tsv."

Exposes INCEpTION's AERO v1 REST API as:

  • MCP tools β€” callable from any MCP-compatible agent (Claude Code, Claude Desktop, etc.)
  • CLI β€” standalone terminal interface, no AI agent required

Both share the same underlying InceptionClient.

Use cases

ScenarioHow
Corpus upload at scaleBatch-upload hundreds of documents to a project
Pipeline managementChain upload β†’ monitor progress β†’ export completed annotations
Progress monitoringList all documents and their annotation states per user
Export and post-processingExport ctsv3/XMI annotations and pipe them into a parsing script
Multi-project managementCreate, inspect and archive projects without leaving the terminal

Features

FeatureMCP serverCLI
List / create / delete projectsβœ“βœ“
Export / import project ZIP (schema + docs + annotations)βœ“βœ“
Project progress statusβœ“βœ“
List / upload / delete documentsβœ“βœ“
Batch upload a folder of documentsβœ“βœ“
Export document sourceβœ“βœ“
List annotations by userβœ“βœ“
Export / import annotations (13 formats)βœ“βœ“
Export all annotations for a projectβœ“βœ“
Delete annotations by userβœ“βœ“
Export / delete curation layerβœ“βœ“

Supported export formats: ctsv3, xmi, xmi-struct, conllu, conll2003, conll2006, conll2009, conll2012, text, tcf, jsoncas, jsoncas-struct, nif.


Enabling the INCEpTION REST API

The AERO v1 REST API must be enabled before using this package. Refer to the official INCEpTION documentation for instructions.

Once enabled, the API is reachable at http://<host>:<port>/api/aero/v1. The Swagger UI is available at:

http://<host>:<port>/swagger-ui.html

Authentication uses HTTP Basic Auth with your INCEpTION credentials.


Architecture

inception_mcp/
β”œβ”€β”€ __init__.py      # Public exports: InceptionClient, InceptionError
β”œβ”€β”€ client.py        # InceptionClient β€” HTTP layer over AERO v1 REST API
β”œβ”€β”€ server.py        # FastMCP server β€” wraps client as MCP tools
└── cli.py           # argparse CLI β€” wraps client as shell commands
tests/
└── test_client.py   # Unit tests (22 tests, no INCEpTION instance required)

client.py is the single source of truth for all API calls. Adding a new operation means implementing it once in InceptionClient, then exposing it in server.py (as a @mcp.tool()) and in cli.py (as a new subcommand).

Run tests with:

pip install pytest
pytest tests/

Security notes

Destructive operations are irreversible. delete_project, delete_document, delete_annotations and delete_curation have no undo mechanism in INCEpTION. Always verify IDs before calling them.

The server runs locally and is only reachable from the machine where it is started. Credentials are read from environment variables β€” never hard-code them in files committed to version control. The .gitignore in this repository excludes .env.


INCEpTION API reference

The full AERO v1 Swagger UI is available at:

http://<your-inception-host>:<port>/swagger-ui.html

License

MIT β€” you are free to use, modify, and redistribute this software in any project, commercial or not, as long as the original copyright notice is kept.