Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ This is particularly useful where you don't have control over the environment, i
os.environ[CONDUCTOR_AUTH_KEY] = '<YOUR_APPLICATION_AUTH_KEY>'
os.environ[CONDUCTOR_AUTH_SECRET] = '<YOUR_APPLICATION_SECRET_KEY>'
```
To run with local development add 'local_dev' to the server arguments:
To run with local development add '--local_dev' to the server arguments:
```commandline
uv run server.py local_dev
uv run server.py --local_dev
```
> Note: the `/api` path is required as part of the CONDUCTOR_SERVER_URL for most applications
# Adding to Claude
Follow [this tutorial](https://modelcontextprotocol.io/quickstart/user) for adding the mcp server to claude, and use the following
configuration, with or without the `local_dev` argument:
configuration, with or without the `--local_dev` argument:
```json
{
"mcpServers": {
Expand All @@ -50,7 +50,7 @@ configuration, with or without the `local_dev` argument:
"/<YOUR ABSOLUTE PATH TO THE DIRECTORY CONTAINING server.py>",
"run",
"server.py",
"local_dev"
"--local_dev"
]
}
}
Expand All @@ -65,21 +65,35 @@ If you installed the package globally, i.e. from pypi:
```commandline
pip install conductor-mcp
```
then you can point to the system install in your Claude config:
then you can point to the system install in your Claude config, but first you must create a json config file for your conductor values:

```json
{
"CONDUCTOR_SERVER_URL": "https://developer.orkescloud.com/api",
"CONDUCTOR_AUTH_KEY": "<YOUR_APPLICATION_AUTH_KEY>",
"CONDUCTOR_AUTH_SECRET": "<YOUR_APPLICATION_SECRET_KEY>"
}
```
Claude config:
```json
{
"mcpServers": {
"conductor": {
"command": "conductor-mcp",
"args": [
"local_dev"
"--config",
"<ABSOLUTE PATH TO A JSON CONFIG FILE>"
]
}
}
}
```

You can also just the server from the command line on its own after installing through pip:
```commandline
conductor-mcp --config YOUR_CONFIG_FILE
```


# Adding to Cursor
The main Cursor instructions are [here](https://docs.cursor.com/context/model-context-protocol).
Expand Down
40 changes: 37 additions & 3 deletions conductor_mcp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,56 @@
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
import json
import os

from fastmcp import FastMCP
from pygments.lexer import default

from conductor_mcp import local_development
from conductor_mcp.tools.task import task_mcp
from conductor_mcp.tools.workflow import workflow_mcp
import sys
import click

from conductor_mcp.utils.constants import CONDUCTOR_SERVER_URL, CONDUCTOR_AUTH_KEY, CONDUCTOR_AUTH_SECRET

mcp = FastMCP("oss-conductor")
mcp.mount("workflow", workflow_mcp)
mcp.mount("task", task_mcp)


def run():
if "local_dev" in sys.argv:
@click.command()
@click.option(
"--local_dev",
"-l",
is_flag=True,
help="Used when the running code directly (i.e. git clone), set Conductor variables in the local_development.py file when using this option.",
)
@click.option(
"--config",
"-c",
default=None,
help="""
The location of a JSON config file containing the Conductor variables:
{
"CONDUCTOR_SERVER_URL": ""https://developer.orkesconductor.io/api"",
"CONDUCTOR_AUTH_KEY": "<YOUR_AUTH_KEY>",
"CONDUCTOR_AUTH_SECRET": "<YOUR_AUTH_SECRET>"
}
""",
)
def run(local_dev, config):
if local_dev and config is not None:
raise click.UsageError("--local_dev and --config are mutually exclusive, please use just one.")
elif local_dev:
local_development.initialize()
elif config is not None:
print(f"Initializing Conductor with config file: {config}")
with open(config, "r") as file:
data = json.load(file)
os.environ[CONDUCTOR_SERVER_URL] = data[CONDUCTOR_SERVER_URL]
os.environ[CONDUCTOR_AUTH_KEY] = data[CONDUCTOR_AUTH_KEY]
os.environ[CONDUCTOR_AUTH_SECRET] = data[CONDUCTOR_AUTH_SECRET]
# Initialize and run the server
mcp.run(transport="stdio")

Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
# specific language governing permissions and limitations under the License.
[project]
name = "conductor-mcp"
version = "0.1.3"
version = "0.1.4"
description = "MCP server for exposing conductor endpoints."
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"asyncio>=3.4.3",
"black>=25.1.0",
"click>=8.1.8",
"fastmcp>=2.2.5",
"freezegun>=1.5.1",
"httpx>=0.28.1",
Expand All @@ -34,4 +35,4 @@ requires = ["hatchling"]
build-backend = "hatchling.build"

[project.scripts]
conductor-mcp = "conductor_mcp.server:run"
conductor-mcp = "conductor_mcp.server:run"
4 changes: 3 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.