MCP Configuration
Copy
python
Copy
from artos_sdk import ArtosClient
# Configure MCP server connections
client = ArtosClient(
username="your-username",
password="your-password",
mcp_config={
"servers": [
{
"name": "filesystem-server",
"url": "mcp://localhost:8000",
"type": "filesystem",
"config": {
"root_path": "/data/documents",
"permissions": "read-write"
}
},
{
"name": "database-server",
"url": "mcp://db-server:8001",
"type": "database",
"config": {
"connection_string": "postgresql://user:pass@host:5432/db",
"schema": "clinical_data"
}
}
]
}
)
Environment Variable Configuration
Copy
bash
Copy
# MCP Server Configuration
ARTOS_MCP_SERVERS='[
{
"name": "filesystem-server",
"url": "mcp://localhost:8000",
"type": "filesystem",
"config": {"root_path": "/data/documents"}
},
{
"name": "api-server",
"url": "mcp://api-server:8002",
"type": "api",
"config": {"base_url": "https://api.external.com", "auth_token": "token123"}
}
]'
Using MCP Resources
Copy
python
Copy
# List available MCP resources
mcp_resources = client.mcp.list_resources()
for resource in mcp_resources:
print(f"Resource: {resource.name}")
print(f"Type: {resource.type}")
print(f"Server: {resource.server}")
# Access filesystem through MCP
files = client.mcp.filesystem.list_files("/clinical-data")
content = client.mcp.filesystem.read_file("/clinical-data/protocol.txt")
# Query database through MCP
results = client.mcp.database.query(
"SELECT * FROM patients WHERE status = 'enrolled'"
)
# Call external API through MCP
api_response = client.mcp.api.call(
endpoint="/patient-data",
method="GET",
params={"study_id": "12345"}
)
MCP Health Checks
Copy
python
Copy
# Validate MCP server connections
mcp_status = client.mcp.health_check()
for server, status in mcp_status.items():
print(f"MCP Server {server}: {status}")
# Test specific MCP server
filesystem_status = client.mcp.test_connection("filesystem-server")
if filesystem_status.is_healthy:
print("Filesystem MCP server is accessible")