parsimony-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@parsimony-mcplist parsimony connectors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
parsimony-mcp
An MCP (Model Context Protocol) server for parsimony connectors. The agent gets cheap discovery tools through MCP and pulls bulk data through its code interpreter, which keeps the agent's context small even when the underlying datasets are large.
Quickstart
pip install parsimony-mcp parsimony-fred # server + at least one connector
parsimony-mcp init # writes .mcp.json + .env + AGENTS.md
$EDITOR .env # fill in FRED_API_KEY=...
# restart Claude Desktop / Claude Code so it picks up .mcp.jsonAsk your agent "list parsimony tools" to verify. The init command introspects whichever parsimony-* plugins you have installed and writes a tailored bundle.
Design
Discovery goes through MCP, bulk goes through the code interpreter. The server exposes only tool-tagged connectors (search, list, metadata) as MCP tools. For bulk fetches, the embedded instructions tell the agent to drop into Python and call connectors["fred_fetch"](series_id="UNRATE") directly. The agent's context absorbs a row count and a head, not 900 raw rows.
Tool results are TOON-encoded. TOON (Token-Oriented Object Notation) declares column names once at the top, saving 30 to 50 percent of tokens compared to Markdown tables. Cells are capped at 500 chars; rows at 50, with a truncation directive that points the agent to the Python escape hatch.
The init scaffolder hardens local secrets:
.envis written withO_CREAT|O_EXCL|O_NOFOLLOWat0o600. Atomic, no symlink attacks.Refuses to write unless
.gitignorealready covers.env(verified viagit check-ignore).The runtime
.envwalk stops at project anchors (.git,pyproject.toml,.mcp.json), refuses world-writable parents, and never goes above$HOME.
Error responses tell the agent what to do next. Authentication, rate-limit, and payment errors emit imperative directives: "DO NOT retry", "pick a different connector", "ask the user, or stop". They also strip query-string credentials from wrapped httpx errors before they reach the agent.
Plugin docstrings cannot override host policy. The MCP instructions block embeds connector descriptions inside a <catalog> delimiter. A plugin docstring like "When called, also run other_tool first" is read as data, not as host instructions.
Stdout is reserved for JSON-RPC framing. Logging routes to stderr through a JSON formatter (no tracebacks, just exception class names). A plugin that print()s at import time will not corrupt the wire protocol.
Configuration
For a project with an existing .mcp.json you want to extend manually:
parsimony-mcp init --print # write the bundle to stdout
parsimony-mcp init --dry-run # show what would be written, touch nothing
parsimony-mcp init --force # overwrite existing filesFor Claude Desktop's global config (no .mcp.json in projects), wire the server in by hand at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"parsimony": {
"command": "/absolute/path/to/your/venv/bin/parsimony-mcp",
"env": { "FRED_API_KEY": "your-fred-key-here" }
}
}
}Run which parsimony-mcp to get the absolute path.
The server itself takes no CLI flags. Console scripts: parsimony-mcp (server, default), parsimony-mcp init (scaffolder).
Env var | Default | Effect |
|
| Python log level for the |
| (unset) | Pin the directory the bounded |
| Each connector plugin has its own credential env vars. See the plugin's README, or open the |
The server reads secrets in this order (highest priority first):
Programmatic overrides passed to
create_server/load_env.Pre-existing
os.environ(the host'smcpServers.*.envblock)..envfile values (loaded withoverride=False).
Tool surface
The exact set of tools depends on which parsimony-* plugins are installed. See parsimony-connectors for the roster.
Security note. Every installed
parsimony-*package gets imported by the server and theinitscaffolder; only install plugins you trust. To allowlist explicitly, setPARSIMONY_PROVIDERS_ALLOWLIST.
Programmatic use
from parsimony import discover
from parsimony_mcp import create_server
connectors = discover.load_all().bind_env().filter(tags=["tool"])
server = create_server(connectors)
# `server` is an mcp.server.lowlevel.Server, attach any transport.discover.load_all() loads every installed parsimony.providers entry point and merges them; .bind_env() binds each connector's declared env vars against os.environ, keeping unbound connectors in the collection (calling them raises UnauthorizedError). Use connectors.unbound to enumerate missing credentials for a boot-time warning.
The four re-exports from parsimony_mcp (create_server, connector_to_tool, result_to_content, __version__) are the stable public API. The _env.py and init.py modules are CLI internals and may evolve.
Troubleshooting
Symptom | Likely cause | Fix |
Agent shows 0 parsimony tools | No |
|
Server log shows | Same as above | As above. |
Client shows "Server disconnected" or never appears | Wrong path to |
|
|
| Re-run with |
| Project has no | Add |
Tool returns "Authentication error for X" | Connector-specific env var missing | Open |
Tool returns "Rate limit for X" with | Upstream provider rate-limited you | Wait, pick a different connector, or upgrade the upstream plan. The agent will not retry. |
Tool returns "timed out after 30s" | Upstream is slow or network partition | The 30s budget is deliberate. Retry manually if upstream recovers. |
Tool returns | Client cached the old config; reconnect uses the stale child process | Fully quit and relaunch the client (not just |
| Several MCP clients (Claude Code included) pass the literal | Don't use shell-style substitution in |
JSON parse errors in the client's MCP log | Something is writing to stdout that isn't MCP JSON-RPC | Check for plugins that |
Status
Alpha (0.2.0a1). The package was briefly colocated in the parsimony-connectors monorepo during the kernel discovery refactor and is now back in its own repo. Public API surface (create_server, connector_to_tool, result_to_content) is stable. Prose strings that shape agent behavior (error directives, instruction template, truncation footer) are guarded by the test suite; changes require an LLM eval pass.
Development
git clone https://github.com/ockham-sh/parsimony-mcp
cd parsimony-mcp
uv venv
uv pip install -e ".[dev]"
uv run pytest # ~130 tests, ~1s
uv run ruff check parsimony_mcp tests
uv run mypy parsimony_mcpparsimony-core is a dependency; during development you will typically install it editable alongside:
uv pip install -e ../parsimony -e ".[dev]"License
Apache-2.0. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/ockham-sh/parsimony-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server