Using `frappe-mcp` with Frappe version 15
- Dominant language
- Python
- Stars
- 165
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for building this project.
I am using Frappe 15.43. When I try to configure OAuth2 in Frappe, I just dont see anything in my installation of Frappe as documented here (https://docs.frappe.io/framework/oauth2). I believe the docs are for a newer version of Frappe.
When I try to hit "connect" in Inspector, I get the following error in the server console:
```
15:47:08 web.1 | Initializing
15:47:08 web.1 | Traceback (most recent call last):
15:47:08 web.1 | File "apps/frappe/frappe/handler.py", line 74, in execute_cmd
15:47:08 web.1 | method = get_attr(cmd)
15:47:08 web.1 | ^^^^^^^^^^^^^
15:47:08 web.1 | File "apps/frappe/frappe/handler.py", line 287, in get_attr
15:47:08 web.1 | method = frappe.get_attr(cmd)
15:47:08 web.1 | ^^^^^^^^^^^^^^^^^^^^
15:47:08 web.1 | File "apps/frappe/frappe/__init__.py", line 1765, in get_attr
15:47:08 web.1 | return getattr(get_module(modulename), methodname)
15:47:08 web.1 | ^^^^^^^^^^^^^^^^^^^^^^
15:47:08 web.1 | File "apps/frappe/frappe/__init__.py", line 1483, in get_module
15:47:08 web.1 | return importlib.import_module(modulename)
15:47:08 web.1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15:47:08 web.1 | File "//.pyenv/versions/3.11.9/lib/python3.11/importlib/__init__.py", line 126, in import_module
15:47:08 web.1 | return _bootstrap._gcd_import(name[level:], package, level)
15:47:08 web.1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15:47:08 web.1 | File "", line 1204, in _gcd_import
15:47:08 web.1 | File "", line 1176, in _find_and_load
15:47:08 web.1 | File "", line 1147, in _find_and_load_unlocked
15:47:08 web.1 | File "", line 690, in _load_unlocked
15:47:08 web.1 | File "", line 940, in exec_module
15:47:08 web.1 | File "", line 241, in _call_with_frames_removed
15:47:08 web.1 | File "apps/memberships/memberships/mcp.py", line 3, in
15:47:08 web.1 | from flask import Response
15:47:08 web.1 | ModuleNotFoundError: No module named 'flask'
15:47:08 web.1 |
15:47:08 web.1 | During handling of the above exception, another exception occurred:
15:47:08 web.1 |
15:47:08 web.1 | Traceback (most recent call last):
15:47:08 web.1 | File "apps/frappe/frappe/app.py", line 114, in application
15:47:08 web.1 | response = frappe.api.handle(request)
15:47:08 web.1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
15:47:08 web.1 | File "apps/frappe/frappe/api/__init__.py", line 49, in handle
15:47:08 web.1 | data = endpoint(**arguments)
15:47:08 web.1 | ^^^^^^^^^^^^^^^^^^^^^
15:47:08 web.1 | File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
15:47:08 web.1 | return frappe.handler.handle()
15:47:08 web.1 | ^^^^^^^^^^^^^^^^^^^^^^^
15:47:08 web.1 | File "apps/frappe/frappe/handler.py", line 49, in handle
15:47:08 web.1 | data = execute_cmd(cmd)
15:47:08 web.1 | ^^^^^^^^^^^^^^^^
15:47:08 web.1 | File "apps/frappe/frappe/handler.py", line 76, in execute_cmd
15:47:08 web.1 | frappe.throw(_("Failed to get method for command {0} with {1}").format(cmd, e))
15:47:08 web.1 | File "apps/frappe/frappe/__init__.py", line 652, in throw
15:47:08 web.1 | msgprint(
15:47:08 web.1 | File "apps/frappe/frappe/__init__.py", line 617, in msgprint
15:47:08 web.1 | _raise_exception()
15:47:08 web.1 | File "apps/frappe/frappe/__init__.py", line 568, in _raise_exception
15:47:08 web.1 | raise exc
15:47:08 web.1 | frappe.exceptions.ValidationError: Failed to get method for command memberships.mcp.handle_mcp with No module named 'flask'
15:47:08 web.1 |
15:47:08 web.1 | 127.0.0.1 - - [24/Aug/2025 15:47:08] "POST /api/method/memberships.mcp.handle_mcp HTTP/1.1" 417 -
```
When I try the OAuth flow in Inspector, I get the following error:
```
15:51:24 web.1 | 127.0.0.1 - - [24/Aug/2025 15:51:24] "OPTIONS /.well-known/oauth-protected-resource HTTP/1.1" 200 -
15:51:24 watch.1 | Watching for changes...
15:51:24 web.1 | 127.0.0.1 - - [24/Aug/2025 15:51:24] "GET /.well-known/oauth-protected-resource HTTP/1.1" 404 -
```
I belive `frappe_mcp` works with later versions of Frappe or am I missing something in my OAuth2 setup?
Thanks for your help
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with memberships/mcp.py and the Frappe OAuth2 documentation linked in the issue, then reproduce the handle_mcp request and the /.well-known/oauth-protected-resource request on Frappe 15.43. Verify the reported Flask import failure and 404, and document whether Frappe 15 is supported or what setup behavior needs to change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100