MCP server that gives AI assistants searchable LibLCM / FlexLibs / Flexicon API docs for writing FLExTools scripts.
Project description
FLExTools MCP
An MCP server that enables AI assistants to write FLExTools scripts and directly manipulate FieldWorks lexicon data using natural language.
Developed for SIL Global by Matthew Lee in connection with the SIL's AI Integration Advisory Board and the FLExTrans team.
Quick Overview
What it does: FLExTools MCP gives AI assistants (Claude, Copilot, Gemini) the knowledge to write FLExTools modules by providing indexed, searchable documentation of LibLCM and FlexLibs APIs.
** Videos **
Videos
The MCP Connection: Talking to your Dictinary
This podcast, for a linguistic audience, gives an overview of using the FLExTools MCP.
MCPs for FLEx and FLExTools: LangTech AI Software Engineering CoP
This presentation, given to an audience of programmers, discusses the background, architecture, and advantages of an MCP, and introduces the FLExTools MCP.
Three ways to use it:
- Generate legacy modules (FlexLibs stable)
- Generate modern modules (Flexicon with ~1,400 functions)
- Run operations directly on FieldWorks databases using natural language queries
Example: "Delete any sense with 'q' in the gloss" → AI generates, tests, and runs the operation automatically.
⚠️ Warning: Backup your project first - there are no guard-rails.
Why MCP? Why AI?
- What is an MCP Server? See WHY-MCP.md - explains the LibLCM complexity problem and why generic AI assistants fail
- When is AI useful? See WHY-AI.md - learning curve problems and when manual approaches are better
Getting Started
1. Installation
FLExToolsMCP is published on PyPI. The indexed API documentation ships inside the package, so there is nothing to clone or build. The one prerequisite is FieldWorks/FLExTools, which means Windows + .NET.
One-line install (recommended) — no repo, no manual dependency install:
# Claude Code
claude mcp add flextoolsmcp -- uvx flextoolsmcp
uvx (from uv) fetches the package and all of its
dependencies — including Flexicon, the
deep FieldWorks wrapper — into an isolated cache and runs the server. Nothing
else to install. Upgrading FLExToolsMCP re-resolves to the latest compatible
Flexicon. Prefer a persistent install? uv tool install flextoolsmcp or
pip install flextoolsmcp.
Manual MCP config (Claude Desktop, Cursor, and other tools):
{
"mcpServers": {
"flextoolsmcp": {
"command": "uvx",
"args": ["flextoolsmcp"]
}
}
}
2. Connect to Your AI Assistant
See SETUP.md for Claude Code, Antigravity, and other tools.
Note: Each AI tool has different MCP configuration syntax. See SETUP.md for your specific tool.
User data lives under ~/.flextoolsmcp/ (logs, saved skeletons, cached
models, and any runtime-refreshed indexes) — it persists across upgrades.
Developing from source
git clone https://github.com/MattGyverLee/FlexToolsMCP.git
cd FlexToolsMCP
pip install -e ".[dev]" # editable install with dev tools (pulls in Flexicon)
# Test it works
python -c "from flextoolsmcp.server import APIIndex, get_index_dir; i=APIIndex.load(get_index_dir()); print('Loaded', len(i.flexicon.get('entities', {})), 'Flexicon entities')"
3. Updating to New Versions
See SETUP.md for how to pull new releases.
4. Start Using
See USAGE.md for workflows, tool reference, and examples.
What's Included
MCP Tools (16)
Admin & Config:
flextools_start- Initialize session, set project and API modeflextools_manage_config- Get/set/delete persistent configurationflextools_get_session_history- View operation history and undo stackflextools_undo_last_operation- Undo the most recent writeflextools_get_module_template- Get FLExTools module boilerplate
Discovery:
flextools_search_by_capability- Find APIs by natural language intentflextools_get_object_api- Get full API for an object/operations classflextools_get_navigation_path- Find traversal between object typesflextools_find_examples- Get code examples by operation typeflextools_resolve_property- Check casting requirements for properties
Catalog:
flextools_list_categories- List semantic domains (lexicon, grammar, etc.)flextools_list_entities_in_category- List entities in a domain
Module & Execution:
flextools_start_module- Interactive wizard for new moduleflextools_get_operation_logs- View logs and pattern recommendationsflextools_run_module- Execute code with dry-run and write modes
API Coverage
- LibLCM: 2,295 C# entities
- FlexLibs Stable: ~71 methods
- Flexicon: ~1,400 methods (99% documented, 82% with examples)
Test-Proven Examples
"Remove 'el ' from the beginning of any Spanish gloss"
"Add an environment named 'pre-y' with the context '/_y'"
"Delete the entry with lexeme ɛʃːɛr"
"List entries with "ː" in the headword"
"Are there any duplicates by gloss (fuzzy match) and POS?"
Key Features
- Discovery-first workflow - the AI assembles modules from indexed building blocks (signatures, navigation skeletons, examples, casting fixes) rather than inventing API calls from training memory. See USAGE.md.
- Automatic index refresh when you update FieldWorks or libraries
- Dry-run mode to test before writing data
- Semantic search with synonym expansion
- Pythonnet casting detection - warns when you need type conversions
- Code examples extracted from real-world usage
- Multiple library versions supported simultaneously
Documentation
| Document | Purpose |
|---|---|
| HISTORY.md | Release notes and version history |
| SETUP.md | Installation and AI tool configuration |
| USAGE.md | How to use the MCP, workflows, examples |
| DEVELOPMENT.md | Project structure, architecture, contributing |
| docs/WHY-MCP.md | Why FieldWorks needs MCP servers |
| docs/WHY-AI.md | When AI is useful for FieldWorks work |
| docs/INNOVATIONS.md | Technical innovations in this MCP |
| docs/BACKGROUND.md | Project history |
Safety & Limitations
Safety
- Always backup before write operations - the MCP defaults to dry-run mode
- Dry run shows what would happen before writing
- Requires explicit user permission for write operations
Limitations
- Cannot control the FLEx GUI (filters, display, etc.)
- Only manipulates data, not UI state
- Flexicon still undergoing extensive testing
- Some Scripture module edge cases recently fixed
Architecture
User Request -> AI Assistant -> MCP Server -> Indexed APIs
|
Generated FLExTools Script or Direct Execution
|
FLExTools (IronPython) or Flexicon
|
LibLCM (C# data model)
|
FieldWorks Database
For technical details, see DEVELOPMENT.md.
License
MIT License - See LICENSE file for details
Contributing
Contributions are welcome! Please submit issues and pull requests on GitHub.
For development info, see DEVELOPMENT.md.
Acknowledgments
- The FieldWorks developers (Jason, Ken, Hasso, and team)
- Craig, the developer of FLExTools and FlexLibs
- The SIL AI Implementation Advisory Board
- Ron, Beth and the FLExTrans team
- My mentors Doug, Jeff, and Jenni at SIL LangTech
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flextools_mcp-2.3.1.tar.gz.
File metadata
- Download URL: flextools_mcp-2.3.1.tar.gz
- Upload date:
- Size: 11.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ea1e3c7878c013d46ee5c01526801fb5f9cf7184d416c11aba46985fce91074
|
|
| MD5 |
894b89e402cde3ac334b02d33719e8fb
|
|
| BLAKE2b-256 |
ac63acfb067f3a10b888492085535279d537cd3aafe33fa8e4634808040cc1c0
|
Provenance
The following attestation bundles were made for flextools_mcp-2.3.1.tar.gz:
Publisher:
publish.yml on MattGyverLee/FlexToolsMCP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flextools_mcp-2.3.1.tar.gz -
Subject digest:
7ea1e3c7878c013d46ee5c01526801fb5f9cf7184d416c11aba46985fce91074 - Sigstore transparency entry: 2067203595
- Sigstore integration time:
-
Permalink:
MattGyverLee/FlexToolsMCP@ffa3c0b0b9e4826104c2bcfcad229a5fe8eebd98 -
Branch / Tag:
refs/tags/v2.3.1 - Owner: https://github.com/MattGyverLee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ffa3c0b0b9e4826104c2bcfcad229a5fe8eebd98 -
Trigger Event:
push
-
Statement type:
File details
Details for the file flextools_mcp-2.3.1-py3-none-any.whl.
File metadata
- Download URL: flextools_mcp-2.3.1-py3-none-any.whl
- Upload date:
- Size: 11.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
417756131b14c34145c868272498226271cb794156ef0852db69022daf9f20b2
|
|
| MD5 |
90b3aed1bc3ca8efaf4ad8ef31868e73
|
|
| BLAKE2b-256 |
48ded0041b6fdad8bf5d9c1e5e361ee6629c680f0d84eea38916e51fd02f9619
|
Provenance
The following attestation bundles were made for flextools_mcp-2.3.1-py3-none-any.whl:
Publisher:
publish.yml on MattGyverLee/FlexToolsMCP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flextools_mcp-2.3.1-py3-none-any.whl -
Subject digest:
417756131b14c34145c868272498226271cb794156ef0852db69022daf9f20b2 - Sigstore transparency entry: 2067203859
- Sigstore integration time:
-
Permalink:
MattGyverLee/FlexToolsMCP@ffa3c0b0b9e4826104c2bcfcad229a5fe8eebd98 -
Branch / Tag:
refs/tags/v2.3.1 - Owner: https://github.com/MattGyverLee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ffa3c0b0b9e4826104c2bcfcad229a5fe8eebd98 -
Trigger Event:
push
-
Statement type: