Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributing #30

Closed
4 of 7 tasks
jurasofish opened this issue Dec 1, 2024 · 1 comment
Closed
4 of 7 tasks

Contributing #30

jurasofish opened this issue Dec 1, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@jurasofish
Copy link
Contributor

jurasofish commented Dec 1, 2024

Hey! Awesome project, I am literally in the middle of building something pretty much the same as this - but this is better. I'd love to take my efforts and incorporate them into this project. Are you open to contributions?

Some things I'd love to add immediately

  • strict mypy
  • Clear docs on logging - since the MCP server runs in the background it's nice to log to a file you can tail, having a nice recipe for this in the docs would be great
  • Ability to have the server log every request and response so you can watch things as they happen
  • (Handle complex inputs #31) Ensure use of x: Annotated[int, Field(description="...")] results in the description in the json schema (looks like it already does but just needs some tests)
  • (Handle complex inputs #31) Handle complex inputs like x: list[int], x: list[str] | str | None, x: MyModel - this is actually hard because at least with claude desktop it seems unable to output anything other than an object mapping from string to string/float/number - so lists/nulls/sub-models end up output as json strings and thus fail validation. I have code that does this that I can contribute, I can see how it would fit into FastMCP without much trouble, just need to rework the use of validate_call
  • (Handle complex inputs #31) Handle things like x: Annotated[int, Field(1)]\n y: int so like required arg after one with a "default" via pydantic's Field.
  • (Handle complex inputs #31) Remove context items from the generated JSON schema

less critical things

  • docs on how to test tools/resources/etc with FastMCP
  • middleware, to inject things into requests/responses. For example, I might like to inject into every response how many characters are in it. Or I might like to transform certain inputs before they're handled for all tools. Possibly overkill
  • maybe dependency injection. Handy for testing (better typing than overriding env vars), handy in cases where various args need to validate things against some common state. Possibly overkill
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels Dec 1, 2024
@jlowin
Copy link
Owner

jlowin commented Dec 1, 2024

@jurasofish that all sounds awesome! Would welcome contributions.

I actually didn’t look closely enough to realize that the input spec was so limited and would love to expand it. ControlFlow may have some helpful code, though it doesn’t have the issue of non-structured inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants