Skip to content

Commit 8079896

Browse files
Initial commit: MCP Wingspan server with normalized data
0 parents  commit 8079896

File tree

19 files changed

+97389
-0
lines changed

19 files changed

+97389
-0
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo" # 🦀 tells Dependabot to manage Rust crates
4+
directory: "/" # path where Cargo.toml is located (root)
5+
schedule:
6+
interval: "weekly" # runs every week
7+
open-pull-requests-limit: 10 # keeps up to 10 PRs open at once

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# .github/workflows/ci.yml
2+
name: Rust CI
3+
4+
on:
5+
push:
6+
branches: [main, master, develop] # keep develop if you use it
7+
pull_request:
8+
branches: [main, master, develop]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
env:
15+
CARGO_TERM_COLOR: always
16+
RUSTFLAGS: -D warnings
17+
RUSTDOCFLAGS: -D warnings
18+
19+
jobs:
20+
check:
21+
name: Lint & Check
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: dtolnay/rust-toolchain@stable
26+
with:
27+
components: rustfmt, clippy
28+
- uses: Swatinem/rust-cache@v2
29+
- run: cargo fmt --all -- --check
30+
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
31+
- run: cargo check --workspace --all-features --locked
32+
33+
test:
34+
name: Tests (${{ matrix.os }})
35+
needs: check
36+
runs-on: ${{ matrix.os }}
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
os: [ubuntu-latest, macos-latest, windows-latest]
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: dtolnay/rust-toolchain@stable
44+
- uses: Swatinem/rust-cache@v2
45+
- run: cargo test --workspace --all-targets --all-features --locked
46+
47+
build:
48+
name: Build & Artifact (${{ matrix.os }})
49+
needs: test
50+
runs-on: ${{ matrix.os }}
51+
strategy:
52+
matrix:
53+
os: [ubuntu-latest, macos-latest, windows-latest]
54+
steps:
55+
- uses: actions/checkout@v4
56+
- uses: dtolnay/rust-toolchain@stable
57+
- uses: Swatinem/rust-cache@v2
58+
- run: cargo build --release --workspace --locked --verbose
59+
- name: Upload binaries
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: ${{ matrix.os }}-binaries
63+
path: target/release/*
64+
if-no-files-found: warn

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Rust
2+
/target/
3+
**/*.rs.bk
4+
*.pdb
5+
Cargo.lock
6+
7+
# IDE
8+
.idea/
9+
.vscode/
10+
*.swp
11+
*.swo
12+
*~
13+
14+
# OS
15+
.DS_Store
16+
Thumbs.db
17+
18+
# Logs
19+
*.log
20+

Cargo.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[package]
2+
name = "mcp-wingspan"
3+
version = "0.1.0"
4+
edition = "2021"
5+
description = "An MCP (Model Context Protocol) server implementation in Rust"
6+
authors = ["Your Name <your.email@example.com>"]
7+
8+
[dependencies]
9+
tokio = { version = "1", features = ["full"] }
10+
serde = { version = "1.0", features = ["derive"] }
11+
serde_json = "1.0"
12+
anyhow = "1.0"
13+
tracing = "0.1"
14+
tracing-subscriber = { version = "0.3", default-features = false, features = ["env-filter", "fmt"] }
15+
rmcp = { version = "0.8.5", features = ["transport-streamable-http-server"] }
16+
axum = "0.8.6"
17+
tower = "0.5.2"
18+
tower-http = "0.6.6"
19+
20+
[[bin]]
21+
name = "mcp-wingspan"
22+
path = "src/main.rs"
23+

README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# MCP Wingspan
2+
3+
An MCP (Model Context Protocol) server implementation in Rust.
4+
5+
## Overview
6+
7+
MCP Wingspan is a Model Context Protocol server that provides tools and resources for AI applications. It demonstrates how to build an MCP server using Rust.
8+
9+
## Features
10+
11+
- Echo tool: Echo back input messages
12+
- Greet tool: Greet someone by name
13+
- Example resource: Provides example resource data
14+
15+
## Building
16+
17+
```bash
18+
cargo build --release
19+
```
20+
21+
## Running
22+
23+
```bash
24+
cargo run
25+
```
26+
27+
Or run the release binary:
28+
29+
```bash
30+
./target/release/mcp-wingspan
31+
```
32+
33+
## Development
34+
35+
```bash
36+
# Run with debug logging
37+
RUST_LOG=debug cargo run
38+
```
39+
40+
## CI/CD
41+
42+
This project uses GitHub Actions for continuous integration:
43+
44+
- **CI Workflow** (`.github/workflows/ci.yml`): Comprehensive CI pipeline that:
45+
- Tests on multiple platforms (Linux, macOS, Windows)
46+
- Tests on multiple Rust versions (stable, beta, nightly)
47+
- Runs code formatting checks
48+
- Runs Clippy linter
49+
- Builds and tests the project
50+
51+
- **Rust Workflow** (`.github/workflows/rust.yml`): Simplified workflow for quick checks on Ubuntu
52+
53+
- **Dependabot** (`.github/dependabot.yml`): Automatically updates dependencies weekly
54+
55+
## Project Structure
56+
57+
```
58+
mcp-wingspan/
59+
├── .github/
60+
│ ├── workflows/ # GitHub Actions workflows
61+
│ │ ├── ci.yml # Comprehensive CI pipeline
62+
│ │ └── rust.yml # Simplified Rust workflow
63+
│ └── dependabot.yml # Dependabot configuration
64+
├── Cargo.toml # Project dependencies and metadata
65+
├── README.md # This file
66+
├── src/
67+
│ └── main.rs # Main server implementation
68+
└── .gitignore # Git ignore rules
69+
```
70+
71+
## License
72+
73+
[Add your license here]
74+

0 commit comments

Comments
 (0)