Pakunoda-MCP

Pakunoda-MCP

MCP server that exposes Pakunoda project state to AI agents, providing resources, tools, and prompts for inspecting candidates, scores, and triggering hyperparameter searches.

Category
Visit Server

README

Pakunoda-MCP

MCP server that exposes Pakunoda project state to AI agents.

v0.1.0 — 7 resources, 10 tools (8 read / 2 write), 2 prompts. No arbitrary shell execution, no direct solver parameter control. See release notes.

Responsibility split

Concern Owner
Data ingestion, validation, candidate enumeration, compilation Pakunoda
Solver execution (mwTensor) Pakunoda (via R bridge)
Hyperparameter search (Optuna) Pakunoda
Workflow orchestration (Snakemake) Pakunoda
Exposing results to AI agents (MCP resources + tools) Pakunoda-MCP
Triggering search pipeline (high-level, via Snakemake CLI) Pakunoda-MCP

Pakunoda-MCP reads the results directory that Pakunoda produces. Write tools invoke Snakemake as a subprocess with an allow-listed target — they do not import Pakunoda internals or execute arbitrary commands.

MCP interface

Category Count Examples
Resources 7 pakunoda://project/config, pakunoda://search/trials, ...
Tools (read) 8 validate_project, enumerate_candidates, get_candidate_score, ...
Tools (write) 2 run_search, refresh_project_state
Prompts 2 inspect_project, compare_candidates

Read-only tools follow a list → detail pattern: enumerate_candidatesget_candidate_details / get_candidate_problem / get_candidate_result / get_candidate_score

Write tool run_search verifies that project.id in the target config matches the current results directory, rejecting mismatches before any subprocess runs.

For full parameter and return value details, see docs/api.md.

Environment variables

Pakunoda-MCP uses two environment variables to separate read and write concerns:

Variable Purpose Required for
PAKUNODA_RESULTS_DIR Path to a Pakunoda results directory (e.g. results/my_project). Used by all resources and read-only tools. All operations
PAKUNODA_REPO_DIR Path to the Pakunoda repository root (the directory containing Snakefile). Used by run_search to pin the execution context. Write tools only

Why two variables? The results directory and the Pakunoda repo may live in different locations. Read-only operations need only the results. Write tools need the repo to locate the Snakefile — they run Snakemake with cwd=PAKUNODA_REPO_DIR and an absolute --snakefile path, so the server's own working directory is irrelevant.

Quick start

pip install -e .

# Required: results directory produced by Pakunoda
export PAKUNODA_RESULTS_DIR=/path/to/results/my_project

# Optional: Pakunoda repo root (only needed for run_search)
export PAKUNODA_REPO_DIR=/path/to/Pakunoda

pakunoda-mcp

Claude Code

Add to ~/.claude/settings.json or project .mcp.json:

{
  "mcpServers": {
    "pakunoda": {
      "command": "pakunoda-mcp",
      "env": {
        "PAKUNODA_RESULTS_DIR": "/path/to/results/my_project"
      }
    }
  }
}

If you also want write tools (run_search), add PAKUNODA_REPO_DIR:

{
  "mcpServers": {
    "pakunoda": {
      "command": "pakunoda-mcp",
      "env": {
        "PAKUNODA_RESULTS_DIR": "/path/to/results/my_project",
        "PAKUNODA_REPO_DIR": "/path/to/Pakunoda"
      }
    }
  }
}

Docker

docker build -t pakunoda-mcp .

# Read-only (no PAKUNODA_REPO_DIR needed)
docker run --rm \
  -v /path/to/results:/data:ro \
  -e PAKUNODA_RESULTS_DIR=/data/my_project \
  -i pakunoda-mcp

# With write tools
docker run --rm \
  -v /path/to/results:/data \
  -v /path/to/Pakunoda:/repo:ro \
  -e PAKUNODA_RESULTS_DIR=/data/my_project \
  -e PAKUNODA_REPO_DIR=/repo \
  -i pakunoda-mcp

Usage examples

Read-only: inspect a project

Use the inspect_project prompt to walk through a standard check:

> Use the inspect_project prompt
(Agent calls validate_project → enumerate_candidates → summarize_search → recommend_model)

Or call tools directly:

> What candidates does this project have?
(Agent calls enumerate_candidates)

> Show me the score for c0_expression_methylation
(Agent calls get_candidate_score("c0_expression_methylation"))

Read-only: compare two candidates

> Use the compare_candidates prompt with c0_alpha and c1_beta
(Agent calls get_candidate_details / get_candidate_problem /
 get_candidate_result / get_candidate_score for each, then summarizes)

Write: run a search

> Run a hyperparameter search with 50 trials
(Agent calls run_search(project_path="/path/to/config.yaml", max_trials=50))
(Agent calls refresh_project_state to see updated results)

run_search checks that project.id in the target config matches the current results directory. A mismatch is rejected before any subprocess runs.

Development

pip install -e .
pytest

Current limitations

  • Minimal write: only run_search (via Snakemake subprocess) — no config generation, no freeze/release
  • No arbitrary execution: runner has a fixed allow-list of Snakemake targets
  • Single project: one results directory per server instance
  • stdio only: no HTTP/SSE transport
  • No auth: intended for local use

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured