akshare_mcp/lib.rs
1//! # akshare-mcp
2//!
3//! MCP (Model Context Protocol) server for [akshare-rs](https://github.com/akfamily/akshare-rs).
4//! Provides 42 tools covering A-share, HK, US stocks, funds, bonds, futures,
5//! options, forex, crypto, macro data, economy, and news.
6//!
7//! ## Quick Start
8//!
9//! ```bash
10//! # Run as stdio MCP server
11//! cargo run -p akshare-mcp -- stdio
12//!
13//! # Run as HTTP/SSE MCP server
14//! cargo run -p akshare-mcp -- http --config config.toml
15//! ```
16//!
17//! ## Transport Modes
18//!
19//! - **stdio**: Standard input/output, ideal for local integration with AI assistants
20//! - **HTTP/SSE**: Streamable HTTP with optional `X-MCP-KEY` header authentication
21//!
22//! ## Configuration
23//!
24//! HTTP mode reads `config.toml`:
25//!
26//! ```toml
27//! [http]
28//! bind = "127.0.0.1:8080"
29//! mcp_key = "your-secret-key"
30//! ```
31
32#![allow(clippy::missing_errors_doc, clippy::doc_markdown)]
33
34pub mod auth;
35pub mod config;
36pub mod tools;