imbi-mcp
MCP server for the Imbi DevOps service management platform. Exposes Imbi API functionality to AI agents via the Model Context Protocol.
How It Works
At startup the server fetches the OpenAPI spec from a running imbi-api instance and auto-generates MCP tools, resources, and resource templates using FastMCP.
Route mapping rules control what gets exposed:
- Excluded -- Auth, MFA, status, and thumbnail endpoints are hidden.
- Resources --
GETendpoints that return collections. - Resource templates --
GETendpoints with path parameters. - Tools -- Everything else (create, update, delete operations).
The caller's Authorization header is forwarded to the API so that
requests run with the caller's permissions.
Authentication
Two modes, which can be used together:
- Token (always on). The caller's
Authorizationheader — an Imbiik_API key or a JWT — is forwarded to the API, which authorizes the request. This works with no extra configuration. - OAuth (when configured). Set
--public-urland--auth-server-url(see below) to make the server an OAuth 2.0 Resource Server. It then verifies JWT access tokens locally, accepts-and-forwardsik_API keys, and publishes Protected Resource Metadata so MCP clients can discover the Imbi authorization server and run a browser login flow (authorization-code + PKCE, with Dynamic Client Registration). Local JWT verification uses the sharedIMBI_AUTH_JWT_SECRET.
FastMCP's DNS-rebinding Host/Origin guard is opt-in (disabled by default as of
fastmcp 3.4.4), so requests arriving through a reverse proxy are accepted
normally. To enable it, set FASTMCP_HTTP_HOST_ORIGIN_PROTECTION=true and list
the public host(s) in FASTMCP_HTTP_ALLOWED_HOSTS='["your-host"]'.
Requirements
- Python 3.12+
- A running imbi-api instance
Quick Start
# Install dependencies
moon run root:setup
# Run the server (imbi-api must be reachable)
uv run imbi-mcp serve
# Or with explicit options
uv run imbi-mcp serve --api-url http://localhost:8000 --transport streamable-http
CLI Options
imbi-mcp serve [OPTIONS]
| Option | Default | Env Var | Description |
|---|---|---|---|
--api-url |
http://localhost:8000 |
IMBI_INTERNAL_API_URL |
Base URL of the Imbi API |
--transport |
streamable-http |
MCP transport type | |
--host |
127.0.0.1 |
Host to bind to | |
--port |
8001 |
Port to bind to | |
--public-url |
(none) | IMBI_MCP_PUBLIC_URL |
Public base URL of the host fronting this server, WITHOUT the /mcp path (e.g. https://host); FastMCP appends its own /mcp mount path. Enables OAuth with --auth-server-url |
--auth-server-url |
(none) | IMBI_MCP_AUTH_SERVER_URL |
Imbi OAuth issuer URL (e.g. https://host); enables OAuth with --public-url |
Supported transports: stdio, http, sse, streamable-http
Docker
docker build -t imbi-mcp .
docker run -p 8001:8001 -e IMBI_INTERNAL_API_URL=http://imbi-api:8000 imbi-mcp
Development
moon run root:setup # Install deps and pre-commit hooks
moon run mcp:test # Run tests (90% coverage minimum)
moon run mcp:lint mcp:typecheck mcp:format # Run ruff + basedpyright + format check
uv run pre-commit run --all-files # Auto-format code
License
BSD-3-Clause
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 imbi_mcp-2.19.0.tar.gz.
File metadata
- Download URL: imbi_mcp-2.19.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2418353749523c91f73ca07ed7ffa875dc46e12bb91bbd71e73a2d88a7565876
|
|
| MD5 |
f7abec89ecdfd0bd0dd6a42d1cbd81a7
|
|
| BLAKE2b-256 |
d3496ee08c57dad8fe1f705fe29b97dd317d96d6a297542d861911b236f17c1e
|
Provenance
The following attestation bundles were made for imbi_mcp-2.19.0.tar.gz:
Publisher:
release.yml on AWeber-Imbi/imbi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imbi_mcp-2.19.0.tar.gz -
Subject digest:
2418353749523c91f73ca07ed7ffa875dc46e12bb91bbd71e73a2d88a7565876 - Sigstore transparency entry: 2239462813
- Sigstore integration time:
-
Permalink:
AWeber-Imbi/imbi@ca6ce7525bc4acdde6e87cbd1ea6cf3f49fcee06 -
Branch / Tag:
refs/tags/2.19.0 - Owner: https://github.com/AWeber-Imbi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ca6ce7525bc4acdde6e87cbd1ea6cf3f49fcee06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file imbi_mcp-2.19.0-py3-none-any.whl.
File metadata
- Download URL: imbi_mcp-2.19.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c56ef64eac54cb78041f9b06337aa834baf87b01b117a4e80234a26d29439c67
|
|
| MD5 |
dcf0cc86c3531124f585c223d92bdd03
|
|
| BLAKE2b-256 |
ad434935ba3143890de8b9f3be7da2ebdd0c875ea2d8a3bd7df562debe858dda
|
Provenance
The following attestation bundles were made for imbi_mcp-2.19.0-py3-none-any.whl:
Publisher:
release.yml on AWeber-Imbi/imbi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imbi_mcp-2.19.0-py3-none-any.whl -
Subject digest:
c56ef64eac54cb78041f9b06337aa834baf87b01b117a4e80234a26d29439c67 - Sigstore transparency entry: 2239468151
- Sigstore integration time:
-
Permalink:
AWeber-Imbi/imbi@ca6ce7525bc4acdde6e87cbd1ea6cf3f49fcee06 -
Branch / Tag:
refs/tags/2.19.0 - Owner: https://github.com/AWeber-Imbi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ca6ce7525bc4acdde6e87cbd1ea6cf3f49fcee06 -
Trigger Event:
push
-
Statement type: