搜索结果

关键词 "bash" 的搜索结果, 共 17 条, 只显示前 480

Database Mcp

Database Mcp

# Database MCP Service A MCP (Metoro Control Protocol) service with database capabilities, supporting multiple database types through GORM. ## Features - Support for multiple database types: - MySQL - PostgreSQL - SQLite - SQL Server - ClickHouse - Configuration through: - Configuration file (YAML) - Command line arguments - Environment variables - MCP protocol integration - GORM ORM support ## Installation 1. Clone the repository 2. Install dependencies: ```bash go mod tidy ``` ## Configuration ### Configuration File (config.yaml) Create a `config.yaml` file with the following structure: ```yaml database: type: "mysql" # mysql, postgres, sqlite, sqlserver, clickhouse host: "localhost" port: 3306 username: "root" password: "password" database: "mydb" ssl_mode: "disable" # for postgres file: "database.db" # for sqlite ``` ### Command Line Arguments You can override configuration file settings using command line arguments: ```bash ./database-mcp --config=config.yaml \ --db-type=mysql \ --db-host=localhost \ --db-port=3306 \ --db-user=root \ --db-pass=password \ --db-name=mydb \ --db-ssl-mode=disable \ --db-file=database.db ``` Available command line arguments: - `--config`: Path to config file (default: "config.yaml") - `--db-type`: Database type (mysql, postgres, sqlite, sqlserver, clickhouse) - `--db-host`: Database host - `--db-port`: Database port - `--db-user`: Database username - `--db-pass`: Database password - `--db-name`: Database name - `--db-ssl-mode`: SSL mode (for PostgreSQL) - `--db-file`: Database file (for SQLite) ## Usage 1. Start the service: ```bash ./database-mcp ``` 2. The service will: - Load configuration from file and/or command line - Initialize database connection - Start MCP server - Register available tools and resources ## MCP Configuration To use the MCP service, configure the MCP endpoint in your MCP client: ``` http://127.0.0.1:8080/sse ``` This will connect your MCP client to the local service running on port 8080. ## MCP Tools The service provides the following MCP tools: 1. `get_tables`: Get all tables in the database - Returns a list of tables with their names and comments 2. `get_table_detail`: Get detailed information about a specific table - Arguments: - `table_name`: The name of the table to get details for - Returns table information including: - Table name and comment - Column information (name, type, comment, nullable, default value) 3. `execute_sql`: Execute a SQL query - Arguments: - `query`: The SQL query to execute - Returns: - For SELECT queries: An array of results - For other queries: The number of rows affected ## License MIT License

Xueqiu MCP

Xueqiu MCP

# Xueqiu MCP 基于雪球API的MCP服务,让您通过Claude或其他AI助手轻松获取股票数据。 ## 项目简介 本项目基于[pysnowball](https://github.com/uname-yang/pysnowball)封装了雪球API,并通过MCP协议提供服务,使您能够在Claude等AI助手中直接查询股票数据。 ## 安装方法 本项目使用`uv`进行依赖管理。请按照以下步骤进行安装: ```bash # 克隆仓库 git clone https://github.com/liqiongyu/xueqiu_mcp.git cd xueqiu_mcp # 使用uv安装依赖 uv venv && uv pip install -e . ``` ## 配置 ### 配置雪球Token 1. 在项目根目录创建`.env`文件 2. 添加以下内容: ``` XUEQIU_TOKEN=您的雪球token ``` * 快捷方式: ```bash echo 'XUEQIU_TOKEN="xq_a_token=xxxxx;u=xxxx"' > .env ``` 关于如何获取雪球token,请参考[pysnowball文档](https://github.com/uname-yang/pysnowball/blob/master/how_to_get_token.md)。 ## 运行服务 使用以下命令启动MCP服务: ```bash uv --directory /path/to/xueqiu_mcp run main.py ``` 或者,如果您已经配置了Claude Desktop: ```json "xueqiu-mcp": { "args": [ "--directory", "/path/to/xueqiu_mcp", "run", "main.py" ], "command": "uv" } ``` ## 功能特性 - 获取股票实时行情 - 查询指数收益 - 获取深港通/沪港通北向数据 - 基金相关数据查询 - 关键词搜索股票代码 ## 展示图 ![image](./images/cursor_mcp.png) ![image](./images/claude_mcp.png) ## 致谢 - [pysnowball](https://github.com/uname-yang/pysnowball) - 雪球股票数据接口的Python版本 - [fastmcp](https://github.com/fastmcp) - MCP服务框架 ## 许可证 [MIT License](./LICENSE)

只显示前20页数据,更多请搜索