Skip to content

Commit 8659e42

Browse files
author
deec
committed
updates to README.md
1 parent 798d4cc commit 8659e42

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
- [Overview](#connx-mcp-server)
66
- [Sample Features](#features)
77
- [Installation](#installation)
8+
- [Testing](#testing-)
89
- [Usage](#usage)
910
- [MCP Tools](#mcp-tools)
1011
- [`query_connx`](#query_connx)
1112
- [`update_connx`](#update_connx)
12-
- [MCP Resources](#mcp-resources)
1313
- [MCP Client Examples](#mcp-client-examples)
1414
- [Extending MCP Tools](#extending-mcp-tools)
1515
- [Summary](#summary)
@@ -31,6 +31,7 @@ An unofficial MCP (Model Context Protocol) server for integrating with CONNX dat
3131
2. Install dependencies: `pip install -r requirements.txt`
3232
3. Configure CONNX DSN in `connx_server.py` (use env vars for production).
3333

34+
3435
## Usage
3536
Run: `python connx_server.py`
3637

@@ -151,11 +152,14 @@ Below are examples of how MCP-compatible clients (such as Claude Desktop or othe
151152
async def query_connx(query: str) -> Dict[str, Any]:
152153
```
153154

154-
# Testing
155+
# Testing
155156
This project uses pytest for unit testing. Tests mock database interactions to run without a real CONNX setup.
156157

157158
- Install test deps: `pip install pytest pytest-mock pytest-asyncio`
158159
- Run tests: `pytest tests/`
160+
- Commandline smoke test `python -c "from dotenv import load_dotenv; load_dotenv(); from connx_server import get_connx_connection; c=get_connx_connection(); print('OK'); c.close()"`
161+
- Run Python smoke test: ` python .\scripts\smoke.py
162+
`
159163

160164
Coverage includes connection handling, query/update execution, sanitization, and MCP tools/resources.
161165

connx_server.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,6 @@ async def get_schema_for_table(table_name: str) -> Dict[str, Any]:
161161
except ValueError as e:
162162
return {"error": str(e)}
163163
# Main Entry Point
164-
async def main():
165-
# Run the server (use 'stdio' for local, 'http' for remote)
166-
await mcp.run(transport='stdio') # Or 'http' with port configuration
167-
168-
169164
if __name__ == "__main__":
170-
asyncio.run(main())
165+
# FastMCP.run() manages its own event loop via anyio.run()
166+
mcp.run(transport="stdio")

0 commit comments

Comments
 (0)