File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ startCommand:
3
3
type : stdio
4
4
configSchema :
5
5
# JSON Schema defining the configuration options for the MCP.
6
- {}
6
+ {
7
+ " YML" :"src/xiyan_mcp_server/config_demo.yml"
8
+ }
7
9
commandFunction :
8
10
# A function that produces the CLI command to start the MCP on stdio.
9
11
|-
@@ -12,7 +14,5 @@ startCommand:
12
14
" args " : [
13
15
" -m" ,
14
16
" xiyan-mcp-server"
15
- ],
16
- " env " : {
17
- }
17
+ ]
18
18
})
Original file line number Diff line number Diff line change @@ -46,12 +46,13 @@ def get_xiyan_config(db_config):
46
46
global_config = get_yml_config ()
47
47
#print(global_config)
48
48
model_config = global_config ['model' ]
49
- global_db_config = global_config ['database' ]
49
+ global_db_config = global_config .get ('database' )
50
+ database_name = global_db_config .get ('database' ,'' )
50
51
global_xiyan_db_config = get_xiyan_config (global_db_config )
51
52
dialect = global_db_config .get ('dialect' ,'mysql' )
52
53
#print("dialect is !!!!"+dialect)
53
54
54
- @mcp .resource (dialect + '://' + global_db_config [ 'database' ] )
55
+ @mcp .resource (dialect + '://' + global_xiyan_db_config )
55
56
async def read_resource () -> str :
56
57
57
58
db_engine = init_db_conn (global_xiyan_db_config )
You can’t perform that action at this time.
0 commit comments