mcp-migration-tools
Provides AI-callable tools for modernizing legacy applications, including stack detection, API contract extraction, SQL to Flyway conversion, and migration effort estimation.
README
mcp-migration-tools
A small, public-safe FastMCP server that exposes practical legacy-to-modern migration helpers as AI-callable tools — the same "thin tool wrapper over tested, pure logic" pattern I use on a larger production MCP server, distilled into a clean, fully generic example.
<p> <a href="../../actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/badge/CI-GitHub_Actions-2088FF?logo=githubactions&logoColor=white"></a> <img alt="Python" src="https://img.shields.io/badge/Python-3.11_%7C_3.12-3776AB?logo=python&logoColor=white"> <img alt="FastMCP" src="https://img.shields.io/badge/FastMCP-server-6c63ff"> <img alt="Tests" src="https://img.shields.io/badge/tests-17_passing-0ea5a4"> <img alt="License" src="https://img.shields.io/badge/License-MIT-c9a44c"> </p>
Why this exists
Modernizing 100+ legacy apps means doing the same analysis over and over: what stack is this? what endpoints does it expose? how do I port this DDL? how big is the job? These are perfect MCP tools — small, deterministic, and callable by an AI agent (or a human) on demand.
The tools
| Tool | What it does |
|---|---|
detect_stack |
Infers the dominant tech stack from a file listing (weights manifests over single files) |
extract_api_contract |
Pulls {method, path} REST endpoints from Spring controller source |
sql_to_flyway |
Converts SQL Server DDL into a portable Flyway migration (identity cols, MONEY, NVARCHAR, GETDATE(), brackets, GO, dbo.) |
estimate_migration_effort |
Transparent person-day estimate from coarse inventory counts, with a risk band |
Design: pure logic + thin MCP layer
tools/*.py ← pure, dependency-free functions (100% unit-tested)
▲
server.py ← FastMCP wrappers: @mcp.tool() delegating to the pure logic
Keeping the logic free of the MCP runtime means every tool is fast to test
and reusable outside MCP — the tests don't even import fastmcp.
Quick start
# install
pip install .[dev]
# run the tests (17 passing)
pytest -q
# run the MCP server (stdio transport)
mcp-migration-tools
Use the tools directly (no MCP needed)
from mcp_migration_tools.tools import detect_stack, sql_to_flyway
detect_stack(["ProductList.asp", "web.config"])
# {'stack': 'aspnet', 'confidence': 0.75, ...}
sql_to_flyway("CREATE TABLE [dbo].[Product]([Id] INT IDENTITY(1,1))", version=1,
description="create product")
# {'filename': 'V1__create_product.sql', 'body': 'CREATE TABLE Product(Id INT GENERATED BY DEFAULT AS IDENTITY)\n'}
Register with an MCP client
Example client config (e.g. for an MCP-capable IDE/agent):
{
"mcpServers": {
"migration-tools": {
"command": "mcp-migration-tools"
}
}
}
Project structure
mcp-migration-tools/
├── src/mcp_migration_tools/
│ ├── server.py # FastMCP server (tool registration)
│ └── tools/ # pure, tested logic
│ ├── stack_detector.py
│ ├── api_extractor.py
│ ├── sql_translator.py
│ └── effort_estimator.py
├── tests/ # pytest suite (one file per tool)
├── .github/workflows/ci.yml # test on Python 3.11 & 3.12
└── pyproject.toml
<sub>Part of my modernization portfolio · <a href="https://simeptk.github.io">simeptk.github.io</a> · companion to <a href="https://github.com/simeptk/legacy-to-modern-demo">legacy-to-modern-demo</a></sub>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。