Skip to content

Commit dea4413

Browse files
committed
get rid of the nonsense accidentally introduced by claude
1 parent 309dc2b commit dea4413

7 files changed

Lines changed: 29 additions & 95 deletions

File tree

README.md

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Use this configuration for most AI clients. Create or update your MCP configurat
180180
"mcpServers": {
181181
"gget-mcp": {
182182
"command": "uvx",
183-
"args": ["gget-mcp", "server-stdio"]
183+
"args": ["--from", "gget-mcp", "stdio"]
184184
}
185185
}
186186
}
@@ -195,7 +195,7 @@ For HTTP mode:
195195
"mcpServers": {
196196
"gget-mcp": {
197197
"command": "uvx",
198-
"args": ["gget-mcp", "server-http"]
198+
"args": ["--from", "gget-mcp", "server"]
199199
}
200200
}
201201
}
@@ -210,37 +210,12 @@ Use this mode when you want to save large output files (sequences, structures, a
210210
"mcpServers": {
211211
"gget-mcp": {
212212
"command": "uvx",
213-
"args": ["gget-mcp", "server-local", "--output-dir", "./gget_output"]
213+
"args": ["--from", "gget-mcp", "stdio", "--output-dir", "./gget_output"]
214214
}
215215
}
216216
}
217217
```
218218

219-
### Local Development Configuration
220-
221-
For local development when you've cloned the repository:
222-
223-
```json
224-
{
225-
"mcpServers": {
226-
"gget-mcp": {
227-
"command": "uv",
228-
"args": ["run", "server-stdio"],
229-
"env": {
230-
"MCP_PORT": "3002",
231-
"MCP_HOST": "0.0.0.0",
232-
"MCP_TRANSPORT": "stdio"
233-
}
234-
}
235-
}
236-
}
237-
```
238-
239-
**Files Available:**
240-
- **STDIO mode:** `mcp-config-stdio.json`
241-
- **HTTP mode:** `mcp-config.json`
242-
- **STDIO-Local mode:** `mcp-config-stdio-local.json`
243-
- **Local development:** `mcp-config-stdio-debug.json`
244219

245220
### Configuration Video Tutorial
246221

@@ -255,25 +230,15 @@ If you want to inspect the methods provided by the MCP server, use npx (you may
255230

256231
For STDIO mode with uvx:
257232
```bash
258-
npx @modelcontextprotocol/inspector --config mcp-config-stdio.json --server gget-mcp
259-
```
260-
261-
For HTTP mode (ensure server is running first):
262-
```bash
263233
npx @modelcontextprotocol/inspector --config mcp-config.json --server gget-mcp
264234
```
265235

266-
For local development:
267-
```bash
268-
npx @modelcontextprotocol/inspector --config mcp-config-stdio-debug.json --server gget-mcp
269-
```
270-
271236
You can also run the inspector manually and configure it through the interface:
272237
```bash
273238
npx @modelcontextprotocol/inspector
274239
```
275240

276-
After that you can explore the tools and resources with MCP Inspector at http://127.0.0.1:6274 (note, if you run inspector several times it can change port)
241+
After that you can explore the tools and resources with MCP Inspector at which is usually at 6274 port (note, if you run inspector several times it can change port)
277242

278243
</details>
279244

@@ -299,13 +264,10 @@ If you already cloned the repo you can run the server with uv:
299264

300265
```bash
301266
# Start the MCP server locally (HTTP mode)
302-
uv run server-http
267+
uv run server
303268

304269
# Or start in STDIO mode
305-
uv run server-stdio
306-
307-
# Or start in STDIO-local mode (saves files locally)
308-
uv run server-local
270+
uv run stdio
309271

310272
# Or start in SSE mode
311273
uv run server-sse
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"mcpServers": {
33
"gget-mcp": {
44
"command": "uvx",
5-
"args": ["gget-mcp", "server-stdio"]
5+
"args": ["--from", "gget-mcp", "server"]
66
}
77
}
88
}

mcp-config-stdio-debug.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

mcp-config-stdio-local.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

mcp-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"mcpServers": {
33
"gget-mcp": {
44
"command": "uvx",
5-
"args": ["gget-mcp", "server-http"]
5+
"args": ["--from", "gget-mcp", "stdio", "--output-dir", "./gget_output"]
66
}
77
}
88
}

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "gget-mcp"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
description = "MCP server for gget bioinformatics library"
55
readme = "README.md"
66
authors = [
@@ -23,6 +23,9 @@ dependencies = [
2323

2424
[project.scripts]
2525
gget-mcp = "gget_mcp.server:cli_app"
26+
stdio = "gget_mcp.server:stdio"
27+
server = "gget_mcp.server:server"
28+
sse = "gget_mcp.server:sse"
2629

2730
[build-system]
2831
requires = ["hatchling"]

src/gget_mcp/server.py

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
class TransportType(str, Enum):
1616
STDIO = "stdio"
17-
STDIO_LOCAL = "stdio-local"
1817
STREAMABLE_HTTP = "streamable-http"
1918
SSE = "sse"
2019

@@ -59,8 +58,7 @@ def _register_gget_tools(self):
5958
self.tool(name=f"{self.prefix}search_genes")(self.search_genes_simple)
6059
self.tool(name=f"{self.prefix}info")(self.get_gene_info_simple)
6160

62-
# Sequence tools - use local wrapper if in local mode
63-
if self.transport_mode == "stdio-local":
61+
if self.transport_mode == "stdio":
6462
self.tool(name=f"{self.prefix}seq")(self.get_sequences_local_simple)
6563
else:
6664
self.tool(name=f"{self.prefix}seq")(self.get_sequences_simple)
@@ -73,7 +71,7 @@ def _register_gget_tools(self):
7371
self.tool(name=f"{self.prefix}blat")(self.blat_sequence_simple)
7472

7573
# Alignment tools - use local wrappers if in local mode
76-
if self.transport_mode == "stdio-local":
74+
if self.transport_mode == "stdio":
7775
self.tool(name=f"{self.prefix}muscle")(self.muscle_align_local_simple)
7876
self.tool(name=f"{self.prefix}diamond")(self.diamond_align_local_simple)
7977
else:
@@ -86,7 +84,7 @@ def _register_gget_tools(self):
8684
self.tool(name=f"{self.prefix}bgee")(self.bgee_orthologs_simple)
8785

8886
# Protein structure and function - use local wrappers if in local mode
89-
if self.transport_mode == "stdio-local":
87+
if self.transport_mode == "stdio":
9088
self.tool(name=f"{self.prefix}pdb")(self.get_pdb_structure_local_simple)
9189
self.tool(name=f"{self.prefix}alphafold")(self.alphafold_predict_local_simple)
9290
else:
@@ -700,7 +698,7 @@ async def get_sequences_local_simple(
700698
output_path: Optional[str] = None,
701699
format: Literal["fasta"] = "fasta"
702700
) -> LocalFileResult:
703-
"""Fetch sequences and save to local file in stdio-local mode.
701+
"""Fetch sequences and save to local file in stdio mode.
704702
705703
PREREQUISITE: Use search_genes first to get Ensembl IDs from gene names/symbols.
706704
@@ -728,7 +726,7 @@ async def get_pdb_structure_local_simple(
728726
output_path: Optional[str] = None,
729727
format: Literal["pdb"] = "pdb"
730728
) -> LocalFileResult:
731-
"""Fetch PDB structure and save to local file in stdio-local mode.
729+
"""Fetch PDB structure and save to local file in stdio mode.
732730
733731
Args:
734732
pdb_id: PDB ID to query (e.g., '7S7U', '2GS6')
@@ -831,43 +829,35 @@ def create_app(transport_mode: str = "stdio", output_dir: Optional[str] = None,
831829
def server(
832830
host: Annotated[str, typer.Option(help="Host to run the server on.")] = DEFAULT_HOST,
833831
port: Annotated[int, typer.Option(help="Port to run the server on.")] = DEFAULT_PORT,
834-
transport: Annotated[str, typer.Option(help="Transport type: stdio, stdio-local, streamable-http, or sse")] = DEFAULT_TRANSPORT,
835-
output_dir: Annotated[Optional[str], typer.Option(help="Output directory for local files (stdio-local mode)")] = None,
832+
transport: Annotated[str, typer.Option(help="Transport type: stdio, streamable-http, or sse")] = DEFAULT_TRANSPORT,
833+
output_dir: Annotated[Optional[str], typer.Option(help="Output directory for local files (stdio mode)")] = None,
836834
extended: Annotated[bool, typer.Option(help="Use extended mode with all parameters (fallback to full API)")] = False
837835
):
838836
"""Runs the gget MCP server."""
839837
# Validate transport value
840-
if transport not in ["stdio", "stdio-local", "streamable-http", "sse"]:
841-
typer.echo(f"Invalid transport: {transport}. Must be one of: stdio, stdio-local, streamable-http, sse")
838+
if transport not in ["stdio","streamable-http", "sse"]:
839+
typer.echo(f"Invalid transport: {transport}. Must be one of: stdio, streamable-http, sse")
842840
raise typer.Exit(1)
843841

844842
app = create_app(transport_mode=transport, output_dir=output_dir, extended_mode=extended)
845843

846844
# Different transports need different arguments
847-
if transport in ["stdio", "stdio-local"]:
845+
if transport in ["stdio"]:
848846
app.run(transport="stdio") # Both stdio modes use stdio transport
849847
else:
850848
app.run(transport=transport, host=host, port=port)
851849

852-
@cli_app.command(name="server-stdio")
853-
def server_stdio(
850+
@cli_app.command(name="stdio")
851+
def stdio(
854852
extended: Annotated[bool, typer.Option(help="Use extended mode with all parameters (fallback to full API)")] = False
855853
):
856854
"""Runs the gget MCP server in stdio mode (standard input/output)."""
857855
app = create_app(transport_mode="stdio", extended_mode=extended)
858856
app.run(transport="stdio")
859857

860-
@cli_app.command(name="server-local")
861-
def server_local(
862-
output_dir: Annotated[Optional[str], typer.Option(help="Output directory for local files")] = None,
863-
extended: Annotated[bool, typer.Option(help="Use extended mode with all parameters (fallback to full API)")] = False
864-
):
865-
"""Runs the gget MCP server in stdio-local mode (saves large files locally)."""
866-
app = create_app(transport_mode="stdio-local", output_dir=output_dir, extended_mode=extended)
867-
app.run(transport="stdio")
868858

869-
@cli_app.command(name="server-http")
870-
def server_http(
859+
@cli_app.command(name="http")
860+
def server(
871861
host: Annotated[str, typer.Option(help="Host to run the server on.")] = DEFAULT_HOST,
872862
port: Annotated[int, typer.Option(help="Port to run the server on.")] = DEFAULT_PORT,
873863
output_dir: Annotated[Optional[str], typer.Option(help="Output directory for local files")] = None,
@@ -877,14 +867,14 @@ def server_http(
877867
app = create_app(transport_mode="streamable-http", output_dir=output_dir, extended_mode=extended)
878868
app.run(transport="streamable-http", host=host, port=port)
879869

880-
@cli_app.command(name="server-sse")
881-
def server_sse(
870+
@cli_app.command(name="sse")
871+
def sse(
882872
host: Annotated[str, typer.Option(help="Host to run the server on.")] = DEFAULT_HOST,
883873
port: Annotated[int, typer.Option(help="Port to run the server on.")] = DEFAULT_PORT,
884874
output_dir: Annotated[Optional[str], typer.Option(help="Output directory for local files")] = None,
885875
extended: Annotated[bool, typer.Option(help="Use extended mode with all parameters (fallback to full API)")] = False
886876
):
887-
"""Runs the gget MCP server in Server-Sent Events (SSE) mode."""
877+
"""Runs the gget MCP server in Sent Events (SSE) mode."""
888878
app = create_app(transport_mode="sse", output_dir=output_dir, extended_mode=extended)
889879
app.run(transport="sse", host=host, port=port)
890880

0 commit comments

Comments
 (0)