pyRevit Foundry 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., "@pyRevit Foundry MCPrun a health check on the current extension"
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.
pyRevit Foundry MCP
MCP server for developing and maintaining pyRevit extensions. Static analysis only, no Revit runtime required.
License: GPL-3.0 (same as pyRevit). See LICENSE. Contributing: CONTRIBUTING.md.
What it does
Scan extension layout – Inventory bundles, scripts, bundle.yaml
Generate bundle.yaml – Infer title/tooltip from
__title__/docstring for missing bundlesImport audit – Unused imports, raw RevitAPI usage, pyRevit wrapper suggestions (with core clone)
Duplicate detection – Function-level duplicate code across scripts
Lib structure – Propose
lib/module tree from duplicates (report-only)Patch engine – Unified diffs, dry-run by default
Related MCP server: mcp-server-analyzer
Quickstart
Install
pip install -e .
# or: uv pip install -e .Run MCP server (stdio)
pyrevit-foundry
# or: python -m foundry_mcp.serverCursor MCP config
Add to .cursor/mcp.json:
{
"mcpServers": {
"pyrevit-foundry": {
"command": "pyrevit-foundry",
"args": [],
"cwd": "D:/path/to/your/pyrevit-extension-repo"
}
}
}Or use uv:
{
"mcpServers": {
"pyrevit-foundry": {
"command": "uv",
"args": ["run", "pyrevit-foundry"],
"cwd": "D:/path/to/your/pyrevit-extension-repo"
}
}
}Repo layout
foundry_core/– indexers, analyzers, extension creator (no MCP deps)foundry_mcp/– MCP server and toolstests/– pytest.pyrevit-foundry.tomlis gitignored; copy from.pyrevit-foundry.toml.examplefor local core path.
pyRevit core clone (optional)
For wrapper/import suggestions, point to a local pyRevit core clone:
Option 1: .pyrevit-foundry.toml in repo root (copy from .pyrevit-foundry.toml.example):
pyrevit_core_path = "D:/path/to/pyrevit-clone"Option 2: Pass core_root to import_audit_with_core tool.
Tools
Tool | Description |
| One-shot overview – scan, bundle.yaml, extensions.json, import audit, duplicates, IronPython |
| Full inventory (summary_only, limit_bundles, limit_py_files) |
| Bundles without bundle.yaml (optional for pushbuttons; recommended) |
| Create bundle.yaml for bundles that lack it (dry_run | write) |
| Validate extensions.json schema |
| Suggest deps from imports |
| Unused imports, raw API, wrapper suggestions |
| Duplicate clusters (limit, summary_only) |
| f-strings, type hints, walrus, match (IronPython 2.7 incompat) |
| Lib module proposals |
| Extract duplicates to lib/ and patch scripts (dry_run | write) |
| Apply patches (dry_run | write) |
| Create config template for extension (run first, user fills, then create_extension) |
| Return config template content (no file) |
| Create extension from config_path or inline params |
| Add a single pushbutton to an existing extension |
Resources vs tools
Use resources when the client supports MCP resources and you need:
foundry://repo/tree– Full inventory JSON (for context loading)foundry://repo/py_files– List of scriptsfoundry://repo/file/{path}– Read a file by relative pathfoundry://repo/health– Quick health summary (bundles, missing yaml, ext_json issues)foundry://core/version_info– pyRevit core git shafoundry://core/index– Core module/symbol index
Use tools when you need to:
Run analyses (health check, import audit, duplicates, IronPython)
Generate or apply changes (bundle.yaml, extract_to_lib, patches)
Validate or suggest (extensions.json)
Tip: Start with run_health_check or foundry://repo/health for a quick overview, then drill down with specific tools.
Safety
Default: dry-run – No file writes unless
mode="write"Patches are minimal and reversible
No f-strings in generated patches (IronPython 2.7 compat)
No network calls
Tests
pytest tests/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.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that exposes Pyright language server functionality for Python, providing tools for type checking, code completions, and finding definitions. It enables AI models to perform static analysis and code formatting through the Model Context Protocol.Last updated7MIT
- AlicenseAqualityAmaintenanceAn MCP server that performs comprehensive Python code analysis using Ruff, ty, and Vulture for linting, type checking, and dead code detection.Last updated811MIT
- Flicense-qualityDmaintenanceMCP server that provides code validation rules and analysis for various stacks/frameworks, enabling automated code reviews and reporting directly from VS Code and other editors.Last updated
- Alicense-qualityCmaintenanceA code review MCP server built on FastMCP, supporting security audit, style check, complexity analysis, and bug pattern detection for Python code.Last updatedMIT
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
MCP server for Klever blockchain smart contract development.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/OnePowerUser88/pyRevitFoundryMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server