Skip to content

Commit dee393e

Browse files
committed
Bump version to 0.1.0
1 parent c783a28 commit dee393e

File tree

3 files changed

+160
-160
lines changed

3 files changed

+160
-160
lines changed

README.md

Lines changed: 101 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,101 @@
1-
# tsurugi-mcp-server
2-
3-
[Model Context Protocol](https://github.com/modelcontextprotocol) server to access [Tsurugi](https://github.com/project-tsurugi/tsurugidb).
4-
5-
## Limitations
6-
7-
- Tsurugi 1.4.0 or later.
8-
- Java21 or later.
9-
10-
## Components
11-
12-
### Tools
13-
14-
- `listTableNames`
15-
- list table names.
16-
- `getTableMetadata`
17-
- get table metadata (table schema).
18-
- parameter
19-
- `tableName` - table name (string, required)
20-
- `query`
21-
- execute SQL (select).
22-
- parameter
23-
- `sql` - SQL (string, required)
24-
- `transaction_type` - `OCC`, `LTX`, `RTX`. (string, default: `RTX`)
25-
- `cursor` - To continue the previous query. (string)
26-
- If there is a continuation, `nextCursor` is returned.
27-
- `update`
28-
- execute SQL (insert, update, delete).
29-
- parameter
30-
- `sql` - SQL (string, required)
31-
- `transaction_type` - `OCC`, `LTX`. (string, default: `OCC`)
32-
- `write_preserve` - write preserve table names. (string, required when `transaction_type` is `LTX`)
33-
- `executeDdl`
34-
- execute DDL (create, drop)
35-
- parameter
36-
- `sql` - SQL (string, required)
37-
- `transaction_type` - `OCC`, `LTX`. (string, default: `OCC`)
38-
39-
### Resources
40-
41-
- table metadata
42-
43-
### Prompts
44-
45-
- `tableList-prompt`
46-
- Prompt to display the list of tables.
47-
- `tableMetadata-prompt`
48-
- Prompt to display the table metadata.
49-
- `query-prompt`
50-
- Prompt to display the table data.
51-
52-
## Configuration
53-
54-
### Usage with Claude Desktop
55-
56-
First, download the tsurugi-mcp-server jar file from [release page](https://github.com/project-tsurugi/tsurugi-mcp-server/releases).
57-
58-
To use this server with the [Claude Desktop](https://claude.ai/download), add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`:
59-
60-
```json
61-
{
62-
"mcpServers": {
63-
"tsurugidb": {
64-
"command": "java",
65-
"args": [
66-
"-jar",
67-
"/path/to/tsurugi-mcp-server-all.jar",
68-
"-c", "tcp://localhost:12345"
69-
]
70-
}
71-
}
72-
}
73-
```
74-
75-
- `command`
76-
- If the `java` command is not included in the PATH, specify the full path. (e.g., `"C:/Program Files/Java/jdk-21/bin/java"`)
77-
- `args`
78-
- Specify the jar file by full path.
79-
- `-c` or `--connection` - the endpoint URL to connect Tsurugi. (required)
80-
- If you want to limit the tools used, add `--enable-tools`. (e.g., for read-only access: `"--enable-tools", "listTableNames, getTableMetadata, query"`)
81-
- If resources is not used, add `"--resource", "false"`.
82-
- If prompts is not used, add `"--prompt", "false"`.
83-
84-
## How to build
85-
86-
```bash
87-
cd tsurugi-mcp-server
88-
./gradlew shadowJar
89-
ls build/libs/
90-
```
91-
92-
## How to test
93-
94-
```bash
95-
cd tsurugi-mcp-server
96-
./gradlew test -Pdbtest.endpoint=tcp://localhost:12345
97-
```
98-
99-
## License
100-
101-
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
1+
# tsurugi-mcp-server
2+
3+
[Model Context Protocol](https://github.com/modelcontextprotocol) server to access [Tsurugi](https://github.com/project-tsurugi/tsurugidb).
4+
5+
## Limitations
6+
7+
- Tsurugi 1.4.0 or later.
8+
- Java21 or later.
9+
10+
## Components
11+
12+
### Tools
13+
14+
- `listTableNames`
15+
- list table names.
16+
- `getTableMetadata`
17+
- get table metadata (table schema).
18+
- parameter
19+
- `tableName` - table name (string, required)
20+
- `query`
21+
- execute SQL (select).
22+
- parameter
23+
- `sql` - SQL (string, required)
24+
- `transaction_type` - `OCC`, `LTX`, `RTX`. (string, default: `RTX`)
25+
- `cursor` - To continue the previous query. (string)
26+
- If there is a continuation, `nextCursor` is returned.
27+
- `update`
28+
- execute SQL (insert, update, delete).
29+
- parameter
30+
- `sql` - SQL (string, required)
31+
- `transaction_type` - `OCC`, `LTX`. (string, default: `OCC`)
32+
- `write_preserve` - write preserve table names. (string, required when `transaction_type` is `LTX`)
33+
- `executeDdl`
34+
- execute DDL (create, drop)
35+
- parameter
36+
- `sql` - SQL (string, required)
37+
- `transaction_type` - `OCC`, `LTX`. (string, default: `OCC`)
38+
39+
### Resources
40+
41+
- table metadata
42+
43+
### Prompts
44+
45+
- `tableList-prompt`
46+
- Prompt to display the list of tables.
47+
- `tableMetadata-prompt`
48+
- Prompt to display the table metadata.
49+
- `query-prompt`
50+
- Prompt to display the table data.
51+
52+
## Configuration
53+
54+
### Usage with Claude Desktop
55+
56+
First, download the tsurugi-mcp-server jar file from [release page](https://github.com/project-tsurugi/tsurugi-mcp-server/releases).
57+
58+
To use this server with the [Claude Desktop](https://claude.ai/download), add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`:
59+
60+
```json
61+
{
62+
"mcpServers": {
63+
"tsurugidb": {
64+
"command": "java",
65+
"args": [
66+
"-jar",
67+
"/path/to/tsurugi-mcp-server-all.jar",
68+
"-c", "tcp://localhost:12345"
69+
]
70+
}
71+
}
72+
}
73+
```
74+
75+
- `command`
76+
- If the `java` command is not included in the PATH, specify the full path. (e.g., `"C:/Program Files/Java/jdk-21/bin/java"`)
77+
- `args`
78+
- Specify the jar file by full path.
79+
- `-c` or `--connection` - the endpoint URL to connect Tsurugi. (required)
80+
- If you want to limit the tools used, add `--enable-tools`. (e.g., for read-only access: `"--enable-tools", "listTableNames, getTableMetadata, query"`)
81+
- If resources is not used, add `"--resource", "false"`.
82+
- If prompts is not used, add `"--prompt", "false"`.
83+
84+
## How to build
85+
86+
```bash
87+
cd tsurugi-mcp-server
88+
./gradlew shadowJar
89+
ls build/libs/
90+
```
91+
92+
## How to test
93+
94+
```bash
95+
cd tsurugi-mcp-server
96+
./gradlew test -Pdbtest.endpoint=tcp://localhost:12345
97+
```
98+
99+
## License
100+
101+
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group = 'com.tsurugidb.mcp'
9-
version = '0.1.0-SNAPSHOT'
9+
version = '0.1.0'
1010

1111
java {
1212
toolchain {
@@ -39,7 +39,7 @@ repositories {
3939

4040
dependencies {
4141
implementation 'io.modelcontextprotocol.sdk:mcp:0.8.1'
42-
implementation 'com.tsurugidb.iceaxe:iceaxe-core:1.9.0-SNAPSHOT'
42+
implementation 'com.tsurugidb.iceaxe:iceaxe-core:1.9.0'
4343
implementation 'com.beust:jcommander:1.82'
4444
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.19.0'
4545
implementation "org.slf4j:slf4j-simple:2.0.17"
Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
1-
/*
2-
* Copyright 2025 Project Tsurugi.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
package com.tsurugidb.mcp.server;
17-
18-
import com.fasterxml.jackson.databind.ObjectMapper;
19-
import com.tsurugidb.mcp.server.dao.SessionPool;
20-
21-
import io.modelcontextprotocol.server.McpServer;
22-
import io.modelcontextprotocol.server.McpSyncServer;
23-
import io.modelcontextprotocol.spec.McpSchema.ServerCapabilities;
24-
import io.modelcontextprotocol.spec.McpServerTransportProvider;
25-
26-
public class TsurugiMcpServer {
27-
28-
public static final String SERVER_NAME = "tsurugi-mcp-server";
29-
public static final String SERVER_VERSION = "0.1.0";
30-
31-
public static McpSyncServer syncServer(McpServerTransportProvider transportProvider, ObjectMapper objectMapper, Arguments arguments, SessionPool pool) {
32-
var tools = TsurugiMcpTool.syncTools(objectMapper, arguments, pool);
33-
var resources = new TsurugiMcpResource(objectMapper, arguments, pool).syncResources();
34-
var prompts = new TsurugiMcpPrompt(arguments).syncPrompts();
35-
36-
var capabilities = ServerCapabilities.builder();
37-
if (!tools.isEmpty()) {
38-
capabilities.tools(false);
39-
}
40-
if (!resources.isEmpty()) {
41-
capabilities.resources(false, false);
42-
}
43-
if (!prompts.isEmpty()) {
44-
capabilities.prompts(false);
45-
}
46-
// capabilities.logging();
47-
48-
var server = McpServer.sync(transportProvider) //
49-
.serverInfo(SERVER_NAME, SERVER_VERSION) //
50-
.capabilities(capabilities.build()) //
51-
.tools(tools) //
52-
.resources(resources) //
53-
.prompts(prompts) //
54-
.build();
55-
return server;
56-
}
57-
}
1+
/*
2+
* Copyright 2025 Project Tsurugi.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.tsurugidb.mcp.server;
17+
18+
import com.fasterxml.jackson.databind.ObjectMapper;
19+
import com.tsurugidb.mcp.server.dao.SessionPool;
20+
21+
import io.modelcontextprotocol.server.McpServer;
22+
import io.modelcontextprotocol.server.McpSyncServer;
23+
import io.modelcontextprotocol.spec.McpSchema.ServerCapabilities;
24+
import io.modelcontextprotocol.spec.McpServerTransportProvider;
25+
26+
public class TsurugiMcpServer {
27+
28+
public static final String SERVER_NAME = "tsurugi-mcp-server";
29+
public static final String SERVER_VERSION = "0.1.0";
30+
31+
public static McpSyncServer syncServer(McpServerTransportProvider transportProvider, ObjectMapper objectMapper, Arguments arguments, SessionPool pool) {
32+
var tools = TsurugiMcpTool.syncTools(objectMapper, arguments, pool);
33+
var resources = new TsurugiMcpResource(objectMapper, arguments, pool).syncResources();
34+
var prompts = new TsurugiMcpPrompt(arguments).syncPrompts();
35+
36+
var capabilities = ServerCapabilities.builder();
37+
if (!tools.isEmpty()) {
38+
capabilities.tools(false);
39+
}
40+
if (!resources.isEmpty()) {
41+
capabilities.resources(false, false);
42+
}
43+
if (!prompts.isEmpty()) {
44+
capabilities.prompts(false);
45+
}
46+
// capabilities.logging();
47+
48+
var server = McpServer.sync(transportProvider) //
49+
.serverInfo(SERVER_NAME, SERVER_VERSION) //
50+
.capabilities(capabilities.build()) //
51+
.tools(tools) //
52+
.resources(resources) //
53+
.prompts(prompts) //
54+
.build();
55+
return server;
56+
}
57+
}

0 commit comments

Comments
 (0)