s2_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.
Potentially problematic release.
This version of s2_mcp_server might be problematic. Click here for more details.
- s2_mcp_server-0.1.0/.env.example +15 -0
- s2_mcp_server-0.1.0/.gitignore +55 -0
- s2_mcp_server-0.1.0/MANIFEST.in +3 -0
- s2_mcp_server-0.1.0/PKG-INFO +235 -0
- s2_mcp_server-0.1.0/README.md +225 -0
- s2_mcp_server-0.1.0/pyproject.toml +20 -0
- s2_mcp_server-0.1.0/requirements.txt +2 -0
- s2_mcp_server-0.1.0/setup.py +26 -0
- s2_mcp_server-0.1.0/src/s2_mcp_server/__init__.py +9 -0
- s2_mcp_server-0.1.0/src/s2_mcp_server/config.py +9 -0
- s2_mcp_server-0.1.0/src/s2_mcp_server/server.py +131 -0
- s2_mcp_server-0.1.0/src/s2_mcp_server/tools/__init__.py +15 -0
- s2_mcp_server-0.1.0/src/s2_mcp_server/tools/definitions.py +1562 -0
- s2_mcp_server-0.1.0/uv.lock +518 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Copy this file to .env and fill in your values
|
|
2
|
+
|
|
3
|
+
# SingleStore's management API key
|
|
4
|
+
SINGLESTORE_API_KEY=your_api_key_here
|
|
5
|
+
|
|
6
|
+
# Username for connecting with the SingleStore database.
|
|
7
|
+
# It is optional, it can also be provided as a part of input
|
|
8
|
+
SINGLESTORE_DB_USERNAME=your_db_username_here
|
|
9
|
+
|
|
10
|
+
# Password for authenticating with the SingleStore database.
|
|
11
|
+
# It is optional, it can also be provided as a part of input
|
|
12
|
+
SIGNLESTORE_DB_PASSWORD=your_db_password_here
|
|
13
|
+
|
|
14
|
+
# Note: Never commit the actual .env file with credentials to version control
|
|
15
|
+
# Add .env to your .gitignore file
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Configuration files
|
|
2
|
+
config/
|
|
3
|
+
|
|
4
|
+
# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
# C extensions
|
|
10
|
+
*.so
|
|
11
|
+
|
|
12
|
+
# Distribution / packaging
|
|
13
|
+
dist/
|
|
14
|
+
build/
|
|
15
|
+
*.egg-info/
|
|
16
|
+
*.egg
|
|
17
|
+
|
|
18
|
+
# Virtual environments
|
|
19
|
+
venv/
|
|
20
|
+
env/
|
|
21
|
+
.env/
|
|
22
|
+
.venv/
|
|
23
|
+
|
|
24
|
+
# IDE specific files
|
|
25
|
+
.idea/
|
|
26
|
+
.vscode/
|
|
27
|
+
*.swp
|
|
28
|
+
*.swo
|
|
29
|
+
|
|
30
|
+
# Python testing
|
|
31
|
+
.pytest_cache/
|
|
32
|
+
.coverage
|
|
33
|
+
htmlcov/
|
|
34
|
+
|
|
35
|
+
# Environment variables
|
|
36
|
+
.env
|
|
37
|
+
.env.local
|
|
38
|
+
|
|
39
|
+
# Logs
|
|
40
|
+
*.log
|
|
41
|
+
|
|
42
|
+
# Local development settings
|
|
43
|
+
config/settings.local.toml
|
|
44
|
+
|
|
45
|
+
# Cache files
|
|
46
|
+
.mypy_cache/
|
|
47
|
+
.dmypy.json
|
|
48
|
+
dmypy.json
|
|
49
|
+
|
|
50
|
+
# Tool specific
|
|
51
|
+
tool_result.txt
|
|
52
|
+
.DS_Store
|
|
53
|
+
|
|
54
|
+
*.yml
|
|
55
|
+
*.yaml
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: s2_mcp_server
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A SingleStore MCP server
|
|
5
|
+
Author-email: prodrigues <prodrigues@singlestore.com>
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Requires-Dist: mcp>=1.3.0
|
|
8
|
+
Requires-Dist: singlestoredb>=1.12.0
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# MCP Server SingleStore
|
|
12
|
+
|
|
13
|
+
A description of your package.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
You can install the package using pip:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install mcp-server-singlestore
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
Provide usage instructions here.
|
|
26
|
+
|
|
27
|
+
# SingleStore MCP Server
|
|
28
|
+
|
|
29
|
+
Model Context Protocol (MCP) is a standardized protocol designed to manage context between large language models (LLMs) and external systems. This repository provides an installer and an MCP Server for Singlestore, enabling seamless integration.
|
|
30
|
+
|
|
31
|
+
With MCP, you can use Claude Desktop or any compatible MCP client to interact with SingleStore using natural language, making it easier to perform complex operations effortlessly.
|
|
32
|
+
|
|
33
|
+
## Components
|
|
34
|
+
|
|
35
|
+
### Resources
|
|
36
|
+
|
|
37
|
+
The server implements a simple note storage system with:
|
|
38
|
+
- Custom note:// URI scheme for accessing individual notes
|
|
39
|
+
- Each note resource has a name, description, and text/plain mimetype
|
|
40
|
+
|
|
41
|
+
### Tools
|
|
42
|
+
|
|
43
|
+
The server implements the following tools:
|
|
44
|
+
- **workspace_groups_info**: Retrieve details about the workspace groups accessible to the user
|
|
45
|
+
- No arguments required
|
|
46
|
+
- Returns details of the workspace groups
|
|
47
|
+
- **workspaces_info**: Retrieve details about the workspaces in a specific workspace group
|
|
48
|
+
- Arguments: `workspaceGroupID` (string)
|
|
49
|
+
- Returns details of the workspaces
|
|
50
|
+
- **organization_info**: Retrieve details about the user's current organization
|
|
51
|
+
- No arguments required
|
|
52
|
+
- Returns details of the organization
|
|
53
|
+
- **list_of_regions**: Retrieve a list of all regions that support workspaces for the user
|
|
54
|
+
- No arguments required
|
|
55
|
+
- Returns a list of regions
|
|
56
|
+
- **execute_sql**: Execute SQL operations on a connected workspace
|
|
57
|
+
- Arguments: `workspace_group_identifier`, `workspace_identifier`, `username`, `password`, `database`, `sql_query`
|
|
58
|
+
- Returns the results of the SQL query in a structured format
|
|
59
|
+
- **list_virtual_workspaces**: List all starter workspaces accessible to the user
|
|
60
|
+
- No arguments required
|
|
61
|
+
- Returns details of available starter workspaces
|
|
62
|
+
- **create_virtual_workspace**: Create a new starter workspace with a user
|
|
63
|
+
- Arguments:
|
|
64
|
+
- `name`: Name of the starter workspace
|
|
65
|
+
- `database_name`: Name of the database to create
|
|
66
|
+
- `username`: Username for accessing the workspace
|
|
67
|
+
- `password`: Password for the user
|
|
68
|
+
- `workspace_group`: Object containing `name` (optional) and `cellID` (mandatory)
|
|
69
|
+
- Returns details of the created workspace and user
|
|
70
|
+
- **connect_to_virtual_workspace**: Connect to an existing starter workspace
|
|
71
|
+
- Arguments: `virtual_workspace_id`, `username`, `password`
|
|
72
|
+
- Returns connection status and workspace details
|
|
73
|
+
- **execute_sql_on_virtual_workspace**: Execute SQL operations on a virtual workspace
|
|
74
|
+
- Arguments: `virtual_workspace_id`, `username`, `password`, `sql_query`
|
|
75
|
+
- Returns the results of the SQL query in a structured format including data, row count, columns, and status
|
|
76
|
+
- **list_notebook_samples**: List all notebook samples available in SingleStore Spaces
|
|
77
|
+
- No arguments required
|
|
78
|
+
- Returns details of available notebook samples
|
|
79
|
+
- **create_notebook**: Create a new notebook in the user's personal space
|
|
80
|
+
- Arguments: `notebook_name`, `content` (optional)
|
|
81
|
+
- Returns details of the created notebook
|
|
82
|
+
- **list_personal_files**: List all files in the user's personal space
|
|
83
|
+
- No arguments required
|
|
84
|
+
- Returns details of all files in the user's personal space
|
|
85
|
+
- **create_scheduled_job**: Create a new scheduled job to run a notebook
|
|
86
|
+
- Arguments:
|
|
87
|
+
- `name`: Name for the job
|
|
88
|
+
- `notebook_path`: Path to the notebook to execute
|
|
89
|
+
- `schedule_mode`: Once or Recurring
|
|
90
|
+
- `execution_interval_minutes`: Minutes between executions (optional)
|
|
91
|
+
- `start_at`: When to start the job (optional)
|
|
92
|
+
- `description`: Description of the job (optional)
|
|
93
|
+
- `max_duration_minutes`: Maximum allowed runtime (optional)
|
|
94
|
+
- `create_snapshot`: Whether to create notebook snapshots (optional)
|
|
95
|
+
- Returns details of the created job
|
|
96
|
+
- **get_job_details**: Get details about a specific job
|
|
97
|
+
- Arguments: `job_id`
|
|
98
|
+
- Returns detailed information about the specified job
|
|
99
|
+
- **list_job_executions**: List execution history for a specific job
|
|
100
|
+
- Arguments: `job_id`, `start` (optional), `end` (optional)
|
|
101
|
+
- Returns execution history for the specified job
|
|
102
|
+
|
|
103
|
+
## Configuration
|
|
104
|
+
|
|
105
|
+
The server requires the following environment variables:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# SingleStore's management API key (required)
|
|
109
|
+
SINGLESTORE_API_KEY=your_api_key_here
|
|
110
|
+
|
|
111
|
+
# Database credentials (optional - can be provided as input parameters)
|
|
112
|
+
SINGLESTORE_DB_USERNAME=your_db_username_here
|
|
113
|
+
SIGNLESTORE_DB_PASSWORD=your_db_password_here
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Configuration Methods
|
|
117
|
+
|
|
118
|
+
1. Using a .env file:
|
|
119
|
+
- Copy `.env.example` to `.env`
|
|
120
|
+
- Fill in your values
|
|
121
|
+
|
|
122
|
+
2. Export variables in shell:
|
|
123
|
+
```bash
|
|
124
|
+
export SINGLESTORE_API_KEY=your_api_key
|
|
125
|
+
export SINGLESTORE_DB_USERNAME=your_db_username #optional
|
|
126
|
+
export SIGNLESTORE_DB_PASSWORD=your_db_password #optional
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Note:** Database username and password are optional and can be provided as input parameters when needed.
|
|
130
|
+
|
|
131
|
+
## Quickstart
|
|
132
|
+
|
|
133
|
+
### Claude Desktop Configuration
|
|
134
|
+
|
|
135
|
+
Configure the SingleStore MCP Server in Claude Desktop's configuration file:
|
|
136
|
+
|
|
137
|
+
**MacOS**:
|
|
138
|
+
```bash
|
|
139
|
+
~/Library/Application\ Support/Claude/claude_desktop_config.json
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Windows**:
|
|
143
|
+
```bash
|
|
144
|
+
%APPDATA%/Claude/claude_desktop_config.json
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
<details>
|
|
148
|
+
<summary>Development Configuration</summary>
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"mcpServers": {
|
|
153
|
+
"SingleStore MCP Server": {
|
|
154
|
+
"command": "uv",
|
|
155
|
+
"args": [
|
|
156
|
+
"--directory",
|
|
157
|
+
"/home/prodrigues/Desktop/mcp-server/my-server",
|
|
158
|
+
"run",
|
|
159
|
+
"my-server"
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
</details>
|
|
166
|
+
|
|
167
|
+
<details>
|
|
168
|
+
<summary>Production Configuration</summary>
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{
|
|
172
|
+
"mcpServers": {
|
|
173
|
+
"SingleStore MCP Server": {
|
|
174
|
+
"command": "uvx",
|
|
175
|
+
"args": [
|
|
176
|
+
"my-server"
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
</details>
|
|
183
|
+
|
|
184
|
+
## Development
|
|
185
|
+
|
|
186
|
+
### Running Locally with MCP Inspector
|
|
187
|
+
|
|
188
|
+
Start the development server using the MCP inspector:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
npx @modelcontextprotocol/inspector uv --directory ./src/server run server.py
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Running With Claude Desktop App
|
|
195
|
+
|
|
196
|
+
To connect the SingleStore MCP Server with Claude Desktop:
|
|
197
|
+
|
|
198
|
+
1. Install and launch Claude Desktop
|
|
199
|
+
2. Configure the MCP server in Claude Desktop's config file (see Configuration section)
|
|
200
|
+
3. Add your SingleStore environment variables either:
|
|
201
|
+
- In the `.env` file, or
|
|
202
|
+
- Directly in Claude Desktop's MCP server configuration
|
|
203
|
+
4. Restart Claude Desktop
|
|
204
|
+
5. In the Claude interface:
|
|
205
|
+
- Click the MCP server dropdown
|
|
206
|
+
- Select "SingleStore MCP Server"
|
|
207
|
+
6. You should now be able to try a simple command such as `List all my workspace groups`
|
|
208
|
+
|
|
209
|
+
**Troubleshooting**:
|
|
210
|
+
- Ensure all environment variables are set correctly
|
|
211
|
+
- Check Claude Desktop logs if connection fails
|
|
212
|
+
- Make sure you have valid SingleStore API credentials.
|
|
213
|
+
|
|
214
|
+
### Building and Publishing
|
|
215
|
+
|
|
216
|
+
1. Update dependencies:
|
|
217
|
+
```bash
|
|
218
|
+
uv sync
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
2. Create distribution packages:
|
|
222
|
+
```bash
|
|
223
|
+
uv build
|
|
224
|
+
```
|
|
225
|
+
This generates source and wheel distributions in `dist/`.
|
|
226
|
+
|
|
227
|
+
3. Publish to PyPI:
|
|
228
|
+
```bash
|
|
229
|
+
uv publish
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Note**: Set your PyPI token via environment variable:
|
|
233
|
+
```bash
|
|
234
|
+
export PYPI_TOKEN=your_token_here
|
|
235
|
+
```
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# MCP Server SingleStore
|
|
2
|
+
|
|
3
|
+
A description of your package.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
You can install the package using pip:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install mcp-server-singlestore
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Provide usage instructions here.
|
|
16
|
+
|
|
17
|
+
# SingleStore MCP Server
|
|
18
|
+
|
|
19
|
+
Model Context Protocol (MCP) is a standardized protocol designed to manage context between large language models (LLMs) and external systems. This repository provides an installer and an MCP Server for Singlestore, enabling seamless integration.
|
|
20
|
+
|
|
21
|
+
With MCP, you can use Claude Desktop or any compatible MCP client to interact with SingleStore using natural language, making it easier to perform complex operations effortlessly.
|
|
22
|
+
|
|
23
|
+
## Components
|
|
24
|
+
|
|
25
|
+
### Resources
|
|
26
|
+
|
|
27
|
+
The server implements a simple note storage system with:
|
|
28
|
+
- Custom note:// URI scheme for accessing individual notes
|
|
29
|
+
- Each note resource has a name, description, and text/plain mimetype
|
|
30
|
+
|
|
31
|
+
### Tools
|
|
32
|
+
|
|
33
|
+
The server implements the following tools:
|
|
34
|
+
- **workspace_groups_info**: Retrieve details about the workspace groups accessible to the user
|
|
35
|
+
- No arguments required
|
|
36
|
+
- Returns details of the workspace groups
|
|
37
|
+
- **workspaces_info**: Retrieve details about the workspaces in a specific workspace group
|
|
38
|
+
- Arguments: `workspaceGroupID` (string)
|
|
39
|
+
- Returns details of the workspaces
|
|
40
|
+
- **organization_info**: Retrieve details about the user's current organization
|
|
41
|
+
- No arguments required
|
|
42
|
+
- Returns details of the organization
|
|
43
|
+
- **list_of_regions**: Retrieve a list of all regions that support workspaces for the user
|
|
44
|
+
- No arguments required
|
|
45
|
+
- Returns a list of regions
|
|
46
|
+
- **execute_sql**: Execute SQL operations on a connected workspace
|
|
47
|
+
- Arguments: `workspace_group_identifier`, `workspace_identifier`, `username`, `password`, `database`, `sql_query`
|
|
48
|
+
- Returns the results of the SQL query in a structured format
|
|
49
|
+
- **list_virtual_workspaces**: List all starter workspaces accessible to the user
|
|
50
|
+
- No arguments required
|
|
51
|
+
- Returns details of available starter workspaces
|
|
52
|
+
- **create_virtual_workspace**: Create a new starter workspace with a user
|
|
53
|
+
- Arguments:
|
|
54
|
+
- `name`: Name of the starter workspace
|
|
55
|
+
- `database_name`: Name of the database to create
|
|
56
|
+
- `username`: Username for accessing the workspace
|
|
57
|
+
- `password`: Password for the user
|
|
58
|
+
- `workspace_group`: Object containing `name` (optional) and `cellID` (mandatory)
|
|
59
|
+
- Returns details of the created workspace and user
|
|
60
|
+
- **connect_to_virtual_workspace**: Connect to an existing starter workspace
|
|
61
|
+
- Arguments: `virtual_workspace_id`, `username`, `password`
|
|
62
|
+
- Returns connection status and workspace details
|
|
63
|
+
- **execute_sql_on_virtual_workspace**: Execute SQL operations on a virtual workspace
|
|
64
|
+
- Arguments: `virtual_workspace_id`, `username`, `password`, `sql_query`
|
|
65
|
+
- Returns the results of the SQL query in a structured format including data, row count, columns, and status
|
|
66
|
+
- **list_notebook_samples**: List all notebook samples available in SingleStore Spaces
|
|
67
|
+
- No arguments required
|
|
68
|
+
- Returns details of available notebook samples
|
|
69
|
+
- **create_notebook**: Create a new notebook in the user's personal space
|
|
70
|
+
- Arguments: `notebook_name`, `content` (optional)
|
|
71
|
+
- Returns details of the created notebook
|
|
72
|
+
- **list_personal_files**: List all files in the user's personal space
|
|
73
|
+
- No arguments required
|
|
74
|
+
- Returns details of all files in the user's personal space
|
|
75
|
+
- **create_scheduled_job**: Create a new scheduled job to run a notebook
|
|
76
|
+
- Arguments:
|
|
77
|
+
- `name`: Name for the job
|
|
78
|
+
- `notebook_path`: Path to the notebook to execute
|
|
79
|
+
- `schedule_mode`: Once or Recurring
|
|
80
|
+
- `execution_interval_minutes`: Minutes between executions (optional)
|
|
81
|
+
- `start_at`: When to start the job (optional)
|
|
82
|
+
- `description`: Description of the job (optional)
|
|
83
|
+
- `max_duration_minutes`: Maximum allowed runtime (optional)
|
|
84
|
+
- `create_snapshot`: Whether to create notebook snapshots (optional)
|
|
85
|
+
- Returns details of the created job
|
|
86
|
+
- **get_job_details**: Get details about a specific job
|
|
87
|
+
- Arguments: `job_id`
|
|
88
|
+
- Returns detailed information about the specified job
|
|
89
|
+
- **list_job_executions**: List execution history for a specific job
|
|
90
|
+
- Arguments: `job_id`, `start` (optional), `end` (optional)
|
|
91
|
+
- Returns execution history for the specified job
|
|
92
|
+
|
|
93
|
+
## Configuration
|
|
94
|
+
|
|
95
|
+
The server requires the following environment variables:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# SingleStore's management API key (required)
|
|
99
|
+
SINGLESTORE_API_KEY=your_api_key_here
|
|
100
|
+
|
|
101
|
+
# Database credentials (optional - can be provided as input parameters)
|
|
102
|
+
SINGLESTORE_DB_USERNAME=your_db_username_here
|
|
103
|
+
SIGNLESTORE_DB_PASSWORD=your_db_password_here
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Configuration Methods
|
|
107
|
+
|
|
108
|
+
1. Using a .env file:
|
|
109
|
+
- Copy `.env.example` to `.env`
|
|
110
|
+
- Fill in your values
|
|
111
|
+
|
|
112
|
+
2. Export variables in shell:
|
|
113
|
+
```bash
|
|
114
|
+
export SINGLESTORE_API_KEY=your_api_key
|
|
115
|
+
export SINGLESTORE_DB_USERNAME=your_db_username #optional
|
|
116
|
+
export SIGNLESTORE_DB_PASSWORD=your_db_password #optional
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Note:** Database username and password are optional and can be provided as input parameters when needed.
|
|
120
|
+
|
|
121
|
+
## Quickstart
|
|
122
|
+
|
|
123
|
+
### Claude Desktop Configuration
|
|
124
|
+
|
|
125
|
+
Configure the SingleStore MCP Server in Claude Desktop's configuration file:
|
|
126
|
+
|
|
127
|
+
**MacOS**:
|
|
128
|
+
```bash
|
|
129
|
+
~/Library/Application\ Support/Claude/claude_desktop_config.json
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Windows**:
|
|
133
|
+
```bash
|
|
134
|
+
%APPDATA%/Claude/claude_desktop_config.json
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
<details>
|
|
138
|
+
<summary>Development Configuration</summary>
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"mcpServers": {
|
|
143
|
+
"SingleStore MCP Server": {
|
|
144
|
+
"command": "uv",
|
|
145
|
+
"args": [
|
|
146
|
+
"--directory",
|
|
147
|
+
"/home/prodrigues/Desktop/mcp-server/my-server",
|
|
148
|
+
"run",
|
|
149
|
+
"my-server"
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
</details>
|
|
156
|
+
|
|
157
|
+
<details>
|
|
158
|
+
<summary>Production Configuration</summary>
|
|
159
|
+
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"mcpServers": {
|
|
163
|
+
"SingleStore MCP Server": {
|
|
164
|
+
"command": "uvx",
|
|
165
|
+
"args": [
|
|
166
|
+
"my-server"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
</details>
|
|
173
|
+
|
|
174
|
+
## Development
|
|
175
|
+
|
|
176
|
+
### Running Locally with MCP Inspector
|
|
177
|
+
|
|
178
|
+
Start the development server using the MCP inspector:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
npx @modelcontextprotocol/inspector uv --directory ./src/server run server.py
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Running With Claude Desktop App
|
|
185
|
+
|
|
186
|
+
To connect the SingleStore MCP Server with Claude Desktop:
|
|
187
|
+
|
|
188
|
+
1. Install and launch Claude Desktop
|
|
189
|
+
2. Configure the MCP server in Claude Desktop's config file (see Configuration section)
|
|
190
|
+
3. Add your SingleStore environment variables either:
|
|
191
|
+
- In the `.env` file, or
|
|
192
|
+
- Directly in Claude Desktop's MCP server configuration
|
|
193
|
+
4. Restart Claude Desktop
|
|
194
|
+
5. In the Claude interface:
|
|
195
|
+
- Click the MCP server dropdown
|
|
196
|
+
- Select "SingleStore MCP Server"
|
|
197
|
+
6. You should now be able to try a simple command such as `List all my workspace groups`
|
|
198
|
+
|
|
199
|
+
**Troubleshooting**:
|
|
200
|
+
- Ensure all environment variables are set correctly
|
|
201
|
+
- Check Claude Desktop logs if connection fails
|
|
202
|
+
- Make sure you have valid SingleStore API credentials.
|
|
203
|
+
|
|
204
|
+
### Building and Publishing
|
|
205
|
+
|
|
206
|
+
1. Update dependencies:
|
|
207
|
+
```bash
|
|
208
|
+
uv sync
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
2. Create distribution packages:
|
|
212
|
+
```bash
|
|
213
|
+
uv build
|
|
214
|
+
```
|
|
215
|
+
This generates source and wheel distributions in `dist/`.
|
|
216
|
+
|
|
217
|
+
3. Publish to PyPI:
|
|
218
|
+
```bash
|
|
219
|
+
uv publish
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Note**: Set your PyPI token via environment variable:
|
|
223
|
+
```bash
|
|
224
|
+
export PYPI_TOKEN=your_token_here
|
|
225
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "s2_mcp_server"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A SingleStore MCP server"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"mcp>=1.3.0",
|
|
9
|
+
"singlestoredb>=1.12.0",
|
|
10
|
+
]
|
|
11
|
+
[[project.authors]]
|
|
12
|
+
name = "prodrigues"
|
|
13
|
+
email = "prodrigues@singlestore.com"
|
|
14
|
+
|
|
15
|
+
[build-system]
|
|
16
|
+
requires = [ "hatchling",]
|
|
17
|
+
build-backend = "hatchling.build"
|
|
18
|
+
|
|
19
|
+
[project.scripts]
|
|
20
|
+
singlestore-mcp-server = "s2_mcp_server:main"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name='singlestoredb-mcp-server',
|
|
5
|
+
version='0.1.0',
|
|
6
|
+
packages=find_packages(),
|
|
7
|
+
include_package_data=True,
|
|
8
|
+
install_requires=['pydantic-settings','singlestoredb'],
|
|
9
|
+
entry_points={
|
|
10
|
+
'console_scripts': [
|
|
11
|
+
'mcp-server=mcp_server.main:main',
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
author='Jai Khatri',
|
|
15
|
+
author_email='jkhatri@singlestore.com',
|
|
16
|
+
description='Singlestore MCP Server',
|
|
17
|
+
long_description=open('README.md').read(),
|
|
18
|
+
long_description_content_type='text/markdown',
|
|
19
|
+
url='https://github.com/jkhatri2/mcp-server-singlestore',
|
|
20
|
+
classifiers=[
|
|
21
|
+
'Programming Language :: Python :: 3',
|
|
22
|
+
'License :: OSI Approved :: MIT License',
|
|
23
|
+
'Operating System :: OS Independent',
|
|
24
|
+
],
|
|
25
|
+
python_requires='>=3.6',
|
|
26
|
+
)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from dotenv import load_dotenv
|
|
3
|
+
|
|
4
|
+
load_dotenv() # Loads environment variables from a .env file
|
|
5
|
+
|
|
6
|
+
SINGLESTORE_API_KEY = os.getenv("SINGLESTORE_API_KEY")
|
|
7
|
+
SINGLESTORE_DB_USERNAME = os.getenv("SINGLESTORE_DB_USERNAME")
|
|
8
|
+
SINGLESTORE_DB_PASSWORD = os.getenv("SINGLESTORE_DB_PASSWORD")
|
|
9
|
+
SINGLESTORE_API_BASE_URL = "https://api.singlestore.com"
|