gramps-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. gramps_mcp-0.1.0/LICENSE +21 -0
  2. gramps_mcp-0.1.0/MANIFEST.in +4 -0
  3. gramps_mcp-0.1.0/PKG-INFO +271 -0
  4. gramps_mcp-0.1.0/README.md +242 -0
  5. gramps_mcp-0.1.0/gramps_mcp/__init__.py +54 -0
  6. gramps_mcp-0.1.0/gramps_mcp/__main__.py +5 -0
  7. gramps_mcp-0.1.0/gramps_mcp/agent_data/IDENTITY.md +15 -0
  8. gramps_mcp-0.1.0/gramps_mcp/agent_server.py +76 -0
  9. gramps_mcp-0.1.0/gramps_mcp/api/__init__.py +11 -0
  10. gramps_mcp-0.1.0/gramps_mcp/api/_operation_manifest.py +2004 -0
  11. gramps_mcp-0.1.0/gramps_mcp/api/api_client_base.py +331 -0
  12. gramps_mcp-0.1.0/gramps_mcp/api/api_client_bookmarks.py +55 -0
  13. gramps_mcp-0.1.0/gramps_mcp/api/api_client_chat.py +19 -0
  14. gramps_mcp-0.1.0/gramps_mcp/api/api_client_citations.py +43 -0
  15. gramps_mcp-0.1.0/gramps_mcp/api/api_client_config.py +55 -0
  16. gramps_mcp-0.1.0/gramps_mcp/api/api_client_dna.py +43 -0
  17. gramps_mcp-0.1.0/gramps_mcp/api/api_client_events.py +55 -0
  18. gramps_mcp-0.1.0/gramps_mcp/api/api_client_exporters.py +67 -0
  19. gramps_mcp-0.1.0/gramps_mcp/api/api_client_facts.py +19 -0
  20. gramps_mcp-0.1.0/gramps_mcp/api/api_client_families.py +55 -0
  21. gramps_mcp-0.1.0/gramps_mcp/api/api_client_filters.py +79 -0
  22. gramps_mcp-0.1.0/gramps_mcp/api/api_client_holidays.py +31 -0
  23. gramps_mcp-0.1.0/gramps_mcp/api/api_client_importers.py +43 -0
  24. gramps_mcp-0.1.0/gramps_mcp/api/api_client_living.py +31 -0
  25. gramps_mcp-0.1.0/gramps_mcp/api/api_client_media.py +139 -0
  26. gramps_mcp-0.1.0/gramps_mcp/api/api_client_metadata.py +43 -0
  27. gramps_mcp-0.1.0/gramps_mcp/api/api_client_name_formats.py +19 -0
  28. gramps_mcp-0.1.0/gramps_mcp/api/api_client_name_groups.py +79 -0
  29. gramps_mcp-0.1.0/gramps_mcp/api/api_client_notes.py +43 -0
  30. gramps_mcp-0.1.0/gramps_mcp/api/api_client_oidc.py +91 -0
  31. gramps_mcp-0.1.0/gramps_mcp/api/api_client_people.py +43 -0
  32. gramps_mcp-0.1.0/gramps_mcp/api/api_client_places.py +43 -0
  33. gramps_mcp-0.1.0/gramps_mcp/api/api_client_relations.py +31 -0
  34. gramps_mcp-0.1.0/gramps_mcp/api/api_client_reports.py +67 -0
  35. gramps_mcp-0.1.0/gramps_mcp/api/api_client_repositories.py +43 -0
  36. gramps_mcp-0.1.0/gramps_mcp/api/api_client_search.py +31 -0
  37. gramps_mcp-0.1.0/gramps_mcp/api/api_client_sources.py +43 -0
  38. gramps_mcp-0.1.0/gramps_mcp/api/api_client_tags.py +31 -0
  39. gramps_mcp-0.1.0/gramps_mcp/api/api_client_tasks.py +31 -0
  40. gramps_mcp-0.1.0/gramps_mcp/api/api_client_timeline.py +55 -0
  41. gramps_mcp-0.1.0/gramps_mcp/api/api_client_token.py +55 -0
  42. gramps_mcp-0.1.0/gramps_mcp/api/api_client_transactions.py +103 -0
  43. gramps_mcp-0.1.0/gramps_mcp/api/api_client_translations.py +43 -0
  44. gramps_mcp-0.1.0/gramps_mcp/api/api_client_trees.py +139 -0
  45. gramps_mcp-0.1.0/gramps_mcp/api/api_client_types.py +79 -0
  46. gramps_mcp-0.1.0/gramps_mcp/api/api_client_users.py +163 -0
  47. gramps_mcp-0.1.0/gramps_mcp/api_client.py +80 -0
  48. gramps_mcp-0.1.0/gramps_mcp/auth.py +90 -0
  49. gramps_mcp-0.1.0/gramps_mcp/gramps_input_models.py +25 -0
  50. gramps_mcp-0.1.0/gramps_mcp/gramps_models.py +46 -0
  51. gramps_mcp-0.1.0/gramps_mcp/gramps_response_models.py +20 -0
  52. gramps_mcp-0.1.0/gramps_mcp/main_agent.json +25 -0
  53. gramps_mcp-0.1.0/gramps_mcp/mcp/__init__.py +115 -0
  54. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_bookmarks.py +48 -0
  55. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_chat.py +40 -0
  56. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_citations.py +46 -0
  57. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_config.py +48 -0
  58. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_dna.py +46 -0
  59. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_events.py +48 -0
  60. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_exporters.py +50 -0
  61. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_facts.py +40 -0
  62. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_families.py +48 -0
  63. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_filters.py +52 -0
  64. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_holidays.py +44 -0
  65. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_importers.py +46 -0
  66. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_living.py +44 -0
  67. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_media.py +62 -0
  68. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_metadata.py +46 -0
  69. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_name_formats.py +42 -0
  70. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_name_groups.py +52 -0
  71. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_notes.py +46 -0
  72. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_oidc.py +54 -0
  73. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_people.py +46 -0
  74. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_places.py +46 -0
  75. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_relations.py +44 -0
  76. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_reports.py +50 -0
  77. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_repositories.py +46 -0
  78. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_search.py +44 -0
  79. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_sources.py +46 -0
  80. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_tags.py +44 -0
  81. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_tasks.py +44 -0
  82. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_timeline.py +48 -0
  83. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_token.py +48 -0
  84. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_transactions.py +56 -0
  85. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_translations.py +46 -0
  86. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_trees.py +62 -0
  87. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_types.py +52 -0
  88. gramps_mcp-0.1.0/gramps_mcp/mcp/mcp_users.py +66 -0
  89. gramps_mcp-0.1.0/gramps_mcp/mcp_config.json +3 -0
  90. gramps_mcp-0.1.0/gramps_mcp/mcp_server.py +82 -0
  91. gramps_mcp-0.1.0/gramps_mcp/prompts/__init__.py +0 -0
  92. gramps_mcp-0.1.0/gramps_mcp/prompts/main_agent.json +25 -0
  93. gramps_mcp-0.1.0/gramps_mcp/skills/__init__.py +0 -0
  94. gramps_mcp-0.1.0/gramps_mcp/skills/gramps-starter/SKILL.md +26 -0
  95. gramps_mcp-0.1.0/gramps_mcp/specs/gramps-web-api.json +3079 -0
  96. gramps_mcp-0.1.0/gramps_mcp.egg-info/PKG-INFO +271 -0
  97. gramps_mcp-0.1.0/gramps_mcp.egg-info/SOURCES.txt +115 -0
  98. gramps_mcp-0.1.0/gramps_mcp.egg-info/dependency_links.txt +1 -0
  99. gramps_mcp-0.1.0/gramps_mcp.egg-info/entry_points.txt +9 -0
  100. gramps_mcp-0.1.0/gramps_mcp.egg-info/requires.txt +17 -0
  101. gramps_mcp-0.1.0/gramps_mcp.egg-info/top_level.txt +6 -0
  102. gramps_mcp-0.1.0/pyproject.toml +68 -0
  103. gramps_mcp-0.1.0/requirements.txt +2 -0
  104. gramps_mcp-0.1.0/scripts/generate_from_openapi.py +426 -0
  105. gramps_mcp-0.1.0/scripts/security_sanitizer.py +246 -0
  106. gramps_mcp-0.1.0/scripts/validate_a2a_agent.py +139 -0
  107. gramps_mcp-0.1.0/scripts/validate_agent.py +15 -0
  108. gramps_mcp-0.1.0/scripts/verify_api_integration.py +280 -0
  109. gramps_mcp-0.1.0/setup.cfg +4 -0
  110. gramps_mcp-0.1.0/tests/__init__.py +0 -0
  111. gramps_mcp-0.1.0/tests/conftest.py +10 -0
  112. gramps_mcp-0.1.0/tests/test_api_wrapper.py +40 -0
  113. gramps_mcp-0.1.0/tests/test_auth.py +34 -0
  114. gramps_mcp-0.1.0/tests/test_concept_parity.py +23 -0
  115. gramps_mcp-0.1.0/tests/test_gramps_mcp_validation.py +14 -0
  116. gramps_mcp-0.1.0/tests/test_init_dynamics.py +10 -0
  117. gramps_mcp-0.1.0/tests/test_startup.py +9 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Audel Rouhi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ include LICENSE
2
+ include README.md
3
+ include requirements.txt
4
+ recursive-include gramps_mcp *.py *.json *.md *.yaml *.yml
@@ -0,0 +1,271 @@
1
+ Metadata-Version: 2.4
2
+ Name: gramps-mcp
3
+ Version: 0.1.0
4
+ Summary: Gramps API + MCP Server + A2A Agent — genealogy (people/families/events/places/sources/media)
5
+ Author-email: Audel Rouhi <knucklessg1@gmail.com>
6
+ License: MIT
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Environment :: Console
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Programming Language :: Python :: 3
12
+ Requires-Python: <3.15,>=3.11
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: agent-utilities>=0.51.0
16
+ Requires-Dist: python-dotenv>=1.0.0
17
+ Provides-Extra: mcp
18
+ Requires-Dist: agent-utilities[mcp]>=0.51.0; extra == "mcp"
19
+ Provides-Extra: agent
20
+ Requires-Dist: agent-utilities[agent,logfire]>=0.51.0; extra == "agent"
21
+ Provides-Extra: all
22
+ Requires-Dist: gramps-mcp[agent,logfire,mcp]>=0.1.0; extra == "all"
23
+ Provides-Extra: test
24
+ Requires-Dist: pytest-xdist>=3.6.0; extra == "test"
25
+ Requires-Dist: pytest; extra == "test"
26
+ Requires-Dist: pytest-asyncio; extra == "test"
27
+ Requires-Dist: pytest-cov; extra == "test"
28
+ Dynamic: license-file
29
+
30
+ # Gramps MCP
31
+ ## CLI or API | MCP | Agent
32
+
33
+ ![PyPI - Version](https://img.shields.io/pypi/v/gramps-mcp)
34
+ ![MCP Server](https://badge.mcpx.dev?type=server 'MCP Server')
35
+ ![PyPI - Downloads](https://img.shields.io/pypi/dd/gramps-mcp)
36
+ ![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/gramps-mcp)
37
+ ![PyPI - License](https://img.shields.io/pypi/l/gramps-mcp)
38
+ ![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/gramps-mcp)
39
+
40
+ *Version: 0.1.0*
41
+
42
+ > **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
43
+ > interfaces, the integrated A2A agent server, and guidance for provisioning the
44
+ > backing platform are maintained in the
45
+ > [official documentation](https://knuckles-team.github.io/gramps-mcp/).
46
+
47
+ ---
48
+
49
+ ## Table of Contents
50
+
51
+ - [Overview](#overview)
52
+ - [Key Features](#key-features)
53
+ - [Available MCP Tools](#available-mcp-tools)
54
+ - [Installation](#installation)
55
+ - [Usage](#usage)
56
+ - [MCP](#mcp)
57
+ - [Documentation](#documentation)
58
+
59
+ ---
60
+
61
+ ## Overview
62
+
63
+ **Gramps MCP MCP Server + A2A Agent**
64
+
65
+ Gramps API + MCP Server + A2A Agent — genealogy (people/families/events/places/sources/media)
66
+
67
+ This repository is actively maintained - Contributions are welcome!
68
+
69
+ ## Key Features
70
+
71
+ - **Action-routed MCP tools** — each domain is exposed as a single MCP tool that routes
72
+ to many underlying operations via an `action` argument, keeping the tool surface small.
73
+ - **Three interfaces, one package** — use it as a Python **API client**, an **MCP server**
74
+ (`stdio` / `streamable-http` / `sse`), or a Pydantic-AI **A2A agent**.
75
+ - **`agent-utilities` native** — built on the shared framework (auth, action router,
76
+ telemetry, governance) for fleet consistency.
77
+ - **Per-tool toggles** — enable or disable each tool domain with environment switches.
78
+ - **Enterprise-ready** — OTEL/Langfuse telemetry and optional Eunomia access governance.
79
+
80
+ ## Available MCP Tools
81
+
82
+ Each tool is **action-routed**: pass an `action` and a JSON `params_json` payload. Tool
83
+ domains can be toggled on or off with the listed environment variable. The table below is
84
+ **auto-generated from the live server** by the `mcp-readme-table` pre-commit hook
85
+ (`python -m agent_utilities.mcp.readme_tools`) — do not edit it by hand.
86
+
87
+ <!-- MCP-TOOLS-TABLE:START -->
88
+
89
+ | MCP Tool | Toggle Env Var | Description |
90
+ |----------|----------------|-------------|
91
+ | `gramps_bookmarks` | `BOOKMARKSTOOL` | Manage Gramps bookmarks operations. CONCEPT:GRMP-001. |
92
+ | `gramps_chat` | `CHATTOOL` | Manage Gramps chat operations. CONCEPT:GRMP-001. |
93
+ | `gramps_citations` | `CITATIONSTOOL` | Manage Gramps citations operations. CONCEPT:GRMP-001. |
94
+ | `gramps_config` | `CONFIGTOOL` | Manage Gramps config operations. CONCEPT:GRMP-001. |
95
+ | `gramps_dna` | `DNATOOL` | Manage Gramps dna operations. CONCEPT:GRMP-001. |
96
+ | `gramps_events` | `EVENTSTOOL` | Manage Gramps events operations. CONCEPT:GRMP-001. |
97
+ | `gramps_exporters` | `EXPORTERSTOOL` | Manage Gramps exporters operations. CONCEPT:GRMP-001. |
98
+ | `gramps_facts` | `FACTSTOOL` | Manage Gramps facts operations. CONCEPT:GRMP-001. |
99
+ | `gramps_families` | `FAMILIESTOOL` | Manage Gramps families operations. CONCEPT:GRMP-001. |
100
+ | `gramps_filters` | `FILTERSTOOL` | Manage Gramps filters operations. CONCEPT:GRMP-001. |
101
+ | `gramps_holidays` | `HOLIDAYSTOOL` | Manage Gramps holidays operations. CONCEPT:GRMP-001. |
102
+ | `gramps_importers` | `IMPORTERSTOOL` | Manage Gramps importers operations. CONCEPT:GRMP-001. |
103
+ | `gramps_living` | `LIVINGTOOL` | Manage Gramps living operations. CONCEPT:GRMP-001. |
104
+ | `gramps_media` | `MEDIATOOL` | Manage Gramps media operations. CONCEPT:GRMP-001. |
105
+ | `gramps_metadata` | `METADATATOOL` | Manage Gramps metadata operations. CONCEPT:GRMP-001. |
106
+ | `gramps_name_formats` | `NAME_FORMATSTOOL` | Manage Gramps name formats operations. CONCEPT:GRMP-001. |
107
+ | `gramps_name_groups` | `NAME_GROUPSTOOL` | Manage Gramps name groups operations. CONCEPT:GRMP-001. |
108
+ | `gramps_notes` | `NOTESTOOL` | Manage Gramps notes operations. CONCEPT:GRMP-001. |
109
+ | `gramps_oidc` | `OIDCTOOL` | Manage Gramps oidc operations. CONCEPT:GRMP-001. |
110
+ | `gramps_people` | `PEOPLETOOL` | Manage Gramps people operations. CONCEPT:GRMP-001. |
111
+ | `gramps_places` | `PLACESTOOL` | Manage Gramps places operations. CONCEPT:GRMP-001. |
112
+ | `gramps_relations` | `RELATIONSTOOL` | Manage Gramps relations operations. CONCEPT:GRMP-001. |
113
+ | `gramps_reports` | `REPORTSTOOL` | Manage Gramps reports operations. CONCEPT:GRMP-001. |
114
+ | `gramps_repositories` | `REPOSITORIESTOOL` | Manage Gramps repositories operations. CONCEPT:GRMP-001. |
115
+ | `gramps_search` | `SEARCHTOOL` | Manage Gramps search operations. CONCEPT:GRMP-001. |
116
+ | `gramps_sources` | `SOURCESTOOL` | Manage Gramps sources operations. CONCEPT:GRMP-001. |
117
+ | `gramps_tags` | `TAGSTOOL` | Manage Gramps tags operations. CONCEPT:GRMP-001. |
118
+ | `gramps_tasks` | `TASKSTOOL` | Manage Gramps tasks operations. CONCEPT:GRMP-001. |
119
+ | `gramps_timeline` | `TIMELINETOOL` | Manage Gramps timeline operations. CONCEPT:GRMP-001. |
120
+ | `gramps_token` | `TOKENTOOL` | Manage Gramps token operations. CONCEPT:GRMP-001. |
121
+ | `gramps_transactions` | `TRANSACTIONSTOOL` | Manage Gramps transactions operations. CONCEPT:GRMP-001. |
122
+ | `gramps_translations` | `TRANSLATIONSTOOL` | Manage Gramps translations operations. CONCEPT:GRMP-001. |
123
+ | `gramps_trees` | `TREESTOOL` | Manage Gramps trees operations. CONCEPT:GRMP-001. |
124
+ | `gramps_types` | `TYPESTOOL` | Manage Gramps types operations. CONCEPT:GRMP-001. |
125
+ | `gramps_users` | `USERSTOOL` | Manage Gramps users operations. CONCEPT:GRMP-001. |
126
+
127
+ _35 action-routed tools (default `MCP_TOOL_MODE=condensed`). Each is enabled unless its toggle is set false; set `MCP_TOOL_MODE=verbose` (or `both`) for the 1:1 per-operation surface. Auto-generated — do not edit._
128
+ <!-- MCP-TOOLS-TABLE:END -->
129
+
130
+ ## Installation
131
+
132
+ ### Install with `uvx` (no install — run on demand)
133
+
134
+ ```bash
135
+ uvx --from gramps-mcp gramps-mcp # MCP server
136
+ uvx --from gramps-mcp gramps-agent # A2A agent server
137
+ ```
138
+
139
+ ### Install with `pip`
140
+
141
+ ```bash
142
+ python -m pip install gramps-mcp # core (API client)
143
+ python -m pip install "gramps-mcp[all]" # + MCP server + A2A agent + telemetry
144
+ ```
145
+
146
+ ### Console scripts
147
+
148
+ After installation the following entry points are available on your `PATH`:
149
+
150
+ | Command | Description |
151
+ |---------|-------------|
152
+ | `gramps-mcp` | Launch the MCP server |
153
+ | `gramps-agent` | Launch the A2A agent server |
154
+
155
+ ## Usage
156
+
157
+ ### As a Python API client
158
+
159
+ ```python
160
+ from gramps_mcp.auth import get_client
161
+
162
+ client = get_client()
163
+ status = client.get_system_status()
164
+ print(status)
165
+ ```
166
+
167
+ ### As an MCP server (CLI)
168
+
169
+ ```bash
170
+ # Local stdio (for IDEs)
171
+ gramps-mcp
172
+
173
+ # Networked streamable-http
174
+ gramps-mcp --transport streamable-http --host 0.0.0.0 --port 8000
175
+ ```
176
+
177
+ ### Calling an MCP tool
178
+
179
+ Tools are action-routed — pass an `action` plus a JSON `params_json` string:
180
+
181
+ ```json
182
+ {
183
+ "tool": "system_operations",
184
+ "arguments": {
185
+ "action": "status",
186
+ "params_json": "{}"
187
+ }
188
+ }
189
+ ```
190
+
191
+ ## MCP
192
+
193
+ ### Using as an MCP Server
194
+
195
+ The MCP Server can be run in `stdio` (local), `streamable-http` (networked), or
196
+ `sse` mode.
197
+
198
+ #### Environment Variables
199
+
200
+ * `GRAMPS_URL`: The URL of the target service.
201
+ * `GRAMPS_TOKEN`: The API token or access token.
202
+
203
+ #### stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)
204
+
205
+ ```json
206
+ {
207
+ "mcpServers": {
208
+ "gramps-mcp": {
209
+ "command": "uvx",
210
+ "args": ["--from", "gramps-mcp", "gramps-mcp"],
211
+ "env": {
212
+ "GRAMPS_URL": "https://service.example.com",
213
+ "GRAMPS_TOKEN": "your_token"
214
+ }
215
+ }
216
+ }
217
+ }
218
+ ```
219
+
220
+ #### Streamable-HTTP Transport (networked / production)
221
+
222
+ ```json
223
+ {
224
+ "mcpServers": {
225
+ "gramps-mcp": {
226
+ "command": "uvx",
227
+ "args": ["--from", "gramps-mcp", "gramps-mcp", "--transport", "streamable-http", "--port", "8000"],
228
+ "env": {
229
+ "TRANSPORT": "streamable-http",
230
+ "HOST": "0.0.0.0",
231
+ "PORT": "8000",
232
+ "GRAMPS_URL": "https://service.example.com",
233
+ "GRAMPS_TOKEN": "your_token"
234
+ }
235
+ }
236
+ }
237
+ }
238
+ ```
239
+
240
+ <!-- BEGIN GENERATED: additional-deployment-options -->
241
+ ### Additional Deployment Options
242
+
243
+ `gramps-mcp` can also run as a **local container** (Docker / Podman / `uv`) or be
244
+ consumed from a **remote deployment**. The
245
+ [Deployment guide](https://knuckles-team.github.io/gramps-mcp/deployment/) has full,
246
+ copy-paste `mcp_config.json` for all four transports — **stdio**, **streamable-http**,
247
+ **local container / uv**, and **remote URL**:
248
+
249
+ - **Local container / uv** — launch the server from `mcp_config.json` via `uvx`,
250
+ `docker run`, or `podman run`, or point at a local streamable-http container by `url`.
251
+ - **Remote URL** — connect to a server deployed behind Caddy at
252
+ `http://gramps-mcp.arpa/mcp` using the `"url"` key.
253
+ <!-- END GENERATED: additional-deployment-options -->
254
+
255
+ ## Install Python Package
256
+
257
+ ```bash
258
+ python -m pip install gramps-mcp
259
+ ```
260
+
261
+ ## Documentation
262
+
263
+ Full documentation is published to the GitHub Pages site and mirrored under `docs/`:
264
+
265
+ - [Documentation site](https://knuckles-team.github.io/gramps-mcp/)
266
+ - [Overview](docs/overview.md)
267
+ - [Installation](docs/installation.md)
268
+ - [Usage](docs/usage.md)
269
+ - [Deployment](docs/deployment.md)
270
+ - [Platform](docs/platform.md)
271
+ - [Concept Registry](docs/concepts.md)
@@ -0,0 +1,242 @@
1
+ # Gramps MCP
2
+ ## CLI or API | MCP | Agent
3
+
4
+ ![PyPI - Version](https://img.shields.io/pypi/v/gramps-mcp)
5
+ ![MCP Server](https://badge.mcpx.dev?type=server 'MCP Server')
6
+ ![PyPI - Downloads](https://img.shields.io/pypi/dd/gramps-mcp)
7
+ ![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/gramps-mcp)
8
+ ![PyPI - License](https://img.shields.io/pypi/l/gramps-mcp)
9
+ ![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/gramps-mcp)
10
+
11
+ *Version: 0.1.0*
12
+
13
+ > **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
14
+ > interfaces, the integrated A2A agent server, and guidance for provisioning the
15
+ > backing platform are maintained in the
16
+ > [official documentation](https://knuckles-team.github.io/gramps-mcp/).
17
+
18
+ ---
19
+
20
+ ## Table of Contents
21
+
22
+ - [Overview](#overview)
23
+ - [Key Features](#key-features)
24
+ - [Available MCP Tools](#available-mcp-tools)
25
+ - [Installation](#installation)
26
+ - [Usage](#usage)
27
+ - [MCP](#mcp)
28
+ - [Documentation](#documentation)
29
+
30
+ ---
31
+
32
+ ## Overview
33
+
34
+ **Gramps MCP MCP Server + A2A Agent**
35
+
36
+ Gramps API + MCP Server + A2A Agent — genealogy (people/families/events/places/sources/media)
37
+
38
+ This repository is actively maintained - Contributions are welcome!
39
+
40
+ ## Key Features
41
+
42
+ - **Action-routed MCP tools** — each domain is exposed as a single MCP tool that routes
43
+ to many underlying operations via an `action` argument, keeping the tool surface small.
44
+ - **Three interfaces, one package** — use it as a Python **API client**, an **MCP server**
45
+ (`stdio` / `streamable-http` / `sse`), or a Pydantic-AI **A2A agent**.
46
+ - **`agent-utilities` native** — built on the shared framework (auth, action router,
47
+ telemetry, governance) for fleet consistency.
48
+ - **Per-tool toggles** — enable or disable each tool domain with environment switches.
49
+ - **Enterprise-ready** — OTEL/Langfuse telemetry and optional Eunomia access governance.
50
+
51
+ ## Available MCP Tools
52
+
53
+ Each tool is **action-routed**: pass an `action` and a JSON `params_json` payload. Tool
54
+ domains can be toggled on or off with the listed environment variable. The table below is
55
+ **auto-generated from the live server** by the `mcp-readme-table` pre-commit hook
56
+ (`python -m agent_utilities.mcp.readme_tools`) — do not edit it by hand.
57
+
58
+ <!-- MCP-TOOLS-TABLE:START -->
59
+
60
+ | MCP Tool | Toggle Env Var | Description |
61
+ |----------|----------------|-------------|
62
+ | `gramps_bookmarks` | `BOOKMARKSTOOL` | Manage Gramps bookmarks operations. CONCEPT:GRMP-001. |
63
+ | `gramps_chat` | `CHATTOOL` | Manage Gramps chat operations. CONCEPT:GRMP-001. |
64
+ | `gramps_citations` | `CITATIONSTOOL` | Manage Gramps citations operations. CONCEPT:GRMP-001. |
65
+ | `gramps_config` | `CONFIGTOOL` | Manage Gramps config operations. CONCEPT:GRMP-001. |
66
+ | `gramps_dna` | `DNATOOL` | Manage Gramps dna operations. CONCEPT:GRMP-001. |
67
+ | `gramps_events` | `EVENTSTOOL` | Manage Gramps events operations. CONCEPT:GRMP-001. |
68
+ | `gramps_exporters` | `EXPORTERSTOOL` | Manage Gramps exporters operations. CONCEPT:GRMP-001. |
69
+ | `gramps_facts` | `FACTSTOOL` | Manage Gramps facts operations. CONCEPT:GRMP-001. |
70
+ | `gramps_families` | `FAMILIESTOOL` | Manage Gramps families operations. CONCEPT:GRMP-001. |
71
+ | `gramps_filters` | `FILTERSTOOL` | Manage Gramps filters operations. CONCEPT:GRMP-001. |
72
+ | `gramps_holidays` | `HOLIDAYSTOOL` | Manage Gramps holidays operations. CONCEPT:GRMP-001. |
73
+ | `gramps_importers` | `IMPORTERSTOOL` | Manage Gramps importers operations. CONCEPT:GRMP-001. |
74
+ | `gramps_living` | `LIVINGTOOL` | Manage Gramps living operations. CONCEPT:GRMP-001. |
75
+ | `gramps_media` | `MEDIATOOL` | Manage Gramps media operations. CONCEPT:GRMP-001. |
76
+ | `gramps_metadata` | `METADATATOOL` | Manage Gramps metadata operations. CONCEPT:GRMP-001. |
77
+ | `gramps_name_formats` | `NAME_FORMATSTOOL` | Manage Gramps name formats operations. CONCEPT:GRMP-001. |
78
+ | `gramps_name_groups` | `NAME_GROUPSTOOL` | Manage Gramps name groups operations. CONCEPT:GRMP-001. |
79
+ | `gramps_notes` | `NOTESTOOL` | Manage Gramps notes operations. CONCEPT:GRMP-001. |
80
+ | `gramps_oidc` | `OIDCTOOL` | Manage Gramps oidc operations. CONCEPT:GRMP-001. |
81
+ | `gramps_people` | `PEOPLETOOL` | Manage Gramps people operations. CONCEPT:GRMP-001. |
82
+ | `gramps_places` | `PLACESTOOL` | Manage Gramps places operations. CONCEPT:GRMP-001. |
83
+ | `gramps_relations` | `RELATIONSTOOL` | Manage Gramps relations operations. CONCEPT:GRMP-001. |
84
+ | `gramps_reports` | `REPORTSTOOL` | Manage Gramps reports operations. CONCEPT:GRMP-001. |
85
+ | `gramps_repositories` | `REPOSITORIESTOOL` | Manage Gramps repositories operations. CONCEPT:GRMP-001. |
86
+ | `gramps_search` | `SEARCHTOOL` | Manage Gramps search operations. CONCEPT:GRMP-001. |
87
+ | `gramps_sources` | `SOURCESTOOL` | Manage Gramps sources operations. CONCEPT:GRMP-001. |
88
+ | `gramps_tags` | `TAGSTOOL` | Manage Gramps tags operations. CONCEPT:GRMP-001. |
89
+ | `gramps_tasks` | `TASKSTOOL` | Manage Gramps tasks operations. CONCEPT:GRMP-001. |
90
+ | `gramps_timeline` | `TIMELINETOOL` | Manage Gramps timeline operations. CONCEPT:GRMP-001. |
91
+ | `gramps_token` | `TOKENTOOL` | Manage Gramps token operations. CONCEPT:GRMP-001. |
92
+ | `gramps_transactions` | `TRANSACTIONSTOOL` | Manage Gramps transactions operations. CONCEPT:GRMP-001. |
93
+ | `gramps_translations` | `TRANSLATIONSTOOL` | Manage Gramps translations operations. CONCEPT:GRMP-001. |
94
+ | `gramps_trees` | `TREESTOOL` | Manage Gramps trees operations. CONCEPT:GRMP-001. |
95
+ | `gramps_types` | `TYPESTOOL` | Manage Gramps types operations. CONCEPT:GRMP-001. |
96
+ | `gramps_users` | `USERSTOOL` | Manage Gramps users operations. CONCEPT:GRMP-001. |
97
+
98
+ _35 action-routed tools (default `MCP_TOOL_MODE=condensed`). Each is enabled unless its toggle is set false; set `MCP_TOOL_MODE=verbose` (or `both`) for the 1:1 per-operation surface. Auto-generated — do not edit._
99
+ <!-- MCP-TOOLS-TABLE:END -->
100
+
101
+ ## Installation
102
+
103
+ ### Install with `uvx` (no install — run on demand)
104
+
105
+ ```bash
106
+ uvx --from gramps-mcp gramps-mcp # MCP server
107
+ uvx --from gramps-mcp gramps-agent # A2A agent server
108
+ ```
109
+
110
+ ### Install with `pip`
111
+
112
+ ```bash
113
+ python -m pip install gramps-mcp # core (API client)
114
+ python -m pip install "gramps-mcp[all]" # + MCP server + A2A agent + telemetry
115
+ ```
116
+
117
+ ### Console scripts
118
+
119
+ After installation the following entry points are available on your `PATH`:
120
+
121
+ | Command | Description |
122
+ |---------|-------------|
123
+ | `gramps-mcp` | Launch the MCP server |
124
+ | `gramps-agent` | Launch the A2A agent server |
125
+
126
+ ## Usage
127
+
128
+ ### As a Python API client
129
+
130
+ ```python
131
+ from gramps_mcp.auth import get_client
132
+
133
+ client = get_client()
134
+ status = client.get_system_status()
135
+ print(status)
136
+ ```
137
+
138
+ ### As an MCP server (CLI)
139
+
140
+ ```bash
141
+ # Local stdio (for IDEs)
142
+ gramps-mcp
143
+
144
+ # Networked streamable-http
145
+ gramps-mcp --transport streamable-http --host 0.0.0.0 --port 8000
146
+ ```
147
+
148
+ ### Calling an MCP tool
149
+
150
+ Tools are action-routed — pass an `action` plus a JSON `params_json` string:
151
+
152
+ ```json
153
+ {
154
+ "tool": "system_operations",
155
+ "arguments": {
156
+ "action": "status",
157
+ "params_json": "{}"
158
+ }
159
+ }
160
+ ```
161
+
162
+ ## MCP
163
+
164
+ ### Using as an MCP Server
165
+
166
+ The MCP Server can be run in `stdio` (local), `streamable-http` (networked), or
167
+ `sse` mode.
168
+
169
+ #### Environment Variables
170
+
171
+ * `GRAMPS_URL`: The URL of the target service.
172
+ * `GRAMPS_TOKEN`: The API token or access token.
173
+
174
+ #### stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)
175
+
176
+ ```json
177
+ {
178
+ "mcpServers": {
179
+ "gramps-mcp": {
180
+ "command": "uvx",
181
+ "args": ["--from", "gramps-mcp", "gramps-mcp"],
182
+ "env": {
183
+ "GRAMPS_URL": "https://service.example.com",
184
+ "GRAMPS_TOKEN": "your_token"
185
+ }
186
+ }
187
+ }
188
+ }
189
+ ```
190
+
191
+ #### Streamable-HTTP Transport (networked / production)
192
+
193
+ ```json
194
+ {
195
+ "mcpServers": {
196
+ "gramps-mcp": {
197
+ "command": "uvx",
198
+ "args": ["--from", "gramps-mcp", "gramps-mcp", "--transport", "streamable-http", "--port", "8000"],
199
+ "env": {
200
+ "TRANSPORT": "streamable-http",
201
+ "HOST": "0.0.0.0",
202
+ "PORT": "8000",
203
+ "GRAMPS_URL": "https://service.example.com",
204
+ "GRAMPS_TOKEN": "your_token"
205
+ }
206
+ }
207
+ }
208
+ }
209
+ ```
210
+
211
+ <!-- BEGIN GENERATED: additional-deployment-options -->
212
+ ### Additional Deployment Options
213
+
214
+ `gramps-mcp` can also run as a **local container** (Docker / Podman / `uv`) or be
215
+ consumed from a **remote deployment**. The
216
+ [Deployment guide](https://knuckles-team.github.io/gramps-mcp/deployment/) has full,
217
+ copy-paste `mcp_config.json` for all four transports — **stdio**, **streamable-http**,
218
+ **local container / uv**, and **remote URL**:
219
+
220
+ - **Local container / uv** — launch the server from `mcp_config.json` via `uvx`,
221
+ `docker run`, or `podman run`, or point at a local streamable-http container by `url`.
222
+ - **Remote URL** — connect to a server deployed behind Caddy at
223
+ `http://gramps-mcp.arpa/mcp` using the `"url"` key.
224
+ <!-- END GENERATED: additional-deployment-options -->
225
+
226
+ ## Install Python Package
227
+
228
+ ```bash
229
+ python -m pip install gramps-mcp
230
+ ```
231
+
232
+ ## Documentation
233
+
234
+ Full documentation is published to the GitHub Pages site and mirrored under `docs/`:
235
+
236
+ - [Documentation site](https://knuckles-team.github.io/gramps-mcp/)
237
+ - [Overview](docs/overview.md)
238
+ - [Installation](docs/installation.md)
239
+ - [Usage](docs/usage.md)
240
+ - [Deployment](docs/deployment.md)
241
+ - [Platform](docs/platform.md)
242
+ - [Concept Registry](docs/concepts.md)
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env python
2
+
3
+ import importlib
4
+ import inspect
5
+ import warnings
6
+
7
+ warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
8
+
9
+ __all__: list[str] = []
10
+
11
+ CORE_MODULES = [
12
+ "gramps_mcp.api",
13
+ ]
14
+
15
+ OPTIONAL_MODULES = {
16
+ "gramps_mcp.agent_server": "agent",
17
+ "gramps_mcp.mcp_server": "mcp",
18
+ }
19
+
20
+
21
+ def _import_module_safely(module_name: str):
22
+ """Try to import a module and return it, or None if not available."""
23
+ try:
24
+ return importlib.import_module(module_name)
25
+ except ImportError:
26
+ return None
27
+
28
+
29
+ def _expose_members(module):
30
+ """Expose public classes and functions from a module into globals and __all__."""
31
+ for name, obj in inspect.getmembers(module):
32
+ if (inspect.isclass(obj) or inspect.isfunction(obj)) and not name.startswith(
33
+ "_"
34
+ ):
35
+ globals()[name] = obj
36
+ __all__.append(name)
37
+
38
+
39
+ for module_name in CORE_MODULES:
40
+ try:
41
+ module = importlib.import_module(module_name)
42
+ _expose_members(module)
43
+ except ImportError:
44
+ pass
45
+
46
+ for module_name, extra_name in OPTIONAL_MODULES.items():
47
+ module = _import_module_safely(module_name)
48
+ if module is not None:
49
+ _expose_members(module)
50
+ globals()[f"_{extra_name.upper()}_AVAILABLE"] = True
51
+ else:
52
+ globals()[f"_{extra_name.upper()}_AVAILABLE"] = False
53
+
54
+ __all__.extend(["_MCP_AVAILABLE", "_AGENT_AVAILABLE"])
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/python
2
+ from gramps_mcp.agent_server import agent_server
3
+
4
+ if __name__ == "__main__":
5
+ agent_server()
@@ -0,0 +1,15 @@
1
+ # IDENTITY.md - Gramps MCP Agent Identity
2
+
3
+ ## [default]
4
+ * **Name:** Gramps MCP Agent
5
+ * **Role:** Gramps API + MCP Server + A2A Agent — genealogy (people/families/events/places/sources/media)
6
+ * **Emoji:** 🤖
7
+
8
+ ### System Prompt
9
+ You are the Gramps MCP Agent.
10
+ Use the `mcp-client` universal skill and check the reference documentation for
11
+ `gramps-mcp.md` to discover the exact tags and tools available for your capabilities.
12
+
13
+ ### Capabilities
14
+ - **MCP Operations**: Leverage the `mcp-client` skill to interact with the target MCP server.
15
+ - **Custom Agent**: Handle custom tasks or general tasks.
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/python
2
+ import logging
3
+ import os
4
+ import sys
5
+ import warnings
6
+
7
+ __version__ = "0.1.0"
8
+
9
+ logging.basicConfig(
10
+ level=logging.INFO,
11
+ format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
12
+ handlers=[logging.StreamHandler()],
13
+ )
14
+ logger = logging.getLogger(__name__)
15
+
16
+
17
+ def agent_server():
18
+ from agent_utilities import (
19
+ build_system_prompt_from_workspace,
20
+ create_agent_parser,
21
+ create_agent_server,
22
+ initialize_workspace,
23
+ load_identity,
24
+ )
25
+
26
+ warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
27
+ warnings.filterwarnings("ignore", category=DeprecationWarning, module="fastmcp")
28
+
29
+ initialize_workspace()
30
+ meta = load_identity()
31
+ agent_name = os.getenv("DEFAULT_AGENT_NAME", meta.get("name", "Gramps MCP"))
32
+
33
+ print(f"{agent_name} v{__version__}", file=sys.stderr)
34
+ parser = create_agent_parser()
35
+ args = parser.parse_args()
36
+
37
+ if args.debug:
38
+ logging.getLogger().setLevel(logging.DEBUG)
39
+ logger.debug("Debug mode enabled")
40
+
41
+ create_agent_server(
42
+ mcp_url=args.mcp_url,
43
+ mcp_config=args.mcp_config or "mcp_config.json",
44
+ host=args.host,
45
+ port=args.port,
46
+ provider=args.provider,
47
+ model_id=args.model_id,
48
+ router_model=args.model_id,
49
+ agent_model=args.model_id,
50
+ base_url=args.base_url,
51
+ api_key=args.api_key,
52
+ agent_description=os.getenv(
53
+ "AGENT_DESCRIPTION",
54
+ meta.get(
55
+ "description",
56
+ "Gramps API + MCP Server + A2A Agent — genealogy (people/families/events/places/sources/media)",
57
+ ),
58
+ ),
59
+ system_prompt=os.getenv(
60
+ "AGENT_SYSTEM_PROMPT",
61
+ meta.get("content") or build_system_prompt_from_workspace(),
62
+ ),
63
+ custom_skills_directory=args.custom_skills_directory,
64
+ enable_web_ui=args.web,
65
+ enable_otel=args.otel,
66
+ otel_endpoint=args.otel_endpoint,
67
+ otel_headers=args.otel_headers,
68
+ otel_public_key=args.otel_public_key,
69
+ otel_secret_key=args.otel_secret_key,
70
+ otel_protocol=args.otel_protocol,
71
+ debug=args.debug,
72
+ )
73
+
74
+
75
+ if __name__ == "__main__":
76
+ agent_server()