Commit Graph

790 Commits

Author SHA1 Message Date
Marcelo Trylesinski da7e734613 docs: add introductory paragraphs after all headings
Ensure every heading is followed by a paragraph before any code block,
list, table, or other content. Also add this as a documentation guideline
in CLAUDE.md.
2026-02-07 14:44:53 +01:00
Marcelo Trylesinski 392bb35d35 docs: consolidate pytest-examples into single test and add skip tags
Consolidate the separate README.v2.md and docs/ pytest-examples tests
into a single unified test using `find_examples("README.v2.md", "docs/")`.

Add skip tags to pre-existing code blocks that aren't self-contained:
- migration.md: all blocks (before/after migration patterns)
- experimental/*.md: all blocks (experimental API patterns)
- testing.md: test blocks (reference local server module)
- README.v2.md: 4 context-dependent snippets
2026-02-07 14:27:32 +01:00
Marcelo Trylesinski d18a2fd007 docs: use properly typed dict[str, str] in resource return types 2026-02-07 13:24:09 +01:00
Marcelo Trylesinski 2932236252 docs: return dicts from resources instead of json.dumps
MCPServer handles serialization, so resources can return dicts
directly instead of calling json.dumps manually.
2026-02-07 13:21:50 +01:00
Marcelo Trylesinski 3da0ebc15c docs: make all code examples self-contained and runnable
Every Python code block in docs pages is now both linted and executed
by pytest-examples.

- Make all concepts.md examples self-contained with proper imports
- Add test_docs_examples_run that executes every doc code block
- Use __name__ override to prevent `if __name__ == "__main__"` blocks
  from starting servers during tests
- Support skip-run/skip-lint prefix tags for future use
- Drop snippet-source from quickstart.md so the example is
  self-contained
2026-02-07 13:20:06 +01:00
Marcelo Trylesinski 9206abd24a docs: add docs pages to pytest-examples and fix code examples
- Add docs/quickstart.md and docs/concepts.md to pytest-examples so
  all code blocks in documentation are linted by ruff
- Fix f-string in concepts.md Prompts example that contained backticks
  causing a syntax error when parsed standalone
2026-02-07 13:09:16 +01:00
Marcelo Trylesinski f4e091890d docs: remove placeholder pages, keep only real content
Remove all empty "Under Construction" placeholder pages for server/
and client/ directories. Only pages with actual content should exist.

- Remove docs/server/ and docs/client/ placeholder pages
- Strip mkdocs.yml nav to only pages with real content
- Remove broken links from concepts.md and quickstart.md (replaced
  with TODO comments for when those pages are created)
- Simplify index.md by removing card grid linking to non-existent pages
2026-02-07 13:05:24 +01:00
Marcelo Trylesinski 7fabe3c17f docs: restructure documentation with quickstart, concepts, and new nav
Set up the foundation for migrating documentation from README.v2.md
into proper docs pages served by mkdocs.

- Rewrite `docs/index.md` as a concise landing page with card grid
- Add `docs/quickstart.md` with a complete getting-started guide
- Fill `docs/concepts.md` with protocol architecture, primitives,
  transports, context, and lifecycle overview
- Restructure `mkdocs.yml` nav into Server, Client, and top-level
  sections
- Create `docs/server/` and `docs/client/` directories with
  placeholder pages for upcoming content
- Move `docs/low-level-server.md` to `docs/server/low-level.md`
2026-02-07 13:02:12 +01:00
dependabot[bot] 1a943ad085 chore(deps): bump the uv group across 1 directory with 2 updates (#1961)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-06 09:07:49 +00:00
Max Isbey d3133ae6ce chore: update author metadata to LF Projects (#1992) 2026-02-04 11:01:33 +00:00
Marcelo Trylesinski 1a8c14a5b8 refactor: replace mcp.types as types to from mcp import types (#1986) 2026-02-03 16:42:29 +00:00
Marcelo Trylesinski 4fc49c62bd feat: add ClientRequestContext type alias for client-side handlers (#1989) 2026-02-03 17:37:38 +01:00
Marcelo Trylesinski 74f41ff1ae Add more maintainers to the PyPI metadata (#1976) 2026-02-03 16:19:56 +00:00
Marcelo Trylesinski b1f7eec3cd refactor: split RequestContext between server and client (#1987) 2026-02-03 14:35:07 +01:00
Max Isbey 050aeb6456 Remove unnecessary MCPServer alias (#1984) 2026-02-03 08:59:58 +00:00
Guillaume FORTAINE 71e78842cc feat: add theme field to Icon type for light/dark mode support (#1978) 2026-02-03 09:20:37 +01:00
dependabot[bot] 6f8b791faf chore(deps): bump the github-actions group with 5 updates (#1981)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-01 17:37:01 +01:00
Marcelo Trylesinski 21822053df Support different transports in Client (#1972) 2026-01-30 12:11:27 +00:00
Max Isbey 2137c8fbdb fix: revert README to v1.x documentation on main (#1971)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2026-01-29 20:03:01 +00:00
Max Isbey b38716e5e3 ci: skip Claude code review for Dependabot PRs (#1963) 2026-01-27 13:04:36 +00:00
Marcelo Trylesinski 14744c66c5 Add tests for MCPServer.read_resource exception handling (#1957) 2026-01-27 13:49:06 +01:00
Marcelo Trylesinski 6f0e8e7851 refactor: code style improvements and formatting cleanup (#1962)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 13:48:52 +01:00
Max Isbey 1b5287c727 fix: remove unused requests dependency from simple-chatbot example (#1958) 2026-01-26 14:02:11 +00:00
Marcelo Trylesinski acba5478a9 refactor: McpError renamed to MCPError and flatten parameters (#1956)
Co-authored-by: Max Isbey <224885523+maxisbey@users.noreply.github.com>
2026-01-26 14:37:44 +01:00
Marcelo Trylesinski 65c614e48e Rename FastMCP to MCPServer (#1951) 2026-01-25 14:45:52 +01:00
Max Isbey 4a2d83a0cb ci: skip claude code review for fork PRs (#1952) 2026-01-24 19:22:24 +00:00
Marcelo Trylesinski ce75b2d7d2 refactor: improve type docstrings and remove internal type exports (#1950) 2026-01-24 17:17:09 +01:00
Max Isbey a7ddfdae07 ci: add strict-no-cover to detect unnecessary coverage pragmas (#1897) 2026-01-23 21:00:20 +01:00
Marcelo Trylesinski 3cfdea0e97 refactor: move stdio package to its own module (#1942) 2026-01-23 18:35:05 +01:00
Marcelo Trylesinski a1d330de9f Proper handle extra data in MCP objects (#1937) 2026-01-23 15:35:23 +01:00
Max Isbey 5301298225 Add claude GitHub action (#1922) 2026-01-22 18:43:42 +00:00
Marcelo Trylesinski f0ab53e194 Add meta to Client methods (#1923) 2026-01-22 14:50:39 +01:00
Marcelo Trylesinski d77292fb06 refactor: drop test classes (#1924) 2026-01-22 12:37:52 +01:00
Marcelo Trylesinski 7b728a243e refactor: drop unused logger/logging (#1926) 2026-01-22 11:56:41 +01:00
Marcelo Trylesinski 656f887aff fix: replace http code by jsonrpc (#1920) 2026-01-21 18:37:55 +01:00
Max Isbey 213cf993ca Add conformance testing CI pipeline (#1915) 2026-01-21 16:04:35 +00:00
Marcelo Trylesinski 3bcdc1763f refactor: create the types subpackage, and the jsonrpc module (#1918) 2026-01-21 16:49:07 +01:00
Marcelo Trylesinski ae7793efd6 refactor: avoid double JSON parsing (#1917) 2026-01-21 13:07:05 +01:00
Marcelo Trylesinski 6d463bb353 refactor: replace AnyFunction by proper types (#1916) 2026-01-21 13:06:46 +01:00
Marcelo Trylesinski bcb07c2b25 refactor: flatten the methods in Client (#1914) 2026-01-20 13:12:07 +01:00
Marcelo Trylesinski 3dc8b72041 refactor: replace pydantic_core.from_json by json.loads (#1912) 2026-01-19 20:04:28 +01:00
Max Isbey 34e66a3812 refactor: move streamable HTTP app creation from FastMCP to lowlevel Server (#1899) 2026-01-19 18:48:04 +01:00
Rin 0f9a41d777 chore: include cli and ws extras in dev environment (#1905)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2026-01-19 14:53:08 +01:00
Marcelo Trylesinski 1c258ae203 Don't block the event loop on non-async functions (#1909) 2026-01-19 14:47:37 +01:00
Marcelo Trylesinski 5fdd48a0d3 Completely drop RootModel from types module (#1910) 2026-01-19 14:29:15 +01:00
Marcelo Trylesinski f4672c5084 Drop RootModel from JSONRPCMessage (#1908) 2026-01-19 14:04:15 +01:00
Felix Weinberger dcc9b4f8e0 refactor: use Client class in tests (#1900) 2026-01-17 09:46:58 +01:00
Felix Weinberger d41d0c0128 chore: add D212 lint rule to enforce Google-style docstrings (#1892) 2026-01-16 16:10:52 +00:00
Felix Weinberger df039bf97c Add ergonomic Client class for testing MCP servers (#1870) 2026-01-16 15:49:26 +00:00
Marcelo Trylesinski 8adb5bdce8 refactor: move transport-specific parameters from FastMCP constructor to run() (#1898)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 15:16:20 +00:00