feat(skills): add comprehensive FastMCP skill for MCP server development#24
feat(skills): add comprehensive FastMCP skill for MCP server development#24
Conversation
Includes: - Python and TypeScript examples for all core concepts - FastMCP v2 and v3 beta coverage with migration guide - Integration with creating-skills workflow - Complete integration test suite (10 tests) - 45 Python examples, 9 TypeScript examples - 5,518 words of comprehensive content Features: - Tools, Resources, Prompts, and Context implementation - Claude Desktop integration (CLI and manual config) - Authentication and security (OAuth, token verification) - Production deployment (STDIO, HTTP, SSE transports) - Common pitfalls and troubleshooting - Complete code examples and templates Testing: - ✅ All 7 validation tests passing - ✅ Frontmatter validation - ✅ Required sections present - ✅ Multi-language examples (Python + TypeScript) - ✅ Substantial content (5,518 words) Documentation: - Updated skills/README.md with fastmcp entry - Updated skill count (30 → 31) - Added comprehensive CHANGELOG entry - Included implementation plan and test suite Co-Authored-By: Nori <contact@tilework.tech> 🤖 Generated with [Nori](https://nori.ai) Co-Authored-By: Nori <contact@tilework.tech>
🔍 PR Validation ReportStatus: ✅ All Checks Passed Changes Summary
Skill Validation✅ All skill files are properly structured This is an automated validation. Issues are advisory and do not block merging. |
…with [Nori](https://nori.ai)\n\nCo-Authored-By: Nori <contact@tilework.tech>
Summary of ChangesHello @enuno, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant new skill designed to empower developers in building and deploying Model Context Protocol (MCP) servers using the FastMCP framework. It provides a structured, step-by-step guide covering everything from initial setup and core concepts to advanced patterns, authentication, and production deployment. The addition aims to streamline the creation of LLM-executable functions, data resources, and reusable prompts, thereby enhancing the platform's capabilities for developing sophisticated AI-powered tools. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🔍 PR Validation ReportStatus: ✅ All Checks Passed Changes Summary
Skill Validation✅ All skill files are properly structured This is an automated validation. Issues are advisory and do not block merging. |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive and well-documented FastMCP skill, complete with extensive examples, testing, and an implementation plan. The documentation is thorough and provides significant value. My review focuses on improving the portability, correctness, and robustness of the new files. I've identified a critical resource leak in a Python code example and several medium-severity issues, including hardcoded absolute paths in documentation, incomplete code snippets, and opportunities to improve shell script robustness. Addressing these points will enhance the quality and maintainability of this new skill.
| if not os.access(abs_path, os.R_OK): | ||
| raise ResourceError("Access denied: insufficient permissions") | ||
|
|
||
| return open(abs_path).read() |
There was a problem hiding this comment.
The file is opened with open() but never explicitly closed. This can lead to a resource leak, especially if an error occurs before the function returns. It's a best practice to use a with statement to ensure the file is closed automatically, even in case of exceptions.
| return open(abs_path).read() | |
| with open(abs_path, 'r') as f: | |
| return f.read() |
| 4. **Integration Test with creating-skills workflow**: Verify the skill follows Nori skill creation patterns | ||
| - Test: Skill has proper frontmatter, `<required>` blocks, and structure | ||
| - Expected: Matches pattern from other skills in `/home/elvis/.claude/skills/` |
There was a problem hiding this comment.
This implementation plan contains hardcoded, user-specific absolute paths (e.g., /home/elvis/...). This makes the document difficult for other developers to use or reference. It's a good practice to use relative paths or placeholders to ensure documentation is portable.
This issue appears in multiple places, including lines 75, 252, 259, and 292-294.
| |----|------|---|-------|------| | ||
| | #452 | 10:14 PM | 🟣 | FastMCP Skill Implemented and Committed | ~693 | | ||
| | #446 | 10:12 PM | 🟣 | FastMCP Development Skill Implementation Complete | ~971 | | ||
| | #443 | 10:07 PM | ✅ | Validation Test Suite Created for FastMCP Skill | ~654 | |
There was a problem hiding this comment.
This file is missing a newline character at the end. POSIX standards recommend that text files end with a newline. Some tools and version control systems might have issues with files that don't, and it can make file concatenation behave unexpectedly.
| | #443 | 10:07 PM | ✅ | Validation Test Suite Created for FastMCP Skill | ~654 | | |
| </claude-mem-context> | |
| // ❌ BAD: Relative path | ||
| "args": ["fastmcp", "run", "./server.py"] |
There was a problem hiding this comment.
The comments // are not valid in standard JSON. While some editors or parsers might support JSON with Comments (JSONC), the code block is tagged as json. This can cause parsing errors for tools that expect strict JSON. For clarity and compatibility, I recommend removing the comments.
| // ❌ BAD: Relative path | |
| "args": ["fastmcp", "run", "./server.py"] | |
| "args": ["fastmcp", "run", "./server.py"] |
| ```python | ||
| # ✅ GOOD: Explicit parameters with types | ||
| @mcp.tool() | ||
| def process(data: list[str], options: dict[str, any] = {}) -> dict: |
There was a problem hiding this comment.
The type hint any is used here, but any is a built-in function in Python. The correct type hint for an arbitrary type is Any from the typing module. Using the correct type hint improves code clarity and allows static type checkers to work correctly. You'll also need to import Any from typing at the beginning of the script.
| def process(data: list[str], options: dict[str, any] = {}) -> dict: | |
| def process(data: list[str], options: dict[str, Any] = {}) -> dict: |
| - Tools: /home/elvis/.claude/skills/fastmcp/SKILL.md#tools | ||
| - Resources: /home/elvis/.claude/skills/fastmcp/SKILL.md#resources | ||
| - Authentication: /home/elvis/.claude/skills/fastmcp/SKILL.md#authentication |
There was a problem hiding this comment.
These links contain hardcoded, user-specific absolute paths (e.g., /home/elvis/...). This makes the documentation not portable and will lead to broken links for other users. Please use relative anchor links instead.
| - Tools: /home/elvis/.claude/skills/fastmcp/SKILL.md#tools | |
| - Resources: /home/elvis/.claude/skills/fastmcp/SKILL.md#resources | |
| - Authentication: /home/elvis/.claude/skills/fastmcp/SKILL.md#authentication | |
| - Tools: #tools | |
| - Resources: #resources | |
| - Authentication: #authentication |
| #!/bin/bash | ||
| # run_validation_tests.sh | ||
|
|
There was a problem hiding this comment.
For better portability and robustness, consider these improvements:
- Shebang: Use
#!/usr/bin/env bashfor better portability, as it findsbashin the user'sPATH. - Error Handling: Add
set -euo pipefailat the start of your script. This makes it more robust by ensuring it exits on errors, unset variables, or pipeline failures.
| #!/bin/bash | |
| # run_validation_tests.sh | |
| #!/usr/bin/env bash | |
| # run_validation_tests.sh | |
| set -euo pipefail |
|
|
||
| # Compare with builder-role-skill structure | ||
| diff -y --suppress-common-lines \ | ||
| <(grep '^#' /home/elvis/.claude/skills/builder-role-skill/SKILL.md) \ |
There was a problem hiding this comment.
This test command includes a hardcoded, user-specific absolute path (/home/elvis/...). This makes the test case difficult for other developers to understand or run. Please replace it with a placeholder like <path-to-skills-repo> to make it generic.
| <(grep '^#' /home/elvis/.claude/skills/builder-role-skill/SKILL.md) \ | |
| <(grep '^#' <path-to-repo>/skills/builder-role-skill/SKILL.md) \ |
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||||||
- Added fastmcp skill entry in alphabetical order - Included description: MCP server development with FastMCP framework - Use cases: Creating MCP servers, Claude Desktop integration, Python + TypeScript 🤖 Generated with [Nori](https://nori.ai) Co-Authored-By: Nori <contact@tilework.tech>
🔍 PR Validation ReportStatus: ✅ All Checks Passed Changes Summary
Skill Validation✅ All skill files are properly structured This is an automated validation. Issues are advisory and do not block merging. |
User description
Summary
🤖 Generated with Nori
Features Included
Core Concepts with Examples
Integration & Deployment
v2/v3 Coverage
Quality Assurance
Documentation Updates
skills/README.mdwith fastmcp entry (Development Workflow Skills section)Test Plan
File Changes
Related Resources
Share Nori with your team: https://nori.ai
PR Type
Enhancement
Description
Add comprehensive FastMCP skill for MCP server development
Implement core MCP concepts (Tools, Resources, Prompts, Context)
Include production-ready patterns and deployment guidance
Integrate with creating-skills workflow for composable MCP skills
Diagram Walkthrough
File Walkthrough
SKILL.md
Comprehensive FastMCP skill with multi-language examplesskills/fastmcp/SKILL.md
implementations
practices
async/sync)
templates
creation
TypeScript
validation_tests.md
Validation test suite for FastMCP skillskills/fastmcp/validation_tests.md
patterns)
migration)
structure
run_validation_tests.sh
Automated validation test runner scriptskills/fastmcp/run_validation_tests.sh
FASTMCP_SKILL_IMPLEMENTATION_PLAN.md
FastMCP skill implementation plan and strategyFASTMCP_SKILL_IMPLEMENTATION_PLAN.md
CHANGELOG.md
Update changelog with FastMCP skill additionCHANGELOG.md
run_validation_tests.sh
authentication
README.md
Add fastmcp skill to skills directory indexskills/README.md
CLAUDE.md
Auto-generated claude-mem context fileskills/fastmcp/CLAUDE.md