Skip to main content
Glama
tugraskan

swatplus-mcp

by tugraskan

Tamandua

Makes the coding assistant you already use — Claude Code, Copilot, Codex, a local model — cheaper and more accurate on SWAT+.

It is not an assistant. It builds a facts-only index of the SWAT+ Fortran source, from static analysis alone, and serves it as MCP tools and as a file in your checkout. Procedures with locations, the call graph, file I/O with unit numbers, variable writes by field path, loop headers with their index variables, derived types with the units and meaning the source documents inline. Nothing in it is written by a model.

Use it

If you just want the tools — no SWAT+ checkout or parser:

pip install "git+https://github.com/tugraskan/Tamandua.git@v0.1.1"

The tagged package includes the pinned SWAT+ facts snapshot. The future PyPI distribution name is swatplus-tamandua (tamandua is already owned by an unrelated project). Point your assistant at the server with no machine-specific paths:

// .mcp.json (Claude Code) — VS Code uses .vscode/mcp.json, where these
// entries nest inside a top-level "servers" object instead.
{
  "mcpServers": {
    "swatplus-source": {
      "command": "swatplus-mcp",
      "args": ["--compact"]
    }
  }
}

If you have a SWAT+ checkout and the parser, point the server directly at the source:

swatplus-mcp --source /path/to/swatplus --compact

The running process fingerprints the working Fortran tree before each request. It reparses only after an edit, so the next answer follows the source without a manual rebuild or server restart.

To produce a portable facts file for someone else:

cd <your swatplus checkout> && swatplus-build

That writes swatplus-facts.json and nothing else. A server started with --facts notices when that file is replaced and reloads the newest complete snapshot without restarting. The package-bundled release snapshot remains static by design.

Related MCP server: fw-context-mcp

Pairs with dataselector

swatplus-dataselector serves the other half: what a column in an input file means, and what is in a real TxtInOut dataset. The two don't overlap — this one knows what the Fortran does, that one knows what the files hold. Run both and tell your assistant which is for which.

Layout

tamandua/
├── index/             # build the facts, render, install pointers, snapshot
│   ├── build.py       #   static analysis -> SourceIndex
│   ├── snapshot.py    #   read/write swatplus-facts.json, so serving needs no parser
│   ├── render.py      #   SOURCE_INDEX.md
│   ├── install.py     #   assistant instruction-file pointers
│   └── scope.py       #   loop nesting, for conditional breakpoints
├── mcp/server.py      # 14 read-only tools over the same objects
├── mcp/client.py      # generic MCP stdio client (talk to another server)
├── output/reader.py   # query a run's output files
└── config.py          # loads docs/pins.toml

Develop

export SWATPLUS_SOURCE=/path/to/swatplus
export SWATPLUS_REFERENCE_CORPUS=/path/to/swatplus-reference-corpus  # the parser
python -m pip install -e ".[dev]"
pytest

The parser is a build-time dependency only: the bundled facts file lets the installed server run with neither it nor the SWAT+ source. Pass --facts to use another snapshot or --source to build live from a checkout.

# builds swatplus-facts.json plus sibling swatplus-rhs.json by default
swatplus-build --facts dist/swatplus-facts.json --out dist/SWATPLUS_INDEX.md

# serve them with nothing else installed
swatplus-mcp --facts dist/swatplus-facts.json

Tagging v*.*.* runs .github/workflows/release.yml, which builds all three artifacts against the pinned commits, deletes the checkouts, verifies the snapshot and sidecar still answer, and publishes them.

Principles

Facts only — if a model wrote it, it does not go in the index. Every claim carries its file and line. Measure before concluding; findings live in docs/*_experiment.md with the script that produced them. Eight defects in this work were found by ordinary use and none by any harness, so prefer running the thing over reasoning about it.

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A local, SQLite-backed code index for Claude Code, exposed over MCP, enabling targeted code retrieval without external APIs.
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Exposes tools for AI assistants to query a persistent SQLite+FTS5 index of C/C++ symbols parsed from real build commands, enabling sub-millisecond lookup, full-text search, and natural-language explanation without hallucination.
    38
    7
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Local-first, read-only MCP server for Claude Code that indexes and searches full-stack projects (FastAPI + React + PostgreSQL) with SQLite-backed FTS, cross-reference graph, and file-watcher auto-reload.
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Semantic code index and gatekeeper that exposes 14 read-only MCP tools for AI agents, enabling symbol search, definition lookup, reference finding, and impact analysis via static analysis of codebases.
    14
    MIT

View all related MCP servers

Related MCP Connectors

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

  • Read-only MCP connector serving the Run It on AI book; index and Implementation Blocks are free.

  • Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tugraskan/Tamandua'

If you have feedback or need assistance with the MCP directory API, please join our Discord server