rnacentral-mcp-server 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 (34) hide show
  1. rnacentral_mcp_server-0.1.0/.gemini/settings.json +10 -0
  2. rnacentral_mcp_server-0.1.0/.github/workflows/docs.yml +51 -0
  3. rnacentral_mcp_server-0.1.0/.gitignore +14 -0
  4. rnacentral_mcp_server-0.1.0/.python-version +1 -0
  5. rnacentral_mcp_server-0.1.0/.readthedocs.yaml +15 -0
  6. rnacentral_mcp_server-0.1.0/LICENSE +21 -0
  7. rnacentral_mcp_server-0.1.0/PKG-INFO +206 -0
  8. rnacentral_mcp_server-0.1.0/diagnose_bug.py +24 -0
  9. rnacentral_mcp_server-0.1.0/docs/Makefile +19 -0
  10. rnacentral_mcp_server-0.1.0/docs/conf.py +29 -0
  11. rnacentral_mcp_server-0.1.0/docs/examples.md +13 -0
  12. rnacentral_mcp_server-0.1.0/docs/index.md +30 -0
  13. rnacentral_mcp_server-0.1.0/docs/installation.md +92 -0
  14. rnacentral_mcp_server-0.1.0/docs/tools/export_sequences.md +32 -0
  15. rnacentral_mcp_server-0.1.0/docs/tools/get_overlapping_ncrnas.md +29 -0
  16. rnacentral_mcp_server-0.1.0/docs/tools/get_rna_description.md +23 -0
  17. rnacentral_mcp_server-0.1.0/docs/tools/get_secondary_structure_svg.md +24 -0
  18. rnacentral_mcp_server-0.1.0/docs/tools/index.md +28 -0
  19. rnacentral_mcp_server-0.1.0/docs/tools/map_rna_id.md +23 -0
  20. rnacentral_mcp_server-0.1.0/docs/tools/query_rnacentral.md +30 -0
  21. rnacentral_mcp_server-0.1.0/docs/tools/search_sequence.md +28 -0
  22. rnacentral_mcp_server-0.1.0/logs +22161 -0
  23. rnacentral_mcp_server-0.1.0/pyproject.toml +41 -0
  24. rnacentral_mcp_server-0.1.0/readme.md +162 -0
  25. rnacentral_mcp_server-0.1.0/rnacentral_sequence_search/__init__.py +0 -0
  26. rnacentral_mcp_server-0.1.0/rnacentral_sequence_search/literature.py +18 -0
  27. rnacentral_mcp_server-0.1.0/rnacentral_sequence_search/mapping.py +117 -0
  28. rnacentral_mcp_server-0.1.0/rnacentral_sequence_search/overlap.py +113 -0
  29. rnacentral_mcp_server-0.1.0/rnacentral_sequence_search/search.py +214 -0
  30. rnacentral_mcp_server-0.1.0/rnacentral_sequence_search/server.py +174 -0
  31. rnacentral_mcp_server-0.1.0/rnacentral_sequence_search/structure.py +55 -0
  32. rnacentral_mcp_server-0.1.0/rnacentral_sequence_search/utils.py +198 -0
  33. rnacentral_mcp_server-0.1.0/test_int_iterable.py +5 -0
  34. rnacentral_mcp_server-0.1.0/uv.lock +1669 -0
@@ -0,0 +1,10 @@
1
+ {
2
+ "mcpServers": {
3
+ "rnacentral-search": {
4
+ "command": "/Users/agreen/code/rnacentral-mcp-server/.venv/bin/python",
5
+ "args": [
6
+ "/Users/agreen/code/rnacentral-mcp-server/rnacentral_sequence_search/server.py"
7
+ ]
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,51 @@
1
+ name: Build and deploy docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: pages
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v5
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Sync docs dependencies
29
+ run: uv sync --extra docs
30
+
31
+ - name: Build HTML
32
+ run: uv run sphinx-build -b html docs docs/_build/html
33
+
34
+ - name: Disable Jekyll
35
+ run: touch docs/_build/html/.nojekyll
36
+
37
+ - name: Upload Pages artifact
38
+ uses: actions/upload-pages-artifact@v3
39
+ with:
40
+ path: docs/_build/html
41
+
42
+ deploy:
43
+ needs: build
44
+ runs-on: ubuntu-latest
45
+ environment:
46
+ name: github-pages
47
+ url: ${{ steps.deployment.outputs.page_url }}
48
+ steps:
49
+ - name: Deploy to GitHub Pages
50
+ id: deployment
51
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,14 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+
13
+ ## Generated documentation stuff
14
+ docs/_build
@@ -0,0 +1 @@
1
+ 3.10
@@ -0,0 +1,15 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-24.04
5
+ tools:
6
+ python: "3.12"
7
+ commands:
8
+ - asdf plugin add uv
9
+ - asdf install uv latest
10
+ - asdf global uv latest
11
+ - uv sync --extra docs
12
+ - uv run sphinx-build -b html docs $READTHEDOCS_OUTPUT/html
13
+
14
+ sphinx:
15
+ configuration: docs/conf.py
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 RNAcentral
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,206 @@
1
+ Metadata-Version: 2.4
2
+ Name: rnacentral-mcp-server
3
+ Version: 0.1.0
4
+ Summary: An MCP server for RNAcentral, providing RNA sequence search, ID mapping, genomic context, and 2D structures.
5
+ Project-URL: Homepage, https://github.com/RNAcentral/rnacentral-mcp-server
6
+ Author-email: Andrew Green <agreen@ebi.ac.uk>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2026 RNAcentral
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+ License-File: LICENSE
29
+ Keywords: bioinformatics,mcp,model-context-protocol,rna,rnacentral
30
+ Classifier: License :: OSI Approved :: MIT License
31
+ Classifier: Programming Language :: Python :: 3
32
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
33
+ Requires-Python: >=3.10
34
+ Requires-Dist: aiohttp>=3.11.18
35
+ Requires-Dist: click>=8.1.8
36
+ Requires-Dist: mcp[cli]>=1.8.0
37
+ Provides-Extra: docs
38
+ Requires-Dist: linkify-it-py>=2.0; extra == 'docs'
39
+ Requires-Dist: myst-parser>=2.0; extra == 'docs'
40
+ Requires-Dist: sphinx-copybutton>=0.5; extra == 'docs'
41
+ Requires-Dist: sphinx-rtd-theme>=2.0; extra == 'docs'
42
+ Requires-Dist: sphinx>=7.0; extra == 'docs'
43
+ Description-Content-Type: text/markdown
44
+
45
+ # RNAcentral MCP Server
46
+
47
+ [![Documentation](https://img.shields.io/badge/docs-github%20pages-blue)](https://rnacentral.github.io/rnacentral-mcp-server/)
48
+
49
+ This is an MCP server that provides a comprehensive interface to the RNAcentral database, allowing for complex searches, sequence mapping, genomic analysis, and metadata retrieval for non-coding RNA sequences.
50
+
51
+ 📖 **Full documentation:** <https://rnacentral.github.io/rnacentral-mcp-server/> — installation guides for Claude Desktop / Claude Code / other MCP clients, per-tool reference, and examples.
52
+
53
+ ## Features
54
+
55
+ - **Comprehensive Search**: Query RNAcentral using natural language or filters (RNA type, taxon, expert database). Combines EBI Search and RNAcentral API data for enriched metadata (Rfam hits, GO annotations).
56
+ - **Sequence Search**: Search for RNA sequences across multiple databases to find identical or similar entries.
57
+ - **Bidirectional ID Mapping**: Map between RNAcentral URS IDs and external database identifiers (miRBase, Ensembl, HGNC, etc.) with automatic taxonomy resolution.
58
+ - **Bulk Sequence Export**: Export search results in FASTA or Parquet formats, ideal for downstream analysis or machine learning datasets.
59
+ - **Genomic Overlap (Ensembl)**: Find non-coding RNAs overlapping specific genomic coordinates or gene symbols using Ensembl's GraphQL integration.
60
+ - **2D Structure Diagrams**: Retrieve secondary structure (2D) diagrams in SVG format for RNAs with known or predicted folds.
61
+ - **Literature Summaries**: Access AI-generated literature summaries for RNA sequences to understand their biological context.
62
+
63
+ ## Prerequisites
64
+
65
+ - Python 3.10 or higher
66
+ - [uv](https://docs.astral.sh/uv/) (recommended) or pip
67
+
68
+ ## Installation
69
+
70
+ 1. Set up a Python environment:
71
+
72
+ ```bash
73
+ # Using uv (recommended)
74
+ uv venv
75
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
76
+
77
+ # Add dependencies
78
+ uv add "mcp[cli]" aiohttp
79
+ ```
80
+
81
+ 2. Install the package in editable mode:
82
+
83
+ ```bash
84
+ uv pip install -e .
85
+ ```
86
+
87
+ ## Running the Server
88
+
89
+ ### Development Mode (with MCP Inspector)
90
+
91
+ ```bash
92
+ mcp dev rnacentral_sequence_search/server.py
93
+ ```
94
+
95
+ This will start the server and open the MCP Inspector, allowing you to test the server interactively.
96
+
97
+ ### Using with Claude Desktop
98
+
99
+ To install the server in Claude Desktop, add this to your `claude_desktop_config.json`. You can optionally specify a `--log-dir` to save logs to a specific directory:
100
+
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "rnacentral": {
105
+ "command": "uvx",
106
+ "args": [
107
+ "--from",
108
+ "git+https://github.com/rnacentral/rnacentral-mcp-server.git",
109
+ "run-server",
110
+ "--log-dir",
111
+ "/Users/YOUR_USERNAME/logs/rnacentral"
112
+ ]
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ ### Direct Execution
119
+
120
+ You can run the server directly using Python. Use the `--log-dir` argument to specify where to save log files:
121
+
122
+ ```bash
123
+ python rnacentral_sequence_search/server.py --log-dir ./logs
124
+ ```
125
+
126
+ Or using the installed script:
127
+
128
+ ```bash
129
+ run-server --log-dir ./logs
130
+ ```
131
+
132
+ ## Usage Examples
133
+
134
+ Once the server is running, you can interact with various tools:
135
+
136
+ ### Bidirectional ID Mapping
137
+
138
+ Map an external ID to RNAcentral and see all cross-references:
139
+
140
+ ```
141
+ Tool: map_rna_id
142
+ Arguments:
143
+ {
144
+ "identifier": "MIMAT0000062",
145
+ "taxon": "Homo sapiens"
146
+ }
147
+ ```
148
+
149
+ ### Genomic Overlap
150
+
151
+ Find ncRNAs overlapping a specific gene in human:
152
+
153
+ ```
154
+ Tool: get_overlapping_ncrnas
155
+ Arguments:
156
+ {
157
+ "species": "human",
158
+ "gene_symbol": "HOTAIR"
159
+ }
160
+ ```
161
+
162
+ ### 2D Structure Retrieval
163
+
164
+ Get the secondary structure diagram for a specific URS ID:
165
+
166
+ ```
167
+ Tool: get_secondary_structure_svg
168
+ Arguments:
169
+ {
170
+ "urs_id": "URS0000049E57"
171
+ }
172
+ ```
173
+
174
+ ### Bulk Sequence Export
175
+
176
+ Export a set of sequences matching a search query for machine learning:
177
+
178
+ ```
179
+ Tool: export_sequences
180
+ Arguments:
181
+ {
182
+ "query": "lncRNA",
183
+ "taxon": "9606",
184
+ "format": "parquet",
185
+ "max_length": 500
186
+ }
187
+ ```
188
+
189
+ ### Literature Summaries
190
+
191
+ Get a summary of the known biological role of an RNA:
192
+
193
+ ```
194
+ Tool: get_rna_description
195
+ Arguments:
196
+ {
197
+ "rna_id": "mmu-mir-191"
198
+ }
199
+ ```
200
+
201
+ ## Notes
202
+
203
+ - The server handles complex queries by orchestrating multiple upstream APIs (EBI Search, RNAcentral, Ensembl).
204
+ - Sequence searches poll for results with a timeout to handle varying server loads.
205
+ - The 2D structure SVG can be used for direct visualization in supporting clients.
206
+ - For very large exports, use the `export_sequences` tool which uses specialized microservices for efficiency.
@@ -0,0 +1,24 @@
1
+ import asyncio
2
+ import aiohttp
3
+ from rnacentral_sequence_search.utils import resolve_taxid, resolve_gene_coordinates
4
+ from rnacentral_sequence_search.overlap import fetch_overlapping_ncrnas
5
+
6
+ async def main():
7
+ async with aiohttp.ClientSession() as session:
8
+ print("Testing resolve_taxid for 'human'...")
9
+ taxon_id = await resolve_taxid(session, "human")
10
+ print(f"Taxon ID: {taxon_id}")
11
+
12
+ if taxon_id:
13
+ print(f"Testing fetch_overlapping_ncrnas for BRCA2 in human...")
14
+ try:
15
+ result = await fetch_overlapping_ncrnas(species="human", gene_symbol="BRCA2")
16
+ print("\nResult summary:")
17
+ print(result[:500] + "...")
18
+ except Exception as e:
19
+ print(f"Caught exception: {e}")
20
+ import traceback
21
+ traceback.print_exc()
22
+
23
+ if __name__ == "__main__":
24
+ asyncio.run(main())
@@ -0,0 +1,19 @@
1
+ # Minimal Sphinx Makefile — run via `uv run` so the docs extras are picked up.
2
+
3
+ SPHINXBUILD ?= uv run sphinx-build
4
+ SOURCEDIR = .
5
+ BUILDDIR = _build
6
+
7
+ .PHONY: help html clean livehtml
8
+
9
+ help:
10
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)"
11
+
12
+ html:
13
+ @$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)/html"
14
+
15
+ clean:
16
+ rm -rf "$(BUILDDIR)"
17
+
18
+ livehtml:
19
+ uv run sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)/html"
@@ -0,0 +1,29 @@
1
+ """Sphinx configuration for the RNAcentral MCP Server documentation."""
2
+
3
+ project = "RNAcentral MCP Server"
4
+ author = "RNAcentral"
5
+ copyright = "2026, RNAcentral"
6
+ release = "0.1.0"
7
+
8
+ extensions = [
9
+ "myst_parser",
10
+ "sphinx.ext.autodoc",
11
+ "sphinx.ext.napoleon",
12
+ "sphinx_copybutton",
13
+ ]
14
+
15
+ source_suffix = {".md": "markdown", ".rst": "restructuredtext"}
16
+ master_doc = "index"
17
+
18
+ myst_enable_extensions = [
19
+ "colon_fence",
20
+ "deflist",
21
+ "linkify",
22
+ "substitution",
23
+ ]
24
+
25
+ html_theme = "sphinx_rtd_theme"
26
+ html_title = "RNAcentral MCP Server"
27
+ html_static_path = ["_static"]
28
+
29
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
@@ -0,0 +1,13 @@
1
+ # Examples
2
+
3
+ This section is a placeholder — real worked examples will be added here showing
4
+ end-to-end applications of the tools (prompts used, resulting tool calls, and
5
+ the outputs the LLM produced).
6
+
7
+ Planned topics:
8
+
9
+ - Identifying novel ncRNAs overlapping a GWAS locus.
10
+ - Building a training set of tRNA sequences for a structure-prediction model.
11
+ - Cross-mapping a miRBase panel to RNAcentral for integration with another
12
+ dataset.
13
+ - Inspecting a 2D structure alongside its literature summary.
@@ -0,0 +1,30 @@
1
+ # RNAcentral MCP Server
2
+
3
+ An [MCP](https://modelcontextprotocol.io) server that exposes the
4
+ [RNAcentral](https://rnacentral.org) database — non-coding RNA sequences, cross-references,
5
+ genomic context, 2D structures, and literature summaries — as tools your LLM can call.
6
+
7
+ The server orchestrates several upstream APIs (EBI Search, RNAcentral REST, Ensembl GraphQL,
8
+ the sequence-search and export microservices) so the model can answer a single question with
9
+ a single tool call instead of chaining raw HTTP requests.
10
+
11
+ ```{toctree}
12
+ :maxdepth: 2
13
+ :caption: Getting started
14
+
15
+ installation
16
+ ```
17
+
18
+ ```{toctree}
19
+ :maxdepth: 2
20
+ :caption: Tool reference
21
+
22
+ tools/index
23
+ ```
24
+
25
+ ```{toctree}
26
+ :maxdepth: 1
27
+ :caption: Examples
28
+
29
+ examples
30
+ ```
@@ -0,0 +1,92 @@
1
+ # Installation
2
+
3
+ ## Prerequisites
4
+
5
+ - Python 3.10 or newer
6
+ - [uv](https://docs.astral.sh/uv/) (recommended) — used throughout this project for
7
+ dependency and environment management
8
+
9
+ ## Installing the server
10
+
11
+ Clone the repository and sync dependencies:
12
+
13
+ ```bash
14
+ git clone https://github.com/rnacentral/rnacentral-mcp-server.git
15
+ cd rnacentral-mcp-server
16
+ uv sync
17
+ ```
18
+
19
+ This creates a `.venv/` and installs the server plus its runtime dependencies. The
20
+ console script `run-server` becomes available inside that environment.
21
+
22
+ ## Connecting the server to your LLM
23
+
24
+ The server speaks the Model Context Protocol over stdio, so any MCP-capable client
25
+ can launch it. The examples below cover the most common clients — if you're using
26
+ something different, point it at the same `uvx ... run-server` command.
27
+
28
+ ### Claude Desktop
29
+
30
+ Add the server to `claude_desktop_config.json` (on macOS:
31
+ `~/Library/Application Support/Claude/claude_desktop_config.json`):
32
+
33
+ ```json
34
+ {
35
+ "mcpServers": {
36
+ "rnacentral": {
37
+ "command": "uvx",
38
+ "args": [
39
+ "--from",
40
+ "git+https://github.com/rnacentral/rnacentral-mcp-server.git",
41
+ "run-server",
42
+ "--log-dir",
43
+ "/Users/YOUR_USERNAME/logs/rnacentral"
44
+ ]
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ `--log-dir` is optional; pass it if you want on-disk logs for debugging.
51
+
52
+ Restart Claude Desktop and the `rnacentral` tools should appear in the tool picker.
53
+
54
+ ### Claude Code
55
+
56
+ Register the server with `claude mcp add`:
57
+
58
+ ```bash
59
+ claude mcp add rnacentral -- uvx --from \
60
+ git+https://github.com/rnacentral/rnacentral-mcp-server.git run-server
61
+ ```
62
+
63
+ ### Other MCP clients
64
+
65
+ Any client that launches an MCP server over stdio works. The command to run is:
66
+
67
+ ```bash
68
+ uvx --from git+https://github.com/rnacentral/rnacentral-mcp-server.git run-server
69
+ ```
70
+
71
+ Or, from a local clone:
72
+
73
+ ```bash
74
+ uv run run-server --log-dir ./logs
75
+ ```
76
+
77
+ ## Development mode
78
+
79
+ Run the server under the MCP Inspector to try tools interactively:
80
+
81
+ ```bash
82
+ uv run mcp dev rnacentral_sequence_search/server.py
83
+ ```
84
+
85
+ ## Building these docs locally
86
+
87
+ ```bash
88
+ uv sync --extra docs
89
+ uv run sphinx-build -b html docs docs/_build/html
90
+ ```
91
+
92
+ Or, from inside `docs/`, `make html`.
@@ -0,0 +1,32 @@
1
+ # `export_sequences`
2
+
3
+ Bulk export of RNA sequences matching a query. Unlike {doc}`query_rnacentral`,
4
+ which returns a handful of enriched hits for a human reader, this tool streams
5
+ the full result set through the RNAcentral export microservice and returns it in
6
+ a format suitable for downstream processing — FASTA for bioinformatics tools,
7
+ Parquet for ML pipelines.
8
+
9
+ ## Arguments
10
+
11
+ | Name | Type | Required | Description |
12
+ | --- | --- | --- | --- |
13
+ | `query` | `str` | yes | Free-text search term. |
14
+ | `rna_type` | `str` | no | Restrict to an RNA type (e.g. `"miRNA"`, `"lncRNA"`). |
15
+ | `taxon` | `str` | no | Scientific name (preferred) or NCBI Taxonomy ID. |
16
+ | `expert_db` | `str` | no | Source database filter. |
17
+ | `has_secondary_structure` | `bool` | no | Only include RNAs with a known 2D structure. |
18
+ | `min_length` | `int` | no | Minimum sequence length in nucleotides. |
19
+ | `max_length` | `int` | no | Maximum sequence length in nucleotides. |
20
+ | `format` | `str` | no | `"fasta"` (default) or `"parquet"`. |
21
+
22
+ ## Returns
23
+
24
+ For `fasta`, a string of FASTA records. For `parquet`, a path (or URL) to the
25
+ generated file returned by the export service.
26
+
27
+ ## Notes
28
+
29
+ - The export service handles pagination internally; there is no client-side
30
+ `limit`. Narrow the query with the filter arguments if you don't want every
31
+ match.
32
+ - Long-running exports may take tens of seconds for large result sets.
@@ -0,0 +1,29 @@
1
+ # `get_overlapping_ncrnas`
2
+
3
+ Find non-coding RNAs that overlap a genomic region. The region can be specified
4
+ either as explicit coordinates or as a gene symbol, in which case the tool uses
5
+ Ensembl's GraphQL API to resolve the symbol to coordinates first.
6
+
7
+ ## Arguments
8
+
9
+ | Name | Type | Required | Description |
10
+ | --- | --- | --- | --- |
11
+ | `species` | `str` | yes | Common name (e.g. `"human"`, `"mouse"`) or scientific name (`"homo_sapiens"`). |
12
+ | `chromosome` | `str` | conditional | Chromosome name — `"1"`, `"X"`, `"chr1"`. |
13
+ | `start` | `int` | conditional | Start coordinate (1-based, inclusive). |
14
+ | `end` | `int` | conditional | End coordinate (1-based, inclusive). |
15
+ | `gene_symbol` | `str` | conditional | Gene symbol (e.g. `"BRCA2"`, `"HOTAIR"`). |
16
+
17
+ You must supply **either** `gene_symbol` **or** the full `chromosome` / `start` /
18
+ `end` triple. Mixing the two is not supported; the tool returns an error if
19
+ neither is given.
20
+
21
+ ## Returns
22
+
23
+ A markdown list of overlapping RNAcentral entries with URS IDs, RNA type,
24
+ genomic coordinates, strand, and source database.
25
+
26
+ ## Upstream services
27
+
28
+ - Ensembl GraphQL API for `gene_symbol` → coordinates resolution.
29
+ - RNAcentral REST API for the overlap query.
@@ -0,0 +1,23 @@
1
+ # `get_rna_description`
2
+
3
+ Return a literature-derived summary of an RNA's known biological role. The
4
+ summary comes from RNAcentral's literature-summary pipeline, which aggregates
5
+ published mentions of the RNA into a short natural-language description.
6
+
7
+ ## Arguments
8
+
9
+ | Name | Type | Required | Description |
10
+ | --- | --- | --- | --- |
11
+ | `rna_id` | `str` | yes | An RNA identifier recognised by RNAcentral (e.g. `"mmu-mir-191"`, a miRBase name, or a URS ID). |
12
+
13
+ ## Returns
14
+
15
+ A plain-text description. If no summary is available for the given ID, the tool
16
+ returns a message indicating so rather than raising.
17
+
18
+ ## Good to know
19
+
20
+ - Summaries exist primarily for well-studied RNAs (miRNAs, lncRNAs with named
21
+ entries, etc.). Novel or poorly-annotated RNAs often have no summary.
22
+ - The summary is generated from the literature — treat it as a pointer to
23
+ primary sources, not as a definitive statement.
@@ -0,0 +1,24 @@
1
+ # `get_secondary_structure_svg`
2
+
3
+ Return the 2D secondary-structure diagram for a given URS ID as SVG. The SVG comes
4
+ from RNAcentral's structure service (R2DT or curated layouts, depending on the
5
+ entry) and can be rendered directly by MCP clients that support image content.
6
+
7
+ ## Arguments
8
+
9
+ | Name | Type | Required | Description |
10
+ | --- | --- | --- | --- |
11
+ | `urs_id` | `str` | yes | The RNAcentral URS ID (e.g. `"URS0000049E57"`). The taxon suffix (`_9606`) is optional. |
12
+
13
+ ## Returns
14
+
15
+ The SVG document as a string. If the entry has no 2D structure available, the
16
+ tool returns an explanatory message rather than raising.
17
+
18
+ ## Tips
19
+
20
+ - Not every RNAcentral entry has a 2D structure. Pre-filter with
21
+ `query_rnacentral(..., has_secondary_structure=True)` if you need to guarantee
22
+ a hit.
23
+ - Large or complex structures produce large SVGs — clients that inline the
24
+ payload in the chat transcript may truncate it.
@@ -0,0 +1,28 @@
1
+ # Tool reference
2
+
3
+ The server registers seven MCP tools. Each page below documents a tool's purpose,
4
+ arguments, return shape, and the upstream service it talks to.
5
+
6
+ ```{toctree}
7
+ :maxdepth: 1
8
+
9
+ query_rnacentral
10
+ search_sequence
11
+ map_rna_id
12
+ export_sequences
13
+ get_overlapping_ncrnas
14
+ get_secondary_structure_svg
15
+ get_rna_description
16
+ ```
17
+
18
+ ## Tool summary
19
+
20
+ | Tool | Purpose |
21
+ | --- | --- |
22
+ | [`query_rnacentral`](query_rnacentral.md) | Text/metadata search over RNAcentral with enriched results |
23
+ | [`search_sequence`](search_sequence.md) | Similarity search by raw RNA sequence |
24
+ | [`map_rna_id`](map_rna_id.md) | Bidirectional mapping between URS IDs and external DB IDs |
25
+ | [`export_sequences`](export_sequences.md) | Bulk export of matching sequences (FASTA or Parquet) |
26
+ | [`get_overlapping_ncrnas`](get_overlapping_ncrnas.md) | Find ncRNAs overlapping genomic coordinates or a gene |
27
+ | [`get_secondary_structure_svg`](get_secondary_structure_svg.md) | Retrieve the 2D structure diagram for a URS ID |
28
+ | [`get_rna_description`](get_rna_description.md) | AI-generated literature summary for an RNA |