Skip to content

Commit a29c91f

Browse files
committed
Initial commit: Complete MCP Tutorial with documentation and workflows
1 parent c910159 commit a29c91f

File tree

5 files changed

+111
-4
lines changed

5 files changed

+111
-4
lines changed

.github/workflows/docs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ jobs:
2121
run: |
2222
python -m pip install --upgrade pip
2323
pip install -r requirements.txt
24-
pip install mkdocs mkdocs-material jupyter-book
24+
pip install jupyter-book sphinx-rtd-theme sphinx-copybutton
25+
26+
- name: Create resources directory
27+
run: |
28+
mkdir -p resources/images
29+
touch resources/images/logo.png
2530
2631
- name: Build documentation
2732
run: |

.github/workflows/test.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
python-version: [3.8, 3.9, "3.10"]
15+
fail-fast: false
1516

1617
steps:
1718
- uses: actions/checkout@v3
@@ -24,19 +25,28 @@ jobs:
2425
run: |
2526
python -m pip install --upgrade pip
2627
pip install -r requirements.txt
27-
pip install pytest nbval jupyter
28+
pip install pytest nbval jupyter pytest-xdist
29+
30+
- name: Create test directories
31+
run: |
32+
mkdir -p examples/weather_mcp/tests
33+
mkdir -p examples/database_manager/tests
34+
mkdir -p examples/file_processor/tests
35+
touch examples/weather_mcp/tests/__init__.py
36+
touch examples/database_manager/tests/__init__.py
37+
touch examples/file_processor/tests/__init__.py
2838
2939
- name: Test notebooks
3040
run: |
31-
pytest --nbval notebooks/
41+
pytest --nbval-lax notebooks/ -v
3242
3343
- name: Test example projects
3444
run: |
3545
for d in examples/*/; do
3646
if [ -f "$d/requirements.txt" ]; then
3747
cd "$d"
3848
pip install -r requirements.txt
39-
pytest
49+
pytest -v
4050
cd ../..
4151
fi
4252
done

notebooks/_config.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Book settings
2+
title: MCP Tutorial
3+
author: Carlos Ibañez
4+
copyright: "2024"
5+
logo: ../resources/images/logo.png
6+
7+
# Force re-execution of notebooks on each build
8+
execute:
9+
execute_notebooks: force
10+
11+
# Information about where the book exists on the web
12+
repository:
13+
url: https://github.com/CarlosIbCu/mcp-tutorial-complete-guide
14+
branch: main
15+
16+
# Add GitHub buttons to your book
17+
html:
18+
use_issues_button: true
19+
use_repository_button: true
20+
21+
# Add a Table of contents
22+
sphinx:
23+
config:
24+
html_theme_options:
25+
navigation_with_keys: true

notebooks/_toc.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
format: jb-book
2+
root: index
3+
parts:
4+
- caption: Fundamentals
5+
chapters:
6+
- file: fundamentals/01_introduction
7+
- file: fundamentals/02_setup_environment
8+
- file: fundamentals/03_your_first_mcp
9+
- file: fundamentals/04_basic_concepts
10+
- file: fundamentals/05_simple_tools
11+
12+
- caption: Intermediate
13+
chapters:
14+
- file: intermediate/06_error_handling
15+
- file: intermediate/07_async_operations
16+
- file: intermediate/08_state_management
17+
- file: intermediate/09_security
18+
- file: intermediate/10_testing
19+
20+
- caption: Advanced
21+
chapters:
22+
- file: advanced/11_custom_resources
23+
- file: advanced/12_advanced_error_handling
24+
- file: advanced/13_security_auth
25+
- file: advanced/14_advanced_protocol
26+
- file: advanced/15_deployment
27+
- file: advanced/16_tool_composition
28+
- file: advanced/17_state_management

notebooks/index.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Model Context Protocol (MCP) Tutorial
2+
3+
Welcome to the comprehensive guide on Model Context Protocol (MCP) development! This tutorial series, created by Carlos Ibañez, will take you from the basics to advanced implementation of AI tools using MCP.
4+
5+
## What You'll Learn
6+
7+
- 🔧 Build production-ready AI tools and integrations
8+
- 🔐 Implement secure and scalable AI systems
9+
- 🎯 Create reliable tool execution frameworks
10+
- 📊 Develop efficient data processing pipelines
11+
- 🚀 Deploy AI tools in production environments
12+
13+
## How to Use This Guide
14+
15+
This tutorial is organized into three main sections:
16+
17+
1. **Fundamentals**: Perfect for beginners, covering basic concepts and setup
18+
2. **Intermediate**: Diving deeper into error handling, async operations, and testing
19+
3. **Advanced**: Exploring complex topics like custom resources, security, and deployment
20+
21+
## Getting Started
22+
23+
Begin with the [Introduction](fundamentals/01_introduction.ipynb) to understand the basics of MCP and how this tutorial is structured.
24+
25+
## Prerequisites
26+
27+
- Python 3.8 or higher
28+
- Basic understanding of Python programming
29+
- Familiarity with async programming concepts (for intermediate and advanced sections)
30+
31+
## Support
32+
33+
If you find any issues or have questions:
34+
- Open an issue on [GitHub](https://github.com/CarlosIbCu/mcp-tutorial-complete-guide/issues)
35+
- Check our [Contributing Guidelines](https://github.com/CarlosIbCu/mcp-tutorial-complete-guide/blob/main/CONTRIBUTING.md)
36+
37+
## License
38+
39+
This tutorial is licensed under the MIT License. See the [LICENSE](https://github.com/CarlosIbCu/mcp-tutorial-complete-guide/blob/main/LICENSE) file for details.

0 commit comments

Comments
 (0)