├── .github
├── pull_request_template.md
└── workflows
│ ├── mcp_clients_lint.yml
│ ├── mcp_servers_lint.yml
│ └── python-app.yml
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── examples
├── connect-mcp-server
│ ├── .env.example
│ ├── requirements.txt
│ └── script.py
├── function-calling
│ ├── .python-version
│ ├── README.md
│ ├── main.py
│ ├── pyproject.toml
│ └── uv.lock
├── simple-chat-with-toggle
│ ├── .gitignore
│ ├── README.md
│ ├── components.json
│ ├── eslint.config.mjs
│ ├── next.config.ts
│ ├── package-lock.json
│ ├── package.json
│ ├── postcss.config.mjs
│ ├── public
│ │ ├── file.svg
│ │ ├── globe.svg
│ │ ├── next.svg
│ │ ├── vercel.svg
│ │ └── window.svg
│ ├── src
│ │ ├── app
│ │ │ ├── favicon.ico
│ │ │ ├── globals.css
│ │ │ ├── layout.tsx
│ │ │ └── page.tsx
│ │ └── components
│ │ │ ├── ChatInput.tsx
│ │ │ ├── ChatMessage.tsx
│ │ │ └── ui
│ │ │ ├── button.tsx
│ │ │ ├── card.tsx
│ │ │ └── textarea.tsx
│ └── tsconfig.json
└── with_mcp_clients
│ ├── .python-version
│ ├── README.md
│ ├── main.py
│ └── pyproject.toml
├── mcp-clients
├── .dockerignore
├── .env.example
├── .gitignore
├── .python-version
├── Dockerfile.discord
├── Dockerfile.slack
├── Dockerfile.web
├── Dockerfile.whatsapp
├── README-Discord.md
├── README-Slack.md
├── README-Web.md
├── README-WhatsApp.md
├── README.md
├── pyproject.toml
├── src
│ └── mcp_clients
│ │ ├── __init__.py
│ │ ├── base_bot.py
│ │ ├── config.py
│ │ ├── discord_bot.py
│ │ ├── llms
│ │ ├── __init__.py
│ │ ├── anthropic.py
│ │ ├── base.py
│ │ ├── configs.py
│ │ └── openai.py
│ │ ├── local_mcp_servers.json
│ │ ├── mcp_client.py
│ │ ├── slack
│ │ ├── __init__.py
│ │ ├── context.py
│ │ ├── event_routes.py
│ │ ├── interactive_handlers.py
│ │ ├── message_handlers.py
│ │ ├── oauth_routes.py
│ │ └── settings.py
│ │ ├── slack_bot.py
│ │ ├── sse_client.py
│ │ ├── streamable_http_client.py
│ │ ├── web_bot.py
│ │ └── whatsapp_bot.py
└── uv.lock
├── mcp_servers
├── .eslintignore
├── .eslintrc.js
├── .prettierignore
├── .prettierrc.json
├── attio
│ ├── .env.example
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── README.md
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
├── cloudflare
│ └── graphql
│ │ ├── .env.example
│ │ ├── .eslintrc.cjs
│ │ ├── Dockerfile
│ │ ├── index.ts
│ │ ├── package.json
│ │ ├── src
│ │ ├── graphql.app.ts
│ │ ├── graphql.context.ts
│ │ └── tools
│ │ │ └── graphql.tools.ts
│ │ ├── tsconfig.json
│ │ └── types.d.ts
├── confluence
│ ├── Dockerfile
│ ├── requirements.txt
│ ├── server.py
│ └── tools
│ │ ├── __init__.py
│ │ ├── client.py
│ │ ├── comments.py
│ │ ├── config.py
│ │ ├── constants.py
│ │ ├── labels.py
│ │ ├── pages.py
│ │ ├── search.py
│ │ ├── spaces.py
│ │ ├── users.py
│ │ └── utils.py
├── discord
│ ├── .env.example
│ ├── Dockerfile
│ ├── README.md
│ ├── requirements.txt
│ └── server.py
├── figma
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── cli.ts
│ ├── config.ts
│ ├── index.ts
│ ├── mcp.ts
│ ├── package.json
│ ├── server.ts
│ ├── services
│ │ ├── figma.ts
│ │ └── simplify-node-response.ts
│ ├── transformers
│ │ ├── effects.ts
│ │ ├── layout.ts
│ │ └── style.ts
│ ├── tsconfig.json
│ └── utils
│ │ ├── common.ts
│ │ ├── identity.ts
│ │ └── logger.ts
├── firecrawl
│ ├── .env.example
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── README.md
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
├── firecrawl_deep_research
│ ├── .env.example
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── README.md
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
├── github
│ ├── .env.example
│ ├── Dockerfile
│ ├── README.md
│ ├── github-mcp-server
│ ├── go.mod
│ ├── go.sum
│ ├── pkg
│ │ ├── github
│ │ │ ├── code_scanning.go
│ │ │ ├── code_scanning_test.go
│ │ │ ├── helper_test.go
│ │ │ ├── issues.go
│ │ │ ├── issues_test.go
│ │ │ ├── pullrequests.go
│ │ │ ├── pullrequests_test.go
│ │ │ ├── repositories.go
│ │ │ ├── repositories_test.go
│ │ │ ├── repository_resource.go
│ │ │ ├── repository_resource_test.go
│ │ │ ├── search.go
│ │ │ ├── search_test.go
│ │ │ ├── server.go
│ │ │ └── server_test.go
│ │ ├── log
│ │ │ ├── io.go
│ │ │ └── io_test.go
│ │ └── translations
│ │ │ └── translations.go
│ └── server.go
├── gmail
│ ├── Dockerfile
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── index.ts
│ │ └── utl.ts
│ └── tsconfig.json
├── google_calendar
│ ├── .env.example
│ ├── Dockerfile
│ ├── requirements.txt
│ └── server.py
├── google_docs
│ ├── .env.example
│ ├── Dockerfile
│ ├── requirements.txt
│ └── server.py
├── google_drive
│ ├── .env.example
│ ├── Dockerfile
│ ├── requirements.txt
│ ├── server.py
│ └── utils.py
├── google_sheets
│ ├── .env.example
│ ├── Dockerfile
│ ├── models.py
│ ├── requirements.txt
│ ├── server.py
│ └── utils.py
├── google_slides
│ ├── .env.example
│ ├── Dockerfile
│ ├── README.md
│ ├── requirements.txt
│ └── server.py
├── jira
│ ├── Dockerfile
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
├── linear
│ ├── .env.example
│ ├── Dockerfile
│ ├── requirements.txt
│ ├── server.py
│ └── tools
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── comments.py
│ │ ├── issues.py
│ │ ├── projects.py
│ │ └── teams.py
├── markitdown
│ ├── Dockerfile
│ ├── README.md
│ ├── requirements.txt
│ └── server.py
├── notion
│ ├── .dockerignore
│ ├── .env.example
│ ├── .gitignore
│ ├── Dockerfile
│ ├── README.md
│ ├── docker-compose.yml
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ ├── scripts
│ │ ├── build-cli.js
│ │ ├── notion-openapi.json
│ │ └── start-server.ts
│ ├── src
│ │ ├── init-server.ts
│ │ └── openapi-mcp-server
│ │ │ ├── client
│ │ │ ├── __tests__
│ │ │ │ ├── http-client-upload.test.ts
│ │ │ │ ├── http-client.integration.test.ts
│ │ │ │ └── http-client.test.ts
│ │ │ └── http-client.ts
│ │ │ ├── index.ts
│ │ │ ├── mcp
│ │ │ ├── __tests__
│ │ │ │ └── proxy.test.ts
│ │ │ └── proxy.ts
│ │ │ └── openapi
│ │ │ ├── __tests__
│ │ │ ├── file-upload.test.ts
│ │ │ ├── parser-multipart.test.ts
│ │ │ └── parser.test.ts
│ │ │ ├── file-upload.ts
│ │ │ └── parser.ts
│ └── tsconfig.json
├── package-lock.json
├── package.json
├── pandoc
│ ├── .env.example
│ ├── Dockerfile
│ ├── README.md
│ ├── requirements.txt
│ └── server.py
├── perplexity
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
├── postgres
│ ├── .env.example
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── README.md
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
├── report_generation
│ ├── .env.example
│ ├── Dockerfile
│ ├── README.md
│ ├── requirements.txt
│ └── server.py
├── resend
│ ├── .env.example
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── README.md
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
├── salesforce
│ ├── .env.example
│ ├── Dockerfile
│ ├── requirements.txt
│ └── server.py
├── shopify
│ ├── .env.example
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── README.md
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ ├── tools.ts
│ ├── tsconfig.json
│ └── types.ts
├── slack
│ ├── .env.example
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── README.md
│ ├── common
│ │ └── errors.ts
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
├── stripe
│ ├── Dockerfile
│ ├── requirements.txt
│ └── src
│ │ ├── __init__.py
│ │ ├── server.py
│ │ └── tools.py
├── supabase
│ ├── .env.example
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── index.ts
│ │ ├── logs.ts
│ │ ├── management-api
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ ├── password.test.ts
│ │ ├── password.ts
│ │ ├── pg-meta
│ │ │ ├── columns.sql
│ │ │ ├── extensions.sql
│ │ │ ├── index.ts
│ │ │ ├── tables.sql
│ │ │ └── types.ts
│ │ ├── pricing.ts
│ │ ├── regions.test.ts
│ │ ├── regions.ts
│ │ ├── server.test.ts
│ │ ├── server.ts
│ │ ├── sse.ts
│ │ ├── types
│ │ │ └── sql.d.ts
│ │ ├── util.test.ts
│ │ └── util.ts
│ ├── test
│ │ ├── extensions.d.ts
│ │ ├── extensions.ts
│ │ ├── llm.e2e.ts
│ │ └── mocks.ts
│ ├── tsconfig.json
│ ├── tsup.config.ts
│ ├── vitest.setup.ts
│ └── vitest.workspace.ts
├── tsconfig.json
├── wordpress
│ ├── .eslintrc.json
│ ├── Dockerfile
│ ├── README.md
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
└── youtube
│ ├── .env.example
│ ├── Dockerfile
│ ├── README.md
│ ├── requirements.txt
│ └── server.py
├── openapi-config.json
├── openapitools.json
├── package-lock.json
├── sdks
├── openapi-templates
│ └── python-sdk-templates
│ │ ├── LICENSE.mustache
│ │ ├── README.mustache
│ │ ├── README_onlypackage.mustache
│ │ ├── __init__.mustache
│ │ ├── __init__api.mustache
│ │ ├── __init__model.mustache
│ │ ├── __init__package.mustache
│ │ ├── api.mustache
│ │ ├── api_client.mustache
│ │ ├── api_doc.mustache
│ │ ├── api_doc_example.mustache
│ │ ├── api_response.mustache
│ │ ├── asyncio
│ │ └── rest.mustache
│ │ ├── common_README.mustache
│ │ ├── configuration.mustache
│ │ ├── exceptions.mustache
│ │ ├── git_push.sh.mustache
│ │ ├── github-workflow.mustache
│ │ ├── gitignore.mustache
│ │ ├── gitlab-ci.mustache
│ │ ├── model.mustache
│ │ ├── model_anyof.mustache
│ │ ├── model_doc.mustache
│ │ ├── model_enum.mustache
│ │ ├── model_generic.mustache
│ │ ├── model_oneof.mustache
│ │ ├── partial_api.mustache
│ │ ├── partial_api_args.mustache
│ │ ├── partial_header.mustache
│ │ ├── py.typed.mustache
│ │ ├── pyproject.mustache
│ │ ├── python_doc_auth_partial.mustache
│ │ ├── requirements.mustache
│ │ ├── rest.mustache
│ │ ├── setup.mustache
│ │ ├── setup_cfg.mustache
│ │ ├── signing.mustache
│ │ ├── test-requirements.mustache
│ │ ├── tornado
│ │ └── rest.mustache
│ │ ├── tox.mustache
│ │ └── travis.mustache
└── python
│ ├── .github
│ └── workflows
│ │ └── python.yml
│ ├── .gitignore
│ ├── .gitlab-ci.yml
│ ├── .openapi-generator-ignore
│ ├── .openapi-generator
│ ├── FILES
│ └── VERSION
│ ├── .travis.yml
│ ├── LICENSE
│ ├── README.md
│ ├── docs
│ ├── CallToolRequest.md
│ ├── CallToolResponse.md
│ ├── CallToolResult.md
│ ├── CreateServerRequest.md
│ ├── CreateServerResponse.md
│ ├── CreateWhiteLabelingRequest.md
│ ├── GetInstanceResponse.md
│ ├── GetMcpServersResponse.md
│ ├── GetToolsResponse.md
│ ├── GithubOauthApi.md
│ ├── GithubOauthErrorResponse.md
│ ├── GithubOauthSuccessResponse.md
│ ├── HTTPValidationError.md
│ ├── JiraOauthApi.md
│ ├── JiraOauthErrorResponse.md
│ ├── JiraOauthSuccessResponse.md
│ ├── ListToolResponse.md
│ ├── McpServer.md
│ ├── McpServerApi.md
│ ├── NotionOauthApi.md
│ ├── NotionOauthErrorResponse.md
│ ├── NotionOauthSuccessResponse.md
│ ├── ServerName.md
│ ├── ServerTool.md
│ ├── SetAuthTokenRequest.md
│ ├── SlackOauthApi.md
│ ├── SlackOauthErrorResponse.md
│ ├── SlackOauthSuccessResponse.md
│ ├── StatusResponse.md
│ ├── SupabaseOauthApi.md
│ ├── SupabaseOauthErrorResponse.md
│ ├── SupabaseOauthSuccessResponse.md
│ ├── ValidationError.md
│ ├── ValidationErrorLocInner.md
│ ├── WhiteLabelServerName.md
│ ├── WhiteLabelingApi.md
│ ├── WhiteLabelingResponse.md
│ ├── WordpressOauthApi.md
│ ├── WordpressOauthErrorResponse.md
│ └── WordpressOauthSuccessResponse.md
│ ├── git_push.sh
│ ├── klavis
│ ├── __init__.py
│ ├── api
│ │ ├── __init__.py
│ │ ├── github_oauth_api.py
│ │ ├── jira_oauth_api.py
│ │ ├── mcp_server_api.py
│ │ ├── notion_oauth_api.py
│ │ ├── slack_oauth_api.py
│ │ ├── supabase_oauth_api.py
│ │ ├── white_labeling_api.py
│ │ └── wordpress_oauth_api.py
│ ├── api_client.py
│ ├── api_response.py
│ ├── configuration.py
│ ├── exceptions.py
│ ├── models
│ │ ├── __init__.py
│ │ ├── call_tool_request.py
│ │ ├── call_tool_response.py
│ │ ├── call_tool_result.py
│ │ ├── create_server_request.py
│ │ ├── create_server_response.py
│ │ ├── create_white_labeling_request.py
│ │ ├── get_instance_response.py
│ │ ├── get_mcp_servers_response.py
│ │ ├── get_tools_response.py
│ │ ├── github_oauth_error_response.py
│ │ ├── github_oauth_success_response.py
│ │ ├── http_validation_error.py
│ │ ├── jira_oauth_error_response.py
│ │ ├── jira_oauth_success_response.py
│ │ ├── list_tool_response.py
│ │ ├── mcp_server.py
│ │ ├── notion_oauth_error_response.py
│ │ ├── notion_oauth_success_response.py
│ │ ├── server_name.py
│ │ ├── server_tool.py
│ │ ├── set_auth_token_request.py
│ │ ├── slack_oauth_error_response.py
│ │ ├── slack_oauth_success_response.py
│ │ ├── status_response.py
│ │ ├── supabase_oauth_error_response.py
│ │ ├── supabase_oauth_success_response.py
│ │ ├── validation_error.py
│ │ ├── validation_error_loc_inner.py
│ │ ├── white_label_server_name.py
│ │ ├── white_labeling_response.py
│ │ ├── wordpress_oauth_error_response.py
│ │ └── wordpress_oauth_success_response.py
│ ├── py.typed
│ └── rest.py
│ ├── pyproject.toml
│ ├── requirements.txt
│ ├── setup.cfg
│ ├── setup.py
│ ├── test-requirements.txt
│ └── tox.ini
└── static
└── klavis-ai.png
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | ## Description
2 |
3 |
4 | ## Related issue
5 |
6 |
7 |
8 | ## Type of change
9 |
10 | - [ ] Bug fix (non-breaking change which fixes an issue)
11 | - [ ] New MCP feature (non-breaking change which adds functionality)
12 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
13 | - [ ] Documentation update
14 | - [ ] Other (please specify)
15 |
16 | ## How has this been tested?
17 | (Add screenshots or recordings here if applicable.)
18 |
19 |
20 | ## Checklist
21 |
22 | - [ ] I have performed a self-review of my own code
23 | - [ ] I have commented my code, particularly in hard-to-understand areas
24 | - [ ] I have made corresponding changes to the documentation
25 | - [ ] My changes generate no new warnings
26 | - [ ] I have added tests that prove my fix is effective or that my feature works
27 | - [ ] New and existing tests pass locally with my changes
--------------------------------------------------------------------------------
/.github/workflows/python-app.yml:
--------------------------------------------------------------------------------
1 | name: Klavis AI Python SDK Release
2 |
3 | on:
4 | push:
5 | tags:
6 | - 'v*.*.*' # Trigger on tags like v0.1.0, v1.2.3, etc.
7 |
8 | permissions:
9 | contents: write # Needed to create GitHub releases
10 | id-token: write # Needed for trusted publishing to PyPI
11 |
12 | jobs:
13 | deploy:
14 | runs-on: ubuntu-latest
15 | environment: pypi # Add environment name
16 | # Only run this job if the tag matches the version in pyproject.toml
17 | # This requires an extra step to read the version, omitted for simplicity for now
18 | # Add validation if needed: https://github.com/marketplace/actions/check-python-versions
19 |
20 | steps:
21 | - uses: actions/checkout@v4
22 |
23 | - name: Set up Python
24 | uses: actions/setup-python@v5
25 | with:
26 | python-version: '3.12' # Choose a Python version, adjust as needed
27 |
28 | - name: Install dependencies
29 | run: |
30 | python -m pip install --upgrade pip
31 | pip install setuptools wheel twine build
32 | working-directory: ./sdks/python
33 |
34 | - name: Build package
35 | run: python -m build
36 | working-directory: ./sdks/python
37 |
38 | - name: Publish package to PyPI
39 | uses: pypa/gh-action-pypi-publish@release/v1
40 | with:
41 | packages_dir: sdks/python/dist/
42 | # No API token needed with Trusted Publisher
43 |
44 | - name: Create GitHub Release
45 | uses: softprops/action-gh-release@v1
46 | with:
47 | # The release name will be the tag name (e.g., "v0.0.4")
48 | # The body will be auto-generated based on commits since the last tag
49 | generate_release_notes: true
50 | env:
51 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Environment variables
2 | .env
3 |
4 | # Byte-compiled / optimized / DLL files
5 | __pycache__/
6 | *.py[cod]
7 | *$py.class
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 | MANIFEST
27 |
28 | # PyInstaller
29 | # Usually these files are written by a CI script
30 | # One normally never wants to keep them
31 | *.manifest
32 | *.spec
33 |
34 | # Jupyter Notebook
35 | .ipynb_checkpoints
36 |
37 | # Instance Environment
38 | instance/
39 | .webassets-cache
40 |
41 | # Temporary files
42 | *.swp
43 | *~
44 | *.bak
45 | *.tmp
46 |
47 | # OS generated files
48 | .DS_Store
49 | Thumbs.db
50 |
51 | # IDE specific files
52 | .idea/
53 | .vscode/
54 | *.iml
55 | *.project
56 | .classpath
57 | *.launch
58 |
59 | # Node.js
60 | **/node_modules/
61 | npm-debug.log*
62 | yarn-debug.log*
63 | yarn-error.log*
64 | pnpm-debug.log*
65 | lerna-debug.log*
66 | coverage/
67 | dist/
68 | .npm
69 | .yarnrc
70 | .yarn/cache
71 | .yarn/plugnplay
72 | .yarn/unplugged
73 | .pnpm-store/
74 |
75 | # Docker
76 | .docker/
77 |
78 | # Python
79 | .venv/
80 |
81 | # submodules
82 | .gitmodules
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 Klavis AI
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/examples/connect-mcp-server/.env.example:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/examples/connect-mcp-server/.env.example
--------------------------------------------------------------------------------
/examples/connect-mcp-server/requirements.txt:
--------------------------------------------------------------------------------
1 | requests>=2.31.0
2 | python-dotenv>=1.1.0
--------------------------------------------------------------------------------
/examples/connect-mcp-server/script.py:
--------------------------------------------------------------------------------
1 |
2 | """
3 | Simple script to create Klavis MCP server instance and redirect to OAuth authorization.
4 | """
5 |
6 | import requests
7 | import webbrowser
8 | import os
9 | from dotenv import load_dotenv
10 |
11 | load_dotenv()
12 | API_KEY = os.getenv('KLAVIS_API_KEY')
13 |
14 | # Create MCP server instance
15 | def create_mcp_instance(server_name, user_id, platform_name):
16 | url = "https://api.klavis.ai/mcp-server/instance/create"
17 |
18 | headers = {
19 | "Authorization": f"Bearer {API_KEY}",
20 | "Content-Type": "application/json"
21 | }
22 |
23 | data = {
24 | "serverName": server_name,
25 | "userId": user_id,
26 | "platformName": platform_name
27 | }
28 |
29 | response = requests.post(url, headers=headers, json=data)
30 |
31 | result = response.json()
32 | print(result)
33 | return result['instanceId']
34 |
35 |
36 | # Redirect to OAuth authorization page
37 | def redirect_to_oauth(instance_id):
38 | oauth_url = f"https://api.klavis.ai/oauth/github/authorize?instance_id={instance_id}"
39 | webbrowser.open(oauth_url)
40 |
41 | def main():
42 | instance_id = create_mcp_instance("GitHub", "1234", "demo")
43 | redirect_to_oauth(instance_id)
44 |
45 | if __name__ == "__main__":
46 | main()
--------------------------------------------------------------------------------
/examples/function-calling/.python-version:
--------------------------------------------------------------------------------
1 | 3.12
2 |
--------------------------------------------------------------------------------
/examples/function-calling/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/examples/function-calling/README.md
--------------------------------------------------------------------------------
/examples/function-calling/main.py:
--------------------------------------------------------------------------------
1 | import os
2 | from klavis import ApiClient, Configuration
3 | from klavis.api import McpServerApi
4 | from klavis.models import CreateServerRequest, ServerName
5 |
6 | def main():
7 | api_key = os.environ.get("KLAVIS_API_KEY", "YOUR_API_KEY")
8 | if api_key == "YOUR_API_KEY":
9 | print("Warning: API Key not configured. Please set the KLAVIS_API_KEY environment variable or replace 'YOUR_API_KEY'.")
10 |
11 | config = Configuration(
12 | host="https://api.klavis.ai",
13 | api_key=api_key,
14 | )
15 | api_client = ApiClient(config)
16 | mcp_api = McpServerApi(api_client)
17 |
18 | create_request = CreateServerRequest(
19 | server_name=ServerName.GITHUB,
20 | user_id="1234",
21 | platform_name="zihao_test"
22 | )
23 | instance = mcp_api.create_server_instance(create_request)
24 |
25 | print(instance.instance_id)
26 |
27 | if __name__ == "__main__":
28 | main()
29 |
--------------------------------------------------------------------------------
/examples/function-calling/pyproject.toml:
--------------------------------------------------------------------------------
1 | [project]
2 | name = "function-calling"
3 | version = "0.1.0"
4 | description = "Add your description here"
5 | readme = "README.md"
6 | requires-python = ">=3.12"
7 | dependencies = [
8 | "klavis>=0.0.6",
9 | "openai>=1.78.1",
10 | ]
11 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.*
7 | .yarn/*
8 | !.yarn/patches
9 | !.yarn/plugins
10 | !.yarn/releases
11 | !.yarn/versions
12 |
13 | # testing
14 | /coverage
15 |
16 | # next.js
17 | /.next/
18 | /out/
19 |
20 | # production
21 | /build
22 |
23 | # misc
24 | .DS_Store
25 | *.pem
26 |
27 | # debug
28 | npm-debug.log*
29 | yarn-debug.log*
30 | yarn-error.log*
31 | .pnpm-debug.log*
32 |
33 | # env files (can opt-in for committing if needed)
34 | .env*
35 |
36 | # vercel
37 | .vercel
38 |
39 | # typescript
40 | *.tsbuildinfo
41 | next-env.d.ts
42 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2 |
3 | ## Getting Started
4 |
5 | First, run the development server:
6 |
7 | ```bash
8 | npm run dev
9 | # or
10 | yarn dev
11 | # or
12 | pnpm dev
13 | # or
14 | bun dev
15 | ```
16 |
17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18 |
19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20 |
21 | This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22 |
23 | ## Learn More
24 |
25 | To learn more about Next.js, take a look at the following resources:
26 |
27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29 |
30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31 |
32 | ## Deploy on Vercel
33 |
34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35 |
36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
37 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/components.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://ui.shadcn.com/schema.json",
3 | "style": "new-york",
4 | "rsc": true,
5 | "tsx": true,
6 | "tailwind": {
7 | "config": "",
8 | "css": "src/app/globals.css",
9 | "baseColor": "neutral",
10 | "cssVariables": true,
11 | "prefix": ""
12 | },
13 | "aliases": {
14 | "components": "@/components",
15 | "utils": "@/lib/utils",
16 | "ui": "@/components/ui",
17 | "lib": "@/lib",
18 | "hooks": "@/hooks"
19 | },
20 | "iconLibrary": "lucide"
21 | }
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/eslint.config.mjs:
--------------------------------------------------------------------------------
1 | import { dirname } from "path";
2 | import { fileURLToPath } from "url";
3 | import { FlatCompat } from "@eslint/eslintrc";
4 |
5 | const __filename = fileURLToPath(import.meta.url);
6 | const __dirname = dirname(__filename);
7 |
8 | const compat = new FlatCompat({
9 | baseDirectory: __dirname,
10 | });
11 |
12 | const eslintConfig = [
13 | ...compat.extends("next/core-web-vitals", "next/typescript"),
14 | ];
15 |
16 | export default eslintConfig;
17 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/next.config.ts:
--------------------------------------------------------------------------------
1 | import type { NextConfig } from "next";
2 |
3 | const nextConfig: NextConfig = {
4 | /* config options here */
5 | };
6 |
7 | export default nextConfig;
8 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "simple-chat-with-toggle",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev --turbopack",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "@radix-ui/react-slot": "^1.2.3",
13 | "@radix-ui/react-switch": "^1.2.5",
14 | "class-variance-authority": "^0.7.1",
15 | "clsx": "^2.1.1",
16 | "lucide-react": "^0.511.0",
17 | "next": "15.3.2",
18 | "react": "^19.0.0",
19 | "react-dom": "^19.0.0",
20 | "tailwind-merge": "^3.3.0"
21 | },
22 | "devDependencies": {
23 | "@eslint/eslintrc": "^3",
24 | "@tailwindcss/postcss": "^4",
25 | "@types/node": "^20",
26 | "@types/react": "^19",
27 | "@types/react-dom": "^19",
28 | "eslint": "^9",
29 | "eslint-config-next": "15.3.2",
30 | "tailwindcss": "^4",
31 | "tw-animate-css": "^1.3.0",
32 | "typescript": "^5"
33 | },
34 | "packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
35 | }
36 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/postcss.config.mjs:
--------------------------------------------------------------------------------
1 | const config = {
2 | plugins: ["@tailwindcss/postcss"],
3 | };
4 |
5 | export default config;
6 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/public/file.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/public/globe.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/public/next.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/public/vercel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/public/window.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/examples/simple-chat-with-toggle/src/app/favicon.ico
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/src/app/layout.tsx:
--------------------------------------------------------------------------------
1 | import type { Metadata } from "next";
2 | import { Inter } from "next/font/google";
3 | import "./globals.css";
4 |
5 | const inter = Inter({ subsets: ["latin"], variable: "--font-sans" });
6 |
7 | export const metadata: Metadata = {
8 | title: "Simple Chat Playground",
9 | description: "Simple chat interface with toggleable response modes",
10 | };
11 |
12 | export default function RootLayout({
13 | children,
14 | }: Readonly<{
15 | children: React.ReactNode;
16 | }>) {
17 | return (
18 |
19 |
20 | {children}
21 |
22 |
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/src/components/ChatInput.tsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react'
2 | import { Button } from '@/components/ui/button'
3 | import { Textarea } from '@/components/ui/textarea'
4 | import { Send } from 'lucide-react'
5 |
6 | interface ChatInputProps {
7 | onSendMessage: (message: string) => void
8 | isLoading: boolean
9 | }
10 |
11 | export function ChatInput({ onSendMessage, isLoading }: ChatInputProps) {
12 | const [input, setInput] = useState('')
13 |
14 | const handleSubmit = (e: React.FormEvent) => {
15 | e.preventDefault()
16 | if (input.trim() && !isLoading) {
17 | onSendMessage(input)
18 | setInput('')
19 | }
20 | }
21 |
22 | const handleKeyDown = (e: React.KeyboardEvent) => {
23 | if (e.key === 'Enter' && !e.shiftKey) {
24 | e.preventDefault()
25 | handleSubmit(e as unknown as React.FormEvent)
26 | }
27 | }
28 |
29 | return (
30 |
48 | )
49 | }
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/src/components/ChatMessage.tsx:
--------------------------------------------------------------------------------
1 | import { cn } from '@/lib/utils'
2 | import { Card } from '@/components/ui/card'
3 | import { User, Bot } from 'lucide-react'
4 |
5 | export type MessageRole = 'user' | 'assistant'
6 |
7 | export interface Message {
8 | role: MessageRole
9 | content: string
10 | }
11 |
12 | interface ChatMessageProps {
13 | message: Message
14 | }
15 |
16 | export function ChatMessage({ message }: ChatMessageProps) {
17 | const isUser = message.role === 'user'
18 |
19 | return (
20 |
21 |
27 |
31 | {isUser ? (
32 |
33 | ) : (
34 |
35 | )}
36 |
37 | {message.content}
38 |
39 |
40 | )
41 | }
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/src/components/ui/textarea.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | const Textarea = React.forwardRef<
6 | HTMLTextAreaElement,
7 | React.ComponentProps<"textarea">
8 | >(({ className, ...props }, ref) => {
9 | return (
10 |
18 | )
19 | })
20 | Textarea.displayName = "Textarea"
21 |
22 | export { Textarea }
23 |
--------------------------------------------------------------------------------
/examples/simple-chat-with-toggle/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2017",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "noEmit": true,
9 | "esModuleInterop": true,
10 | "module": "esnext",
11 | "moduleResolution": "bundler",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "jsx": "preserve",
15 | "incremental": true,
16 | "plugins": [
17 | {
18 | "name": "next"
19 | }
20 | ],
21 | "paths": {
22 | "@/*": ["./src/*"]
23 | }
24 | },
25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26 | "exclude": ["node_modules"]
27 | }
28 |
--------------------------------------------------------------------------------
/examples/with_mcp_clients/.python-version:
--------------------------------------------------------------------------------
1 | 3.12
2 |
--------------------------------------------------------------------------------
/examples/with_mcp_clients/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/examples/with_mcp_clients/README.md
--------------------------------------------------------------------------------
/examples/with_mcp_clients/main.py:
--------------------------------------------------------------------------------
1 | def main():
2 | print("Hello from with-mcp-clients!")
3 |
4 |
5 | if __name__ == "__main__":
6 | main()
7 |
--------------------------------------------------------------------------------
/examples/with_mcp_clients/pyproject.toml:
--------------------------------------------------------------------------------
1 | [project]
2 | name = "with-mcp-clients"
3 | version = "0.1.0"
4 | description = "Add your description here"
5 | readme = "README.md"
6 | requires-python = ">=3.12"
7 | dependencies = []
8 |
--------------------------------------------------------------------------------
/mcp-clients/.dockerignore:
--------------------------------------------------------------------------------
1 | .venv
2 |
3 | # Python environment
4 | .env
5 | .env.*
6 |
7 | # OS generated files
8 | .DS_Store
9 | *.db
10 |
11 | # IDE specific files
12 | .idea/
13 | .vscode/
14 | *.iml
15 | *.project
16 | .classpath
17 | *.launch
18 |
19 | # Byte-compiled / optimized / DLL files
20 | __pycache__/
21 | *.py[cod]
22 | *$py.class
23 |
24 | # Distribution / packaging
25 | .Python
26 | build/
27 | develop-eggs/
28 | dist/
29 | downloads/
30 | eggs/
31 | .eggs/
32 | lib/
33 | lib64/
34 | parts/
35 | sdist/
36 | var/
37 | wheels/
38 | *.egg-info/
39 | .installed.cfg
40 | *.egg
41 | MANIFEST
42 |
43 | # Testing
44 | .pytest_cache/
45 | test-results/
--------------------------------------------------------------------------------
/mcp-clients/.env.example:
--------------------------------------------------------------------------------
1 | # Discord Bot Token
2 | DISCORD_TOKEN=DISCORD_TOKEN
3 |
4 | # Anthropic API Key
5 | ANTHROPIC_API_KEY=ANTHROPIC_API_KEY
6 |
7 | # OpenAI API Key
8 | OPENAI_API_KEY=OPENAI_API_KEY
9 |
10 | # Google API Key
11 | GEMINI_API_KEY=GEMINI_API_KEY
12 | GEMINI_BASE_URL=GEMINI_BASE_URL
13 |
14 | # Website URL
15 | WEBSITE_URL=WEBSITE_URL
16 |
17 | # Use production database
18 | USE_PRODUCTION_DB=USE_PRODUCTION_DB
19 | # Supabase Credentials (only needed if USE_PRODUCTION_DB is true)
20 | SUPABASE_URL=YOUR_SUPABASE_URL
21 | SUPABASE_API_KEY=YOUR_SUPABASE_API_KEY
22 |
23 | SLACK_BOT_TOKEN=SLACK_BOT_TOKEN
24 | SLACK_APP_TOKEN=SLACK_APP_TOKEN
25 |
26 | SLACK_APP_ID=SLACK_APP_ID
27 | SLACK_CLIENT_ID=SLACK_CLIENT_ID
28 | SLACK_CLIENT_SECRET=SLACK_CLIENT_SECRET
29 | SLACK_SIGNING_SECRET=SLACK_SIGNING_SECRET
30 | SLACK_BOT_USER_ID=SLACK_BOT_USER_ID
31 | SLACK_SCOPES=SLACK_SCOPES # for oauth only
32 |
33 | # WhatsApp API Configuration
34 | WHATSAPP_ACCESS_TOKEN=WHATSAPP_ACCESS_TOKEN
35 | WHATSAPP_APP_ID=WHATSAPP_APP_ID
36 | WHATSAPP_APP_SECRET=WHATSAPP_APP_SECRET
37 | WHATSAPP_PHONE_NUMBER_ID=WHATSAPP_PHONE_NUMBER_ID
38 | WHATSAPP_VERIFY_TOKEN=WHATSAPP_VERIFY_TOKEN
39 | CALLBACK_URL=CALLBACK_URL # for webhook only for localdevelopment connect to ngrok
--------------------------------------------------------------------------------
/mcp-clients/.gitignore:
--------------------------------------------------------------------------------
1 | .env
2 | .venv
3 | __pycache__
--------------------------------------------------------------------------------
/mcp-clients/.python-version:
--------------------------------------------------------------------------------
1 | 3.12
2 |
--------------------------------------------------------------------------------
/mcp-clients/Dockerfile.discord:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 | COPY --from=ghcr.io/astral-sh/uv:0.6.14 /uv /uvx /bin/
3 |
4 | # Set working directory
5 | WORKDIR /app
6 |
7 | # Install required system dependencies
8 | RUN apt-get update && apt-get install -y --no-install-recommends \
9 | gcc \
10 | && apt-get clean \
11 | && rm -rf /var/lib/apt/lists/*
12 |
13 | # Install project dependencies
14 | RUN --mount=type=cache,target=/root/.cache/uv \
15 | --mount=type=bind,source=uv.lock,target=uv.lock \
16 | --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
17 | uv sync --frozen --no-install-project
18 |
19 | # Copy the project into the image
20 | COPY . .
21 |
22 | # Sync the project
23 | RUN --mount=type=cache,target=/root/.cache/uv \
24 | uv sync --frozen
25 |
26 | # Set environment variable to indicate we're running in Docker
27 | ENV RUNNING_IN_DOCKER=true
28 |
29 | # Expose the port the app runs on
30 | EXPOSE 8080
31 |
32 | # Command to run the Discord bot
33 | CMD ["uv", "run", "discord_bot"]
--------------------------------------------------------------------------------
/mcp-clients/Dockerfile.slack:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 | COPY --from=ghcr.io/astral-sh/uv:0.6.14 /uv /uvx /bin/
3 |
4 | # Set working directory
5 | WORKDIR /app
6 |
7 | # Install required system dependencies
8 | RUN apt-get update && apt-get install -y --no-install-recommends \
9 | gcc \
10 | && apt-get clean \
11 | && rm -rf /var/lib/apt/lists/*
12 |
13 | # Install project dependencies
14 | RUN --mount=type=cache,target=/root/.cache/uv \
15 | --mount=type=bind,source=uv.lock,target=uv.lock \
16 | --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
17 | uv sync --frozen --no-install-project
18 |
19 | # Copy the project into the image
20 | COPY . .
21 |
22 | # Sync the project
23 | RUN --mount=type=cache,target=/root/.cache/uv \
24 | uv sync --frozen
25 |
26 | # Set environment variable to indicate we're running in Docker
27 | ENV RUNNING_IN_DOCKER=true
28 |
29 | # Expose the port the app runs on
30 | EXPOSE 8080
31 |
32 | # Command to run the Slack bot
33 | CMD ["uv", "run", "slack_bot"]
--------------------------------------------------------------------------------
/mcp-clients/Dockerfile.web:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 | COPY --from=ghcr.io/astral-sh/uv:0.6.14 /uv /uvx /bin/
3 |
4 | # Set working directory
5 | WORKDIR /app
6 |
7 | # Install required system dependencies
8 | RUN apt-get update && apt-get install -y --no-install-recommends \
9 | gcc \
10 | && apt-get clean \
11 | && rm -rf /var/lib/apt/lists/*
12 |
13 | # Install project dependencies
14 | RUN --mount=type=cache,target=/root/.cache/uv \
15 | --mount=type=bind,source=uv.lock,target=uv.lock \
16 | --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
17 | uv sync --frozen --no-install-project
18 |
19 | # Copy the project into the image
20 | COPY . .
21 |
22 | # Sync the project
23 | RUN --mount=type=cache,target=/root/.cache/uv \
24 | uv sync --frozen
25 |
26 | # Set environment variable to indicate we're running in Docker
27 | ENV RUNNING_IN_DOCKER=true
28 |
29 | # Expose the port the app runs on
30 | EXPOSE 8080
31 |
32 | # Command to run the Web bot
33 | CMD ["uv", "run", "web_bot"]
--------------------------------------------------------------------------------
/mcp-clients/Dockerfile.whatsapp:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 | COPY --from=ghcr.io/astral-sh/uv:0.6.14 /uv /uvx /bin/
3 |
4 | # Set working directory
5 | WORKDIR /app
6 |
7 | # Install required system dependencies
8 | RUN apt-get update && apt-get install -y --no-install-recommends \
9 | gcc \
10 | && apt-get clean \
11 | && rm -rf /var/lib/apt/lists/*
12 |
13 | # Install project dependencies
14 | RUN --mount=type=cache,target=/root/.cache/uv \
15 | --mount=type=bind,source=uv.lock,target=uv.lock \
16 | --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
17 | uv sync --frozen --no-install-project
18 |
19 | # Copy the project into the image
20 | COPY . .
21 |
22 | # Sync the project
23 | RUN --mount=type=cache,target=/root/.cache/uv \
24 | uv sync --frozen
25 |
26 | # Set environment variable to indicate we're running in Docker
27 | ENV RUNNING_IN_DOCKER=true
28 |
29 | # Expose the port the app runs on
30 | EXPOSE 8080
31 |
32 | # Command to run the WhatsApp bot
33 | CMD ["uv", "run", "whatsapp_bot"]
--------------------------------------------------------------------------------
/mcp-clients/README.md:
--------------------------------------------------------------------------------
1 | # MCP Clients
2 |
3 | This directory contains the client implementations for interacting with the Model Context Protocol (MCP).
4 |
5 | ## Available Clients
6 |
7 | * **Discord:** For instructions on setting up and running the Discord bot locally,
8 | see [README-Discord.md](./README-Discord.md).
9 | * **Slack:** For instructions on setting up and running the Slack bot locally, see [README-Slack.md](./README-Slack.md).
10 | * **Web:** For instructions on setting up and running the Web bot locally, see [README-Web.md](./README-Web.md).
11 | * **WhatsApp:** For instructions on setting up and running the WhatsApp bot, see [README-WhatsApp.md](./README-WhatsApp.md).
--------------------------------------------------------------------------------
/mcp-clients/pyproject.toml:
--------------------------------------------------------------------------------
1 | [project]
2 | name = "mcp-clients"
3 | version = "0.1.0"
4 | description = "Klavis AI: Open source MCP clients and Servers"
5 | readme = "README.md"
6 | requires-python = ">=3.12"
7 | dependencies = [
8 | "discord.py>=2.3.0",
9 | "anthropic>=0.49.0",
10 | "python-dotenv>=1.1.0",
11 | "anyio>=4.9.0",
12 | "trio>=0.22.0",
13 | "mcp>=1.8.1",
14 | "supabase>=2.15.0",
15 | "fastapi>=0.115.12",
16 | "uvicorn>=0.34.0",
17 | "slack-bolt>=1.23.0",
18 | "httpx>=0.28.1",
19 | "openai>=1.72.0",
20 | "markitdown[all]",
21 | "pywa>=0.7.0",
22 | "uvloop>=0.17.0",
23 | ]
24 |
25 | [tool.uv]
26 | package = true
27 |
28 | [project.scripts]
29 | discord_bot = "mcp_clients.discord_bot:main"
30 | slack_bot = "mcp_clients.slack_bot:main"
31 | web_bot = "mcp_clients.web_bot:main"
32 | whatsapp_bot = "mcp_clients.whatsapp_bot:main"
--------------------------------------------------------------------------------
/mcp-clients/src/mcp_clients/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/mcp-clients/src/mcp_clients/__init__.py
--------------------------------------------------------------------------------
/mcp-clients/src/mcp_clients/config.py:
--------------------------------------------------------------------------------
1 | """
2 | Configuration module.
3 | """
4 |
5 | import os
6 |
7 | from dotenv import load_dotenv
8 |
9 | load_dotenv()
10 |
11 | # Flag to control whether database operations are performed
12 | # Set to False to skip all database operations
13 | USE_PRODUCTION_DB = os.getenv("USE_PRODUCTION_DB", "False").lower() == "true"
14 |
--------------------------------------------------------------------------------
/mcp-clients/src/mcp_clients/llms/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/mcp-clients/src/mcp_clients/llms/__init__.py
--------------------------------------------------------------------------------
/mcp-clients/src/mcp_clients/llms/configs.py:
--------------------------------------------------------------------------------
1 | from typing import Optional
2 |
3 | from pydantic import BaseModel, Field
4 |
5 |
6 | class BaseLLMConfig(BaseModel):
7 | """
8 | Pydantic model for LLM configuration.
9 | """
10 |
11 | model: Optional[str] = Field(
12 | default=None, description="The name of the model to use."
13 | )
14 | api_key: Optional[str] = Field(
15 | default=None, description="API key for the LLM provider."
16 | )
17 | temperature: float = Field(
18 | default=0, ge=0, le=2, description="Randomness in generation (0 to 2)."
19 | )
20 | max_tokens: int = Field(
21 | default=4000, gt=0, description="The maximum number of tokens to generate."
22 | )
23 |
--------------------------------------------------------------------------------
/mcp-clients/src/mcp_clients/local_mcp_servers.json:
--------------------------------------------------------------------------------
1 | {
2 | "server_urls": []
3 | }
--------------------------------------------------------------------------------
/mcp-clients/src/mcp_clients/slack/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Integration package for Slack MCP client.
3 | """
4 |
--------------------------------------------------------------------------------
/mcp-clients/src/mcp_clients/slack/interactive_handlers.py:
--------------------------------------------------------------------------------
1 | """
2 | Handlers for Slack interactive components like buttons, modals, and other UI elements.
3 | """
4 | import logging
5 |
6 | logger = logging.getLogger("slack_bot")
7 |
8 |
9 | def register_interactive_handlers(app):
10 | """Register all interactive component handlers with the Slack app."""
11 |
12 | @app.action("login_button")
13 | async def handle_login_button(ack, body, logger):
14 | """Handle login button click actions"""
15 | await ack()
16 | logger.info(f"Login button clicked: {body.get('user', {}).get('id')}")
17 |
18 | @app.action("connect_mcp_server_button")
19 | async def handle_connect_mcp_server_button(ack, body, logger):
20 | """Handle connect to MCP server button click actions"""
21 | await ack()
22 | logger.info(f"Connect to MCP server button clicked: {body.get('user', {}).get('id')}")
23 |
--------------------------------------------------------------------------------
/mcp-clients/src/mcp_clients/slack/settings.py:
--------------------------------------------------------------------------------
1 | import os
2 | from typing import ClassVar
3 |
4 | from pydantic_settings import BaseSettings
5 |
6 |
7 | class SlackSettings(BaseSettings):
8 | """Settings for Slack integration"""
9 |
10 | # Application settings
11 | WEBSITE_URL: str = ""
12 |
13 | # LLM API keys
14 | ANTHROPIC_API_KEY: str
15 | OPENAI_API_KEY: str
16 | GEMINI_API_KEY: str
17 |
18 | # Supabase settings
19 | SUPABASE_URL: str
20 | SUPABASE_API_KEY: str
21 |
22 | # Slack settings
23 | SLACK_CLIENT_ID: str
24 | SLACK_CLIENT_SECRET: str
25 | SLACK_SIGNING_SECRET: str
26 | SLACK_SCOPES: str
27 | SLACK_REDIRECT_URI: str
28 | SLACK_BOT_TOKEN: str
29 |
30 | # Message configuration - Mark these as ClassVar
31 | MAX_MESSAGE_LENGTH: ClassVar[int] = 3000
32 | MAX_BLOCK_MESSAGE_LENGTH: ClassVar[int] = 2000
33 | STREAMING_TIMEOUT: ClassVar[float] = 200.0
34 | STREAMING_SLEEP_DELAY: ClassVar[float] = 0.05
35 |
36 | # UI configuration - Mark this as ClassVar
37 | SLACK_APP_COLOR: ClassVar[str] = os.getenv("SLACK_APP_COLOR", "#4A154B")
38 |
39 | class Config:
40 | env_file = ".env"
41 | case_sensitive = True
42 | extra = "ignore"
43 |
44 |
45 | # Create a global settings instance
46 | settings = SlackSettings()
47 |
--------------------------------------------------------------------------------
/mcp_servers/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | build/
4 | *.d.ts
5 | coverage/
6 | **/*.js
7 | !.eslintrc.js
--------------------------------------------------------------------------------
/mcp_servers/.eslintrc.js:
--------------------------------------------------------------------------------
1 | // Base ESLint configuration for all MCP servers
2 | module.exports = {
3 | root: true, // This is now the root config
4 | parser: '@typescript-eslint/parser',
5 | parserOptions: {
6 | ecmaVersion: 2022,
7 | sourceType: 'module',
8 | tsconfigRootDir: '.',
9 | project: './tsconfig.json', // Points to the mcp_servers tsconfig
10 | },
11 | plugins: ['@typescript-eslint', 'prettier'],
12 | extends: [
13 | 'eslint:recommended',
14 | 'plugin:@typescript-eslint/recommended',
15 | 'prettier', // Avoid conflicts with prettier formatting
16 | 'plugin:prettier/recommended',
17 | ],
18 | env: {
19 | node: true,
20 | es2022: true,
21 | },
22 | rules: {
23 | // MCP server-specific rules
24 | 'no-console': ['error', { allow: ['warn', 'error'] }],
25 | '@typescript-eslint/explicit-module-boundary-types': 'off',
26 | '@typescript-eslint/no-explicit-any': 'error',
27 | '@typescript-eslint/no-unused-vars': [
28 | 'error',
29 | { argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
30 | ],
31 | '@typescript-eslint/no-non-null-assertion': 'warn',
32 | 'no-duplicate-imports': 'error',
33 | 'prettier/prettier': 'error',
34 | },
35 | overrides: [
36 | {
37 | files: ['**/*.test.ts', '**/*.spec.ts'],
38 | rules: {
39 | 'no-console': 'off',
40 | '@typescript-eslint/no-explicit-any': 'warn',
41 | },
42 | },
43 | ],
44 | ignorePatterns: ['node_modules', 'dist', 'build'],
45 | };
--------------------------------------------------------------------------------
/mcp_servers/.prettierignore:
--------------------------------------------------------------------------------
1 | # Build outputs
2 | dist/
3 | build/
4 | out/
5 |
6 | # Dependencies
7 | node_modules/
8 |
9 | # Coverage reports
10 | coverage/
11 |
12 | # Generated files
13 | *.generated.*
14 |
15 | # Misc
16 | .DS_Store
17 | .env
18 | .env.*
19 | *.log
--------------------------------------------------------------------------------
/mcp_servers/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "semi": true,
3 | "trailingComma": "all",
4 | "singleQuote": true,
5 | "printWidth": 100,
6 | "tabWidth": 2,
7 | "endOfLine": "lf"
8 | }
--------------------------------------------------------------------------------
/mcp_servers/attio/.env.example:
--------------------------------------------------------------------------------
1 | # Attio API credentials
2 | ATTIO_API_KEY=your-actual-api-key-here
3 |
--------------------------------------------------------------------------------
/mcp_servers/attio/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": false,
3 | "extends": [
4 | "../.eslintrc.js"
5 | ],
6 | "parserOptions": {
7 | "tsconfigRootDir": ".",
8 | "project": "./tsconfig.json"
9 | },
10 | "rules": {
11 | // Package-specific rules can go here
12 | }
13 | }
--------------------------------------------------------------------------------
/mcp_servers/attio/Dockerfile:
--------------------------------------------------------------------------------
1 | # Use a Node.js image as the base for building the application
2 | FROM node:22-alpine AS builder
3 |
4 | # Set the working directory inside the container
5 | WORKDIR /app
6 |
7 | # Copy package.json and package-lock.json to install dependencies
8 | COPY mcp_servers/attio/package.json mcp_servers/attio/package-lock.json ./
9 |
10 | # Install dependencies (ignoring scripts to prevent running the prepare script)
11 | RUN npm install --ignore-scripts
12 |
13 | # Copy the rest of the application source code
14 | COPY mcp_servers/attio .
15 |
16 | # Build the application using TypeScript
17 | RUN npm run build
18 |
19 | # Use a smaller Node.js image for the final image
20 | FROM node:22-slim AS release
21 |
22 | # Set the working directory inside the container
23 | WORKDIR /app
24 |
25 | # Copy the built application from the builder stage
26 | COPY --from=builder /app/dist /app/dist
27 | COPY --from=builder /app/package.json /app/package.json
28 | COPY --from=builder /app/package-lock.json /app/package-lock.json
29 | # Install only production dependencies
30 | RUN npm ci --omit=dev --ignore-scripts
31 |
32 | EXPOSE 5000
33 |
34 | # Specify the command to run the application
35 | ENTRYPOINT ["node", "dist/index.js"]
--------------------------------------------------------------------------------
/mcp_servers/attio/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "module": "NodeNext",
5 | "moduleResolution": "NodeNext",
6 | "outDir": "./dist",
7 | "rootDir": ".",
8 | "strict": true,
9 | "esModuleInterop": true,
10 | "skipLibCheck": true,
11 | "forceConsistentCasingInFileNames": true
12 | },
13 | "include": ["./**/*.ts"],
14 | "exclude": [
15 | "node_modules",
16 | "dist",
17 | "tests"
18 | ]
19 | }
--------------------------------------------------------------------------------
/mcp_servers/cloudflare/graphql/.env.example:
--------------------------------------------------------------------------------
1 | # Cloudflare API credentials
2 | CLOUDFLARE_CLIENT_ID=your-client-id-here
3 | CLOUDFLARE_CLIENT_SECRET=your-client-secret-here
4 |
5 | # Server configuration
6 | MCP_SERVER_NAME=graphql-mcp
7 | MCP_SERVER_VERSION=0.0.2
8 | ENVIRONMENT=development
9 |
10 | # Optional: OAuth and authentication settings
11 | OAUTH_KV=your-kv-namespace-here
12 | MCP_METRICS=your-analytics-engine-dataset-here
13 | MCP_OBJECT=your-durable-object-namespace-here
14 | USER_DETAILS=your-user-details-namespace-here
15 |
16 | # Optional: Sentry configuration
17 | SENTRY_DSN=your-sentry-dsn-here
18 | SENTRY_ACCESS_CLIENT_ID=your-sentry-client-id-here
19 | SENTRY_ACCESS_CLIENT_SECRET=your-sentry-client-secret-here
20 | GIT_HASH=your-git-hash-here
21 |
22 | # Optional: Development mode settings
23 | # DEV_DISABLE_OAUTH=true
24 | # DEV_CLOUDFLARE_API_TOKEN=your-api-token-here
25 | # DEV_CLOUDFLARE_EMAIL=your-email@example.com
--------------------------------------------------------------------------------
/mcp_servers/cloudflare/graphql/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | root: false,
4 | extends: [
5 | "../.eslintrc.js"
6 | ],
7 | parserOptions: {
8 | tsconfigRootDir: ".",
9 | project: "./tsconfig.json"
10 | },
11 | rules: {
12 | // Package-specific rules can go here
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/mcp_servers/cloudflare/graphql/Dockerfile:
--------------------------------------------------------------------------------
1 | # Use a Node.js image as the base for building the application
2 | FROM node:22-alpine AS builder
3 |
4 | # Set the working directory inside the container
5 | WORKDIR /app
6 |
7 | # Copy package.json and package-lock.json to install dependencies
8 | COPY mcp_servers/cloudflare/graphql/package.json mcp_servers/cloudflare/graphql/package-lock.json ./
9 |
10 | # Install dependencies (ignoring scripts to prevent running the prepare script)
11 | RUN npm install --ignore-scripts
12 |
13 | # Copy the rest of the application source code
14 | COPY mcp_servers/cloudflare/graphql .
15 |
16 | # Build the application using TypeScript
17 | RUN npm run build
18 |
19 | # Use a smaller Node.js image for the final image
20 | FROM node:22-slim AS release
21 |
22 | # Set the working directory inside the container
23 | WORKDIR /app
24 |
25 | # Copy the built application from the builder stage
26 | COPY --from=builder /app/dist /app/dist
27 | COPY --from=builder /app/package.json /app/package.json
28 | COPY --from=builder /app/package-lock.json /app/package-lock.json
29 | # Install only production dependencies
30 | RUN npm ci --omit=dev --ignore-scripts
31 |
32 | EXPOSE 8787
33 |
34 | # Specify the command to run the application with Wrangler
35 | ENTRYPOINT ["npx", "wrangler", "dev", "--local"]
--------------------------------------------------------------------------------
/mcp_servers/cloudflare/graphql/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/mcp-server-cloudflare-graphql",
3 | "version": "0.0.2",
4 | "description": "MCP server for GraphQL integration with Cloudflare. Supports GraphQL schema exploration, query execution, and data fetching from Cloudflare's GraphQL API.",
5 | "type": "module",
6 | "files": [
7 | "dist"
8 | ],
9 | "publishConfig": {
10 | "access": "public"
11 | },
12 | "scripts": {
13 | "build": "tsc",
14 | "test": "vitest run",
15 | "start": "wrangler dev",
16 | "dev": "wrangler dev",
17 | "lint": "eslint src/**/*.ts",
18 | "lint:fix": "eslint src/**/*.ts --fix",
19 | "format": "prettier --write .",
20 | "prepare": "npm run build",
21 | "deploy": "run-wrangler-deploy",
22 | "check:types": "tsc --noEmit",
23 | "check:lint": "eslint src/**/*.ts",
24 | "types": "wrangler types --include-env=false"
25 | },
26 | "license": "MIT",
27 | "dependencies": {
28 | "@cloudflare/workers-oauth-provider": "0.0.5",
29 | "@hono/zod-validator": "0.4.3",
30 | "@modelcontextprotocol/sdk": "1.10.2",
31 | "@repo/mcp-common": "workspace:*",
32 | "@repo/mcp-observability": "workspace:*",
33 | "agents": "0.0.67",
34 | "cloudflare": "4.2.0",
35 | "hono": "4.7.6",
36 | "zod": "3.24.2",
37 | "lz-string": "1.5.0"
38 | },
39 | "devDependencies": {
40 | "@cloudflare/vitest-pool-workers": "0.8.14",
41 | "@types/node": "22.14.1",
42 | "@typescript-eslint/eslint-plugin": "^7.0.0",
43 | "@typescript-eslint/parser": "^7.0.0",
44 | "eslint": "^8.56.0",
45 | "eslint-config-prettier": "^9.1.0",
46 | "prettier": "3.5.3",
47 | "typescript": "5.5.4",
48 | "vitest": "3.0.9",
49 | "wrangler": "4.10.0"
50 | },
51 | "engines": {
52 | "node": ">=18.0.0"
53 | },
54 | "keywords": [
55 | "mcp",
56 | "graphql",
57 | "cloudflare",
58 | "api"
59 | ]
60 | }
61 |
--------------------------------------------------------------------------------
/mcp_servers/cloudflare/graphql/src/graphql.context.ts:
--------------------------------------------------------------------------------
1 | import type { GraphQLMCP, UserDetails } from './graphql.app'
2 |
3 | export interface Env {
4 | OAUTH_KV: KVNamespace
5 | ENVIRONMENT: 'development' | 'staging' | 'production'
6 | MCP_SERVER_NAME: string
7 | MCP_SERVER_VERSION: string
8 | CLOUDFLARE_CLIENT_ID: string
9 | CLOUDFLARE_CLIENT_SECRET: string
10 | MCP_OBJECT: DurableObjectNamespace
11 | USER_DETAILS: DurableObjectNamespace
12 | MCP_METRICS: AnalyticsEngineDataset
13 | SENTRY_ACCESS_CLIENT_ID: string
14 | SENTRY_ACCESS_CLIENT_SECRET: string
15 | GIT_HASH: string
16 | SENTRY_DSN: string
17 | DEV_DISABLE_OAUTH: string
18 | DEV_CLOUDFLARE_API_TOKEN: string
19 | DEV_CLOUDFLARE_EMAIL: string
20 | }
21 |
--------------------------------------------------------------------------------
/mcp_servers/cloudflare/graphql/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "module": "NodeNext",
5 | "moduleResolution": "NodeNext",
6 | "outDir": "./dist",
7 | "rootDir": ".",
8 | "strict": true,
9 | "esModuleInterop": true,
10 | "skipLibCheck": true,
11 | "forceConsistentCasingInFileNames": true
12 | },
13 | "include": ["./**/*.ts"],
14 | "exclude": [
15 | "node_modules",
16 | "dist"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/mcp_servers/cloudflare/graphql/types.d.ts:
--------------------------------------------------------------------------------
1 | import type { TestEnv } from './vitest.config'
2 |
3 | declare module 'cloudflare:test' {
4 | interface ProvidedEnv extends TestEnv {}
5 | }
6 |
--------------------------------------------------------------------------------
/mcp_servers/confluence/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy requirements file
11 | COPY mcp_servers/confluence/requirements.txt .
12 | RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | # Copy the server code
15 | COPY mcp_servers/confluence/server.py .
16 | COPY mcp_servers/confluence/tools /app/tools
17 |
18 | # Create a sample .env file
19 | RUN echo "CONFLUENCE_BASE_URL=https://your-instance.atlassian.net/wiki\nCONFLUENCE_API_TOKEN=your-api-token\nCONFLUENCE_USERNAME=your-email@example.com\nCONFLUENCE_MCP_SERVER_PORT=5001" > .env
20 |
21 | # Expose the port the server runs on
22 | EXPOSE 5001
23 |
24 | # Command to run the server
25 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/confluence/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.8.1
2 | pydantic
3 | fastapi
4 | uvicorn[standard]
5 | aiohttp
6 | python-dotenv
7 | typing-extensions
8 | click
9 | starlette
10 | atlassian-python-api>=3.41.0
--------------------------------------------------------------------------------
/mcp_servers/confluence/tools/__init__.py:
--------------------------------------------------------------------------------
1 | """Confluence API integration module.
2 |
3 | This module provides access to Confluence content through the Model Context Protocol.
4 | """
5 |
6 | from .client import ConfluenceClient
7 | from .comments import CommentsMixin
8 | from .config import ConfluenceConfig
9 | from .labels import LabelsMixin
10 | from .pages import PagesMixin
11 | from .search import SearchMixin
12 | from .spaces import SpacesMixin
13 | from .users import UsersMixin
14 |
15 |
16 | class ConfluenceFetcher(
17 | SearchMixin, SpacesMixin, PagesMixin, CommentsMixin, LabelsMixin, UsersMixin
18 | ):
19 | """Main entry point for Confluence operations, providing backward compatibility.
20 |
21 | This class combines functionality from various mixins to maintain the same
22 | API as the original ConfluenceFetcher class.
23 | """
24 |
25 | pass
26 |
27 |
28 | __all__ = ["ConfluenceFetcher", "ConfluenceConfig", "ConfluenceClient"]
29 |
--------------------------------------------------------------------------------
/mcp_servers/confluence/tools/constants.py:
--------------------------------------------------------------------------------
1 | """Constants specific to Confluence and CQL."""
2 |
3 | # Based on https://developer.atlassian.com/cloud/confluence/cql-functions/#reserved-words
4 | # List might need refinement based on actual parser behavior
5 | # Using lowercase for case-insensitive matching
6 | RESERVED_CQL_WORDS = {
7 | "after",
8 | "and",
9 | "as",
10 | "avg",
11 | "before",
12 | "begin",
13 | "by",
14 | "commit",
15 | "contains",
16 | "count",
17 | "distinct",
18 | "else",
19 | "empty",
20 | "end",
21 | "explain",
22 | "from",
23 | "having",
24 | "if",
25 | "in",
26 | "inner",
27 | "insert",
28 | "into",
29 | "is",
30 | "isnull",
31 | "left",
32 | "like",
33 | "limit",
34 | "max",
35 | "min",
36 | "not",
37 | "null",
38 | "or",
39 | "order",
40 | "outer",
41 | "right",
42 | "select",
43 | "sum",
44 | "then",
45 | "was",
46 | "where",
47 | "update",
48 | }
49 |
50 | # Add other Confluence-specific constants here if needed in the future.
51 |
--------------------------------------------------------------------------------
/mcp_servers/discord/.env.example:
--------------------------------------------------------------------------------
1 | DISCORD_TOKEN=DISCORD_TOKEN_HERE
2 | DISCORD_MCP_SERVER_PORT=5000
--------------------------------------------------------------------------------
/mcp_servers/discord/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy only the requirements first to leverage Docker cache
11 | COPY mcp_servers/discord/requirements.txt .
12 | COPY mcp_servers/discord/.env.example .env
13 | RUN pip install --no-cache-dir -r requirements.txt
14 |
15 | # Copy the server code
16 | COPY mcp_servers/discord/server.py .
17 |
18 | # Expose the port the server runs on
19 | EXPOSE 5000
20 |
21 | # Command to run the server
22 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/discord/requirements.txt:
--------------------------------------------------------------------------------
1 | aiohttp>=3.8.0
2 | python-dotenv>=1.0.0
3 | mcp>=1.8.1
4 | httpx>=0.27.0
5 | fastapi
6 | uvicorn[standard]
7 | pydantic>=2.5.0
8 | discord.py>=2.5.0
--------------------------------------------------------------------------------
/mcp_servers/figma/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "eslint:recommended",
4 | "plugin:@typescript-eslint/recommended",
5 | "prettier"
6 | ],
7 | "parser": "@typescript-eslint/parser",
8 | "plugins": [
9 | "@typescript-eslint"
10 | ],
11 | "root": true
12 | }
--------------------------------------------------------------------------------
/mcp_servers/figma/Dockerfile:
--------------------------------------------------------------------------------
1 | # Use a Node.js image as the base for building the application
2 | FROM node:22-alpine AS builder
3 |
4 | # Set the working directory inside the container
5 | WORKDIR /app
6 |
7 | # Copy package.json and package-lock.json to install dependencies
8 | COPY mcp_servers/figma/package.json mcp_servers/figma/package-lock.json ./
9 |
10 | # Install dependencies (ignoring scripts to prevent running the prepare script)
11 | RUN npm install --ignore-scripts
12 |
13 | # Copy the rest of the application source code
14 | COPY mcp_servers/figma .
15 |
16 | # Build the application using TypeScript
17 | RUN npm run build
18 |
19 | # Use a smaller Node.js image for the final image
20 | FROM node:22-slim AS release
21 |
22 | # Set the working directory inside the container
23 | WORKDIR /app
24 |
25 | # Copy the built application from the builder stage
26 | COPY --from=builder /app/dist /app/dist
27 | COPY --from=builder /app/package.json /app/package.json
28 | COPY --from=builder /app/package-lock.json /app/package-lock.json
29 | # Install only production dependencies
30 | RUN npm ci --omit=dev --ignore-scripts
31 |
32 | EXPOSE 5000
33 |
34 | # Specify the command to run the application
35 | ENTRYPOINT ["node", "dist/index.js"]
--------------------------------------------------------------------------------
/mcp_servers/figma/cli.ts:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4 | import { config } from "dotenv";
5 | import { resolve } from "path";
6 | import { getServerConfig } from "./config.js";
7 | import { startHttpServer } from "./server.js";
8 | import { createServer } from "./mcp.js";
9 |
10 | // Load .env from the current working directory
11 | config({ path: resolve(process.cwd(), ".env") });
12 |
13 | export async function startServer(): Promise {
14 | // Check if we're running in stdio mode (e.g., via CLI)
15 | const isStdioMode = process.env.NODE_ENV === "cli" || process.argv.includes("--stdio");
16 |
17 | const config = getServerConfig(isStdioMode);
18 |
19 | const server = createServer(config.figmaApiKey, { isHTTP: !isStdioMode });
20 |
21 | if (isStdioMode) {
22 | const transport = new StdioServerTransport();
23 | await server.connect(transport);
24 | } else {
25 | console.log(`Initializing Figma MCP Server in HTTP mode on port ${config.port}...`);
26 | await startHttpServer(config.port, server);
27 | }
28 | }
29 |
30 | // If we're being executed directly (not imported), start the server
31 | if (process.argv[1]) {
32 | startServer().catch((error) => {
33 | console.error("Failed to start server:", error);
34 | process.exit(1);
35 | });
36 | }
37 |
--------------------------------------------------------------------------------
/mcp_servers/figma/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/mcp-server-figma",
3 | "version": "0.2.1",
4 | "description": "MCP server for Figma API integration. Provides tools to fetch Figma designs, nodes, and download images from Figma designs.",
5 | "type": "module",
6 | "bin": {
7 | "figma-mcp": "dist/index.js"
8 | },
9 | "files": [
10 | "dist"
11 | ],
12 | "publishConfig": {
13 | "access": "public"
14 | },
15 | "scripts": {
16 | "build": "tsc && node -e \"require('fs').chmodSync('dist/index.js', '755')\"",
17 | "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
18 | "start": "node dist/index.js",
19 | "lint": "eslint src/**/*.ts",
20 | "lint:fix": "eslint src/**/*.ts --fix",
21 | "format": "prettier --write .",
22 | "prepare": "npm run build",
23 | "publish": "npm run build && npm publish"
24 | },
25 | "license": "MIT",
26 | "dependencies": {
27 | "@modelcontextprotocol/sdk": "^1.11.1",
28 | "dotenv": "^16.4.7",
29 | "js-yaml": "^4.1.0",
30 | "zod": "^3.22.4"
31 | },
32 | "devDependencies": {
33 | "@jest/globals": "^29.7.0",
34 | "@types/jest": "^29.5.14",
35 | "@types/js-yaml": "^4.0.9",
36 | "@types/node": "^20.10.5",
37 | "@typescript-eslint/eslint-plugin": "^7.0.0",
38 | "@typescript-eslint/parser": "^7.0.0",
39 | "eslint": "^8.56.0",
40 | "eslint-config-prettier": "^9.1.0",
41 | "jest": "^29.7.0",
42 | "jest-mock-extended": "^4.0.0-beta1",
43 | "prettier": "^3.1.1",
44 | "shx": "^0.3.4",
45 | "ts-jest": "^29.1.1",
46 | "typescript": "^5.3.3"
47 | },
48 | "engines": {
49 | "node": ">=18.0.0"
50 | },
51 | "keywords": [
52 | "mcp",
53 | "figma",
54 | "design",
55 | "api",
56 | "modelcontextprotocol"
57 | ],
58 | "author": "Klavis AI",
59 | "homepage": "https://modelcontextprotocol.io"
60 | }
--------------------------------------------------------------------------------
/mcp_servers/figma/transformers/style.ts:
--------------------------------------------------------------------------------
1 | import type { Node as FigmaDocumentNode } from "@figma/rest-api-spec";
2 | import type { SimplifiedFill } from "~/services/simplify-node-response.js";
3 | import { generateCSSShorthand, isVisible, parsePaint } from "~/utils/common.js";
4 | import { hasValue, isStrokeWeights } from "~/utils/identity.js";
5 | export type SimplifiedStroke = {
6 | colors: SimplifiedFill[];
7 | strokeWeight?: string;
8 | strokeDashes?: number[];
9 | strokeWeights?: string;
10 | };
11 | export function buildSimplifiedStrokes(n: FigmaDocumentNode): SimplifiedStroke {
12 | let strokes: SimplifiedStroke = { colors: [] };
13 | if (hasValue("strokes", n) && Array.isArray(n.strokes) && n.strokes.length) {
14 | strokes.colors = n.strokes.filter(isVisible).map(parsePaint);
15 | }
16 |
17 | if (hasValue("strokeWeight", n) && typeof n.strokeWeight === "number" && n.strokeWeight > 0) {
18 | strokes.strokeWeight = `${n.strokeWeight}px`;
19 | }
20 |
21 | if (hasValue("strokeDashes", n) && Array.isArray(n.strokeDashes) && n.strokeDashes.length) {
22 | strokes.strokeDashes = n.strokeDashes;
23 | }
24 |
25 | if (hasValue("individualStrokeWeights", n, isStrokeWeights)) {
26 | strokes.strokeWeight = generateCSSShorthand(n.individualStrokeWeights);
27 | }
28 |
29 | return strokes;
30 | }
31 |
--------------------------------------------------------------------------------
/mcp_servers/figma/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "module": "NodeNext",
5 | "moduleResolution": "NodeNext",
6 | "esModuleInterop": true,
7 | "outDir": "dist",
8 | "strict": true,
9 | "skipLibCheck": true,
10 | "declaration": true
11 | },
12 | "include": ["./**/*.ts"],
13 | "exclude": ["node_modules", "dist"]
14 | }
--------------------------------------------------------------------------------
/mcp_servers/figma/utils/logger.ts:
--------------------------------------------------------------------------------
1 | export const Logger = {
2 | isHTTP: false,
3 | log: (...args: any[]) => {
4 | if (Logger.isHTTP) {
5 | console.log("[INFO]", ...args);
6 | } else {
7 | console.error("[INFO]", ...args);
8 | }
9 | },
10 | error: (...args: any[]) => {
11 | console.error("[ERROR]", ...args);
12 | },
13 | };
14 |
--------------------------------------------------------------------------------
/mcp_servers/firecrawl/.env.example:
--------------------------------------------------------------------------------
1 | # Firecrawl API credentials
2 | FIRECRAWL_API_KEY=your-api-key-here
3 | # For self-hosted instances only (comment out if using cloud service)
4 | # FIRECRAWL_API_URL=https://firecrawl.your-domain.com
5 |
6 | # Retry configuration
7 | FIRECRAWL_RETRY_MAX_ATTEMPTS=3
8 | FIRECRAWL_RETRY_INITIAL_DELAY=1000
9 | FIRECRAWL_RETRY_MAX_DELAY=10000
10 | FIRECRAWL_RETRY_BACKOFF_FACTOR=2
--------------------------------------------------------------------------------
/mcp_servers/firecrawl/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": false,
3 | "extends": [
4 | "../.eslintrc.js"
5 | ],
6 | "parserOptions": {
7 | "tsconfigRootDir": ".",
8 | "project": "./tsconfig.json"
9 | },
10 | "rules": {
11 | // Package-specific rules can go here
12 | }
13 | }
--------------------------------------------------------------------------------
/mcp_servers/firecrawl/Dockerfile:
--------------------------------------------------------------------------------
1 | # Use a Node.js image as the base for building the application
2 | FROM node:22-alpine AS builder
3 |
4 | # Set the working directory inside the container
5 | WORKDIR /app
6 |
7 | # Copy package.json and package-lock.json to install dependencies
8 | COPY mcp_servers/firecrawl/package.json mcp_servers/firecrawl/package-lock.json ./
9 |
10 | # Install dependencies (ignoring scripts to prevent running the prepare script)
11 | RUN npm install --ignore-scripts
12 |
13 | # Copy the rest of the application source code
14 | COPY mcp_servers/firecrawl .
15 |
16 | # Build the application using TypeScript
17 | RUN npm run build
18 |
19 | # Use a smaller Node.js image for the final image
20 | FROM node:22-slim AS release
21 |
22 | # Set the working directory inside the container
23 | WORKDIR /app
24 |
25 | # Copy the built application from the builder stage
26 | COPY --from=builder /app/dist /app/dist
27 | COPY --from=builder /app/package.json /app/package.json
28 | COPY --from=builder /app/package-lock.json /app/package-lock.json
29 | # Install only production dependencies
30 | RUN npm ci --omit=dev --ignore-scripts
31 |
32 | EXPOSE 5000
33 |
34 | # Specify the command to run the application
35 | ENTRYPOINT ["node", "dist/index.js"]
--------------------------------------------------------------------------------
/mcp_servers/firecrawl/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "module": "NodeNext",
5 | "moduleResolution": "NodeNext",
6 | "outDir": "./dist",
7 | "rootDir": ".",
8 | "strict": true,
9 | "esModuleInterop": true,
10 | "skipLibCheck": true,
11 | "forceConsistentCasingInFileNames": true
12 | },
13 | "include": ["./**/*.ts"],
14 | "exclude": [
15 | "node_modules",
16 | "dist",
17 | "tests"
18 | ]
19 | }
--------------------------------------------------------------------------------
/mcp_servers/firecrawl_deep_research/.env.example:
--------------------------------------------------------------------------------
1 | # Firecrawl API credentials
2 | FIRECRAWL_API_KEY=your-api-key-here
3 | # For self-hosted instances only (comment out if using cloud service)
4 | # FIRECRAWL_API_URL=https://firecrawl.your-domain.com
5 |
6 | # Retry configuration
7 | FIRECRAWL_RETRY_MAX_ATTEMPTS=3
8 | FIRECRAWL_RETRY_INITIAL_DELAY=1000
9 | FIRECRAWL_RETRY_MAX_DELAY=10000
10 | FIRECRAWL_RETRY_BACKOFF_FACTOR=2
--------------------------------------------------------------------------------
/mcp_servers/firecrawl_deep_research/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": false,
3 | "extends": [
4 | "../.eslintrc.js"
5 | ],
6 | "parserOptions": {
7 | "tsconfigRootDir": ".",
8 | "project": "./tsconfig.json"
9 | },
10 | "rules": {}
11 | }
--------------------------------------------------------------------------------
/mcp_servers/firecrawl_deep_research/Dockerfile:
--------------------------------------------------------------------------------
1 | # Use a Node.js image as the base for building the application
2 | FROM node:22-alpine AS builder
3 |
4 | # Set the working directory inside the container
5 | WORKDIR /app
6 |
7 | # Copy package.json and package-lock.json to install dependencies
8 | COPY mcp_servers/firecrawl_deep_research/package.json mcp_servers/firecrawl_deep_research/package-lock.json ./
9 |
10 | # Install dependencies (ignoring scripts to prevent running the prepare script)
11 | RUN npm install --ignore-scripts
12 |
13 | # Copy the rest of the application source code
14 | COPY mcp_servers/firecrawl_deep_research .
15 |
16 | # Build the application using TypeScript
17 | RUN npm run build
18 |
19 | # Use a smaller Node.js image for the final image
20 | FROM node:22-slim AS release
21 |
22 | # Set the working directory inside the container
23 | WORKDIR /app
24 |
25 | # Copy the built application from the builder stage
26 | COPY --from=builder /app/dist /app/dist
27 | COPY --from=builder /app/package.json /app/package.json
28 | COPY --from=builder /app/package-lock.json /app/package-lock.json
29 | # Install only production dependencies
30 | RUN npm ci --omit=dev --ignore-scripts
31 |
32 | EXPOSE 5000
33 |
34 | # Specify the command to run the application
35 | ENTRYPOINT ["node", "dist/index.js"]
--------------------------------------------------------------------------------
/mcp_servers/firecrawl_deep_research/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "module": "NodeNext",
5 | "moduleResolution": "NodeNext",
6 | "outDir": "./dist",
7 | "rootDir": ".",
8 | "strict": true,
9 | "esModuleInterop": true,
10 | "skipLibCheck": true,
11 | "forceConsistentCasingInFileNames": true
12 | },
13 | "include": ["./**/*.ts"],
14 | "exclude": [
15 | "node_modules",
16 | "dist",
17 | "tests"
18 | ]
19 | }
--------------------------------------------------------------------------------
/mcp_servers/github/.env.example:
--------------------------------------------------------------------------------
1 | # GitHub Authentication Token
2 | # Required for authenticated API requests
3 | GITHUB_AUTH_TOKEN=your_github_personal_access_token
4 |
5 | # Server Configuration
6 | # Port where the SSE server will listen (defaults to 5000 if not set)
7 | PORT=5000
8 |
9 | # Base URL for the server (defaults to http://localhost:PORT if not set)
10 | BASE_URL=http://localhost:5000
--------------------------------------------------------------------------------
/mcp_servers/github/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.23-alpine AS builder
2 |
3 | WORKDIR /app
4 |
5 | # Install build dependencies
6 | RUN apk add --no-cache git
7 |
8 | # Copy go.mod and go.sum files first for better caching
9 | COPY mcp_servers/github/go.mod mcp_servers/github/go.sum ./
10 | RUN go mod download
11 |
12 | # Copy the source code
13 | COPY mcp_servers/github/ ./
14 |
15 | # Build the application
16 | RUN CGO_ENABLED=0 GOOS=linux go build -o server server.go
17 |
18 | # Create a minimal production image
19 | FROM alpine:3.19
20 |
21 | WORKDIR /app
22 |
23 | # Add ca-certificates for HTTPS
24 | RUN apk --no-cache add ca-certificates
25 |
26 | # Copy the binary from the builder stage
27 | COPY --from=builder /app/server .
28 |
29 | # Expose the default port
30 | EXPOSE 5000
31 |
32 | # Run the server
33 | CMD ["./server"]
--------------------------------------------------------------------------------
/mcp_servers/github/github-mcp-server:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/mcp_servers/github/github-mcp-server
--------------------------------------------------------------------------------
/mcp_servers/github/pkg/log/io.go:
--------------------------------------------------------------------------------
1 | package log
2 |
3 | import (
4 | "io"
5 |
6 | log "github.com/sirupsen/logrus"
7 | )
8 |
9 | // IOLogger is a wrapper around io.Reader and io.Writer that can be used
10 | // to log the data being read and written from the underlying streams
11 | type IOLogger struct {
12 | reader io.Reader
13 | writer io.Writer
14 | logger *log.Logger
15 | }
16 |
17 | // NewIOLogger creates a new IOLogger instance
18 | func NewIOLogger(r io.Reader, w io.Writer, logger *log.Logger) *IOLogger {
19 | return &IOLogger{
20 | reader: r,
21 | writer: w,
22 | logger: logger,
23 | }
24 | }
25 |
26 | // Read reads data from the underlying io.Reader and logs it.
27 | func (l *IOLogger) Read(p []byte) (n int, err error) {
28 | if l.reader == nil {
29 | return 0, io.EOF
30 | }
31 | n, err = l.reader.Read(p)
32 | if n > 0 {
33 | l.logger.Infof("[stdin]: received %d bytes: %s", n, string(p[:n]))
34 | }
35 | return n, err
36 | }
37 |
38 | // Write writes data to the underlying io.Writer and logs it.
39 | func (l *IOLogger) Write(p []byte) (n int, err error) {
40 | if l.writer == nil {
41 | return 0, io.ErrClosedPipe
42 | }
43 | l.logger.Infof("[stdout]: sending %d bytes: %s", len(p), string(p))
44 | return l.writer.Write(p)
45 | }
46 |
--------------------------------------------------------------------------------
/mcp_servers/github/pkg/log/io_test.go:
--------------------------------------------------------------------------------
1 | package log
2 |
3 | import (
4 | "bytes"
5 | "strings"
6 | "testing"
7 |
8 | log "github.com/sirupsen/logrus"
9 | "github.com/stretchr/testify/assert"
10 | )
11 |
12 | func TestLoggedReadWriter(t *testing.T) {
13 | t.Run("Read method logs and passes data", func(t *testing.T) {
14 | // Setup
15 | inputData := "test input data"
16 | reader := strings.NewReader(inputData)
17 |
18 | // Create logger with buffer to capture output
19 | var logBuffer bytes.Buffer
20 | logger := log.New()
21 | logger.SetOutput(&logBuffer)
22 | logger.SetFormatter(&log.TextFormatter{
23 | DisableTimestamp: true,
24 | })
25 |
26 | lrw := NewIOLogger(reader, nil, logger)
27 |
28 | // Test Read
29 | buf := make([]byte, 100)
30 | n, err := lrw.Read(buf)
31 |
32 | // Assertions
33 | assert.NoError(t, err)
34 | assert.Equal(t, len(inputData), n)
35 | assert.Equal(t, inputData, string(buf[:n]))
36 | assert.Contains(t, logBuffer.String(), "[stdin]")
37 | assert.Contains(t, logBuffer.String(), inputData)
38 | })
39 |
40 | t.Run("Write method logs and passes data", func(t *testing.T) {
41 | // Setup
42 | outputData := "test output data"
43 | var writeBuffer bytes.Buffer
44 |
45 | // Create logger with buffer to capture output
46 | var logBuffer bytes.Buffer
47 | logger := log.New()
48 | logger.SetOutput(&logBuffer)
49 | logger.SetFormatter(&log.TextFormatter{
50 | DisableTimestamp: true,
51 | })
52 |
53 | lrw := NewIOLogger(nil, &writeBuffer, logger)
54 |
55 | // Test Write
56 | n, err := lrw.Write([]byte(outputData))
57 |
58 | // Assertions
59 | assert.NoError(t, err)
60 | assert.Equal(t, len(outputData), n)
61 | assert.Equal(t, outputData, writeBuffer.String())
62 | assert.Contains(t, logBuffer.String(), "[stdout]")
63 | assert.Contains(t, logBuffer.String(), outputData)
64 | })
65 | }
66 |
--------------------------------------------------------------------------------
/mcp_servers/gmail/Dockerfile:
--------------------------------------------------------------------------------
1 | # Use a Node.js image as the base for building the application
2 | FROM node:22-alpine AS builder
3 |
4 | # Set the working directory inside the container
5 | WORKDIR /app
6 |
7 | # Copy package.json and package-lock.json to install dependencies
8 | COPY mcp_servers/gmail/package.json mcp_servers/gmail/package-lock.json ./
9 |
10 | # Install dependencies (ignoring scripts to prevent running the prepare script)
11 | RUN npm install --ignore-scripts
12 |
13 | # Copy the rest of the application source code
14 | COPY mcp_servers/gmail .
15 |
16 | # Build the application using TypeScript
17 | RUN npm run build
18 |
19 | # Use a smaller Node.js image for the final image
20 | FROM node:22-slim AS release
21 |
22 | # Set the working directory inside the container
23 | WORKDIR /app
24 |
25 | # Copy the built application from the builder stage
26 | COPY --from=builder /app/build /app/build
27 | COPY --from=builder /app/package.json /app/package.json
28 | COPY --from=builder /app/package-lock.json /app/package-lock.json
29 | # Install only production dependencies
30 | RUN npm ci --omit=dev --ignore-scripts
31 |
32 | EXPOSE 5000
33 |
34 | # Specify the command to run the application
35 | ENTRYPOINT ["node", "build/src/index.js"]
--------------------------------------------------------------------------------
/mcp_servers/gmail/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/gmail-mcp-server",
3 | "version": "1.0.0",
4 | "description": "Gmail MCP server",
5 | "type": "module",
6 | "main": "build/index.js",
7 | "bin": {
8 | "gmail-mcp": "./build/index.js"
9 | },
10 | "scripts": {
11 | "build": "tsc",
12 | "start": "node build/src/index.js",
13 | "prepare": "npm run build",
14 | "prepublishOnly": "npm run build"
15 | },
16 | "files": [
17 | "dist",
18 | "README.md"
19 | ],
20 | "author": "Klavis AI",
21 | "license": "MIT",
22 | "engines": {
23 | "node": ">=20.0.0"
24 | },
25 | "dependencies": {
26 | "@modelcontextprotocol/sdk": "^1.11.1",
27 | "googleapis": "^129.0.0",
28 | "zod": "^3.22.4",
29 | "zod-to-json-schema": "^3.22.1",
30 | "express": "^5.1.0"
31 | },
32 | "devDependencies": {
33 | "@types/node": "^20.10.5",
34 | "@types/express": "^5.0.0",
35 | "typescript": "^5.3.3"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/mcp_servers/gmail/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "module": "NodeNext",
5 | "moduleResolution": "NodeNext",
6 | "jsx": "react-jsx",
7 | "outDir": "./build",
8 | "rootDir": ".",
9 | "strict": true,
10 | "esModuleInterop": true,
11 | "skipLibCheck": true,
12 | "forceConsistentCasingInFileNames": true
13 | },
14 | "include": ["./**/*"],
15 | "exclude": ["node_modules"]
16 | }
17 |
--------------------------------------------------------------------------------
/mcp_servers/google_calendar/.env.example:
--------------------------------------------------------------------------------
1 | # Port for the MCP server to listen on
2 | GOOGLE_CALENDAR_MCP_SERVER_PORT=5000
3 |
--------------------------------------------------------------------------------
/mcp_servers/google_calendar/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy only the requirements first to leverage Docker cache
11 | COPY mcp_servers/google_calendar/requirements.txt .
12 | RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | # Copy the server code
15 | COPY mcp_servers/google_calendar/server.py .
16 |
17 | # Expose the port the server runs on
18 | EXPOSE 5000
19 |
20 | # Command to run the server
21 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/google_calendar/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.8.1
2 | pydantic
3 | fastapi
4 | uvicorn[standard]
5 | python-dotenv
6 | typing-extensions
7 | google-auth
8 | google-auth-oauthlib
9 | google-auth-httplib2
10 | google-api-python-client
11 | click
12 | starlette
--------------------------------------------------------------------------------
/mcp_servers/google_docs/.env.example:
--------------------------------------------------------------------------------
1 | # Port for the MCP server to listen on
2 | GOOGLE_DOCS_MCP_SERVER_PORT=5000
3 |
--------------------------------------------------------------------------------
/mcp_servers/google_docs/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy only the requirements first to leverage Docker cache
11 | COPY mcp_servers/google_docs/requirements.txt .
12 | RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | # Copy the server code
15 | COPY mcp_servers/google_docs/server.py .
16 |
17 | COPY mcp_servers/google_docs/.env.example .env
18 |
19 | # Expose the port the server runs on
20 | EXPOSE 5000
21 |
22 | # Command to run the server
23 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/google_docs/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.8.1
2 | pydantic
3 | fastapi
4 | uvicorn[standard]
5 | python-dotenv
6 | typing-extensions
7 | google-auth
8 | google-auth-oauthlib
9 | google-auth-httplib2
10 | google-api-python-client
11 | click
12 | starlette
--------------------------------------------------------------------------------
/mcp_servers/google_drive/.env.example:
--------------------------------------------------------------------------------
1 | # Port for the MCP server to listen on
2 | GOOGLE_DRIVE_MCP_SERVER_PORT=5000
3 |
--------------------------------------------------------------------------------
/mcp_servers/google_drive/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy only the requirements first to leverage Docker cache
11 | COPY mcp_servers/google_drive/requirements.txt .
12 | RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | COPY mcp_servers/google_drive/server.py .
15 | COPY mcp_servers/google_drive/utils.py .
16 |
17 | COPY mcp_servers/google_drive/.env.example .env
18 |
19 | # Expose the port the server runs on
20 | EXPOSE 5000
21 |
22 | # Command to run the server
23 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/google_drive/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.8.1
2 | pydantic
3 | fastapi
4 | uvicorn[standard]
5 | python-dotenv
6 | typing-extensions
7 | google-auth
8 | google-auth-oauthlib
9 | google-auth-httplib2
10 | google-api-python-client
11 | click
12 | starlette
--------------------------------------------------------------------------------
/mcp_servers/google_sheets/.env.example:
--------------------------------------------------------------------------------
1 | # Port for the MCP server to listen on
2 | GOOGLE_SHEETS_MCP_SERVER_PORT=5000
3 |
--------------------------------------------------------------------------------
/mcp_servers/google_sheets/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy only the requirements first to leverage Docker cache
11 | COPY mcp_servers/google_sheets/requirements.txt .
12 | RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | # Copy the server code
15 | COPY mcp_servers/google_sheets/server.py .
16 | COPY mcp_servers/google_sheets/models.py .
17 | COPY mcp_servers/google_sheets/utils.py .
18 |
19 | # Expose the port the server runs on
20 | EXPOSE 5000
21 |
22 | # Command to run the server
23 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/google_sheets/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.8.1
2 | pydantic
3 | fastapi
4 | uvicorn[standard]
5 | python-dotenv
6 | typing-extensions
7 | google-auth
8 | google-auth-oauthlib
9 | google-auth-httplib2
10 | google-api-python-client
11 | click
12 | starlette
--------------------------------------------------------------------------------
/mcp_servers/google_slides/.env.example:
--------------------------------------------------------------------------------
1 | # Server configuration
2 | GOOGLE_SLIDES_MCP_SERVER_PORT=5000
3 |
4 | # Google Cloud credentials path (optional)
5 | # If not provided, will look for credentials.json or service-account.json in the current directory
6 | # GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json
7 |
--------------------------------------------------------------------------------
/mcp_servers/google_slides/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.9-slim
2 |
3 | WORKDIR /app
4 |
5 | # Copy requirements and install dependencies
6 | COPY mcp_servers/google_slides/requirements.txt .
7 | RUN pip install --no-cache-dir -r requirements.txt
8 |
9 | # Copy the rest of the application
10 | COPY mcp_servers/google_slides/ .
11 |
12 | # Set the default port
13 | ENV GOOGLE_SLIDES_MCP_SERVER_PORT=5000
14 |
15 | # Command to run
16 | CMD ["python", "server.py"]
17 |
--------------------------------------------------------------------------------
/mcp_servers/google_slides/requirements.txt:
--------------------------------------------------------------------------------
1 | # Server dependencies
2 | starlette==0.31.1
3 | uvicorn==0.30.0
4 | click==8.1.7
5 | python-dotenv==1.0.1
6 |
7 | # MCP framework
8 | mcp>=0.7.1
9 |
10 | # Google API dependencies
11 | google-api-python-client==2.116.0
12 | google-auth-httplib2==0.1.1
13 | google-auth-oauthlib==1.2.0
14 |
--------------------------------------------------------------------------------
/mcp_servers/jira/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:22.12-alpine AS builder
2 |
3 | COPY mcp_servers/jira /app
4 |
5 | WORKDIR /app
6 |
7 | RUN --mount=type=cache,target=/root/.npm npm install
8 |
9 | RUN npm run build
10 |
11 | FROM node:22-alpine AS release
12 |
13 | COPY --from=builder /app/build /app/build
14 | COPY --from=builder /app/package.json /app/package.json
15 | COPY --from=builder /app/package-lock.json /app/package-lock.json
16 |
17 | ENV NODE_ENV=production
18 |
19 | EXPOSE 5000
20 |
21 | WORKDIR /app
22 |
23 | RUN npm ci --ignore-scripts --omit-dev
24 |
25 | ENTRYPOINT ["node", "build/index.js"]
--------------------------------------------------------------------------------
/mcp_servers/jira/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/mcp-server-jira",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "keywords": [],
6 | "author": "",
7 | "license": "ISC",
8 | "description": "",
9 | "dependencies": {
10 | "@modelcontextprotocol/sdk": "^1.11.1",
11 | "dotenv": "^16.3.1",
12 | "express": "^5.1.0",
13 | "node-fetch": "^3.3.2",
14 | "zod": "^3.24.2"
15 | },
16 | "devDependencies": {
17 | "@types/express": "^5.0.0",
18 | "@types/node": "^22.13.5",
19 | "typescript": "^5.7.3"
20 | },
21 | "type": "module",
22 | "scripts": {
23 | "build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\""
24 | }
25 | }
--------------------------------------------------------------------------------
/mcp_servers/jira/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "module": "NodeNext",
5 | "moduleResolution": "NodeNext",
6 | "outDir": "./build",
7 | "rootDir": ".",
8 | "strict": true,
9 | "esModuleInterop": true,
10 | "skipLibCheck": true,
11 | "forceConsistentCasingInFileNames": true
12 | },
13 | "include": ["./**/*"],
14 | "exclude": ["node_modules"]
15 | }
--------------------------------------------------------------------------------
/mcp_servers/linear/.env.example:
--------------------------------------------------------------------------------
1 | LINEAR_MCP_SERVER_PORT=5000
--------------------------------------------------------------------------------
/mcp_servers/linear/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy only the requirements first to leverage Docker cache
11 | COPY mcp_servers/linear/requirements.txt .
12 | RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | COPY mcp_servers/linear/server.py .
15 | COPY mcp_servers/linear/tools/ ./tools/
16 |
17 | COPY mcp_servers/linear/.env.example .env
18 |
19 | # Expose the port the server runs on
20 | EXPOSE 5001
21 |
22 | # Command to run the server
23 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/linear/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.8.1
2 | pydantic
3 | fastapi
4 | uvicorn[standard]
5 | python-dotenv
6 | typing-extensions
7 | requests
8 | httpx
9 | click
10 | starlette
--------------------------------------------------------------------------------
/mcp_servers/linear/tools/__init__.py:
--------------------------------------------------------------------------------
1 | # Linear MCP Server Tools
2 | # This package contains all the tool implementations organized by object type
3 |
4 | from .teams import get_teams
5 | from .issues import get_issues, get_issue_by_id, create_issue, update_issue, search_issues
6 | from .projects import get_projects, create_project, update_project
7 | from .comments import get_comments, create_comment, update_comment
8 | from .base import auth_token_context
9 |
10 | __all__ = [
11 | # Teams
12 | "get_teams",
13 |
14 | # Issues
15 | "get_issues",
16 | "get_issue_by_id",
17 | "create_issue",
18 | "update_issue",
19 | "search_issues",
20 |
21 | # Projects
22 | "get_projects",
23 | "create_project",
24 | "update_project",
25 |
26 | # Comments
27 | "get_comments",
28 | "create_comment",
29 | "update_comment",
30 |
31 | # Base
32 | "auth_token_context",
33 | ]
--------------------------------------------------------------------------------
/mcp_servers/linear/tools/base.py:
--------------------------------------------------------------------------------
1 | import logging
2 | from typing import Any, Dict
3 | from contextvars import ContextVar
4 | import httpx
5 |
6 | # Configure logging
7 | logger = logging.getLogger(__name__)
8 |
9 | LINEAR_API_ENDPOINT = "https://api.linear.app/graphql"
10 |
11 | # Context variable to store the access token for each request
12 | auth_token_context: ContextVar[str] = ContextVar('auth_token')
13 |
14 | def get_auth_token() -> str:
15 | """Get the authentication token from context."""
16 | try:
17 | return auth_token_context.get()
18 | except LookupError:
19 | raise RuntimeError("Authentication token not found in request context")
20 |
21 | async def make_graphql_request(query: str, variables: Dict[str, Any] = None) -> Dict[str, Any]:
22 | """Make a GraphQL request to Linear API."""
23 | access_token = get_auth_token()
24 |
25 | headers = {
26 | "Authorization": access_token,
27 | "Content-Type": "application/json"
28 | }
29 |
30 | payload = {"query": query}
31 | if variables:
32 | payload["variables"] = variables
33 |
34 | async with httpx.AsyncClient() as client:
35 | response = await client.post(LINEAR_API_ENDPOINT, json=payload, headers=headers)
36 | response.raise_for_status()
37 | return response.json()
--------------------------------------------------------------------------------
/mcp_servers/linear/tools/teams.py:
--------------------------------------------------------------------------------
1 | import logging
2 | from typing import Any, Dict
3 | from .base import make_graphql_request
4 |
5 | # Configure logging
6 | logger = logging.getLogger(__name__)
7 |
8 | async def get_teams() -> Dict[str, Any]:
9 | """Get all teams."""
10 | logger.info("Executing tool: get_teams")
11 | try:
12 | query = """
13 | query Teams {
14 | teams {
15 | nodes {
16 | id
17 | name
18 | key
19 | description
20 | private
21 | createdAt
22 | updatedAt
23 | }
24 | }
25 | }
26 | """
27 | return await make_graphql_request(query)
28 | except Exception as e:
29 | logger.exception(f"Error executing tool get_teams: {e}")
30 | raise e
--------------------------------------------------------------------------------
/mcp_servers/markitdown/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy only the requirements first to leverage Docker cache
11 | COPY mcp_servers/markitdown/requirements.txt .
12 | RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | # Copy the server code
15 | COPY mcp_servers/markitdown/server.py .
16 |
17 | # Expose the port the server runs on
18 | EXPOSE 5000
19 |
20 | # Command to run the server
21 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/markitdown/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.8.1
2 | markitdown[all]
3 | pydantic
4 | fastapi
5 | uvicorn[standard]
--------------------------------------------------------------------------------
/mcp_servers/notion/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | Dockerfile
3 | docker-compose.yml
--------------------------------------------------------------------------------
/mcp_servers/notion/.env.example:
--------------------------------------------------------------------------------
1 | # Notion API Key (optional, can be provided via x-auth-token header)
2 | NOTION_API_KEY=your_notion_api_key
3 |
4 | # Notion API Version (optional, defaults to 2022-06-28)
5 | NOTION_VERSION=2022-06-28
6 |
7 | # Notion API Base URL (optional)
8 | NOTION_API_BASE_URL=https://api.notion.com/v1
9 |
10 | # Path to OpenAPI spec (optional)
11 | # OPENAPI_SPEC_PATH=./scripts/notion-openapi.json
12 |
13 | # Port to run the server on (optional, defaults to 5000)
14 | # PORT=5000
--------------------------------------------------------------------------------
/mcp_servers/notion/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | build/
3 | dist
4 | bin/
5 |
6 | .cache
7 | .yarn/cache
8 | .eslintcache
9 |
10 | .cursor
11 |
12 | .DS_Store
13 |
--------------------------------------------------------------------------------
/mcp_servers/notion/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:22.12-alpine AS builder
2 |
3 | COPY . /app
4 |
5 | WORKDIR /app
6 |
7 | # Install all dependencies
8 | RUN npm install
9 |
10 | # Build the project
11 | RUN npm run build
12 |
13 | FROM node:22-alpine AS release
14 |
15 | # Copy build artifacts and dependencies
16 | COPY --from=builder /app/build /app/build
17 | COPY --from=builder /app/bin /app/bin
18 | COPY --from=builder /app/package.json /app/package.json
19 | COPY --from=builder /app/package-lock.json /app/package-lock.json
20 | COPY --from=builder /app/src /app/src
21 | COPY --from=builder /app/scripts /app/scripts
22 | COPY --from=builder /app/index.ts /app/index.ts
23 |
24 | ENV NODE_ENV=production
25 |
26 | EXPOSE 5000
27 |
28 | WORKDIR /app
29 |
30 | # Install dependencies including tsx for running TypeScript directly
31 | RUN npm install --production && npm install -g tsx
32 |
33 | # Run the server using the index.ts at the root level
34 | CMD ["tsx", "index.ts"]
--------------------------------------------------------------------------------
/mcp_servers/notion/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | notion-mcp-server:
3 | build: .
4 | stdin_open: true
5 | tty: true
6 | restart: unless-stopped
7 |
--------------------------------------------------------------------------------
/mcp_servers/notion/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/notion-mcp-server",
3 | "keywords": [
4 | "notion",
5 | "api",
6 | "mcp",
7 | "server"
8 | ],
9 | "version": "1.6.0",
10 | "license": "MIT",
11 | "type": "module",
12 | "scripts": {
13 | "build": "tsc -build && node scripts/build-cli.js",
14 | "dev": "tsx watch scripts/start-server.ts",
15 | "start": "tsx index.ts"
16 | },
17 | "bin": {
18 | "notion-mcp-server": "bin/cli.mjs"
19 | },
20 | "dependencies": {
21 | "@modelcontextprotocol/sdk": "^1.8.0",
22 | "axios": "^1.8.4",
23 | "dotenv": "^16.4.5",
24 | "express": "^4.21.2",
25 | "form-data": "^4.0.1",
26 | "mustache": "^4.2.0",
27 | "openapi-client-axios": "^7.5.5",
28 | "openapi-schema-validator": "^12.1.3",
29 | "openapi-types": "^12.1.3",
30 | "which": "^5.0.0",
31 | "zod": "3.24.1"
32 | },
33 | "devDependencies": {
34 | "@anthropic-ai/sdk": "^0.33.1",
35 | "@types/express": "^5.0.0",
36 | "@types/js-yaml": "^4.0.9",
37 | "@types/json-schema": "^7.0.15",
38 | "@types/mustache": "^4.2.5",
39 | "@types/node": "^20.17.16",
40 | "@types/which": "^3.0.4",
41 | "@vitest/coverage-v8": "3.1.1",
42 | "esbuild": "^0.25.2",
43 | "multer": "1.4.5-lts.1",
44 | "openai": "^4.91.1",
45 | "tsx": "^4.19.3",
46 | "typescript": "^5.8.2",
47 | "vitest": "^3.1.1"
48 | },
49 | "description": "Klavis MCP server for Notion",
50 | "main": "index.js"
51 | }
52 |
--------------------------------------------------------------------------------
/mcp_servers/notion/scripts/build-cli.js:
--------------------------------------------------------------------------------
1 | import * as esbuild from 'esbuild';
2 | import { chmod } from 'fs/promises';
3 | import { fileURLToPath } from 'url';
4 | import { dirname, join } from 'path';
5 |
6 | const __dirname = dirname(fileURLToPath(import.meta.url));
7 |
8 | async function build() {
9 | await esbuild.build({
10 | entryPoints: [join(__dirname, 'start-server.ts')],
11 | bundle: true,
12 | minify: true,
13 | platform: 'node',
14 | target: 'node18',
15 | format: 'esm',
16 | outfile: 'bin/cli.mjs',
17 | banner: {
18 | js: "#!/usr/bin/env node\nimport { createRequire } from 'module';const require = createRequire(import.meta.url);" // see https://github.com/evanw/esbuild/pull/2067
19 | },
20 | external: ['util'],
21 | });
22 |
23 | // Make the output file executable
24 | await chmod('./bin/cli.mjs', 0o755);
25 | }
26 |
27 | build().catch((err) => {
28 | console.error(err);
29 | process.exit(1);
30 | });
31 |
--------------------------------------------------------------------------------
/mcp_servers/notion/scripts/start-server.ts:
--------------------------------------------------------------------------------
1 | import path from 'node:path'
2 | import { fileURLToPath } from 'url'
3 | import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
4 |
5 | import { initProxy, ValidationError } from '../src/init-server.js'
6 |
7 | export async function startServer(args: string[] = process.argv.slice(2)) {
8 | const filename = fileURLToPath(import.meta.url)
9 | const directory = path.dirname(filename)
10 | const specPath = path.resolve(directory, '../scripts/notion-openapi.json')
11 |
12 | const baseUrl = process.env.BASE_URL ?? undefined
13 |
14 | const proxy = await initProxy(specPath, baseUrl)
15 | await proxy.connect(new StdioServerTransport())
16 |
17 | return proxy.getServer()
18 | }
19 |
20 | startServer().catch(error => {
21 | if (error instanceof ValidationError) {
22 | console.error('Invalid OpenAPI 3.1 specification:')
23 | error.errors.forEach(err => console.error(err))
24 | } else {
25 | console.error('Error:', error)
26 | }
27 | process.exit(1)
28 | })
29 |
--------------------------------------------------------------------------------
/mcp_servers/notion/src/init-server.ts:
--------------------------------------------------------------------------------
1 | import fs from 'node:fs'
2 | import path from 'node:path'
3 |
4 | import { OpenAPIV3 } from 'openapi-types'
5 | import OpenAPISchemaValidator from 'openapi-schema-validator'
6 |
7 | import { MCPProxy } from './openapi-mcp-server/mcp/proxy.js'
8 |
9 | export class ValidationError extends Error {
10 | constructor(public errors: any[]) {
11 | super('OpenAPI validation failed')
12 | this.name = 'ValidationError'
13 | }
14 | }
15 |
16 | async function loadOpenApiSpec(specPath: string, baseUrl: string | undefined): Promise {
17 | let rawSpec: string
18 |
19 | try {
20 | rawSpec = fs.readFileSync(path.resolve(process.cwd(), specPath), 'utf-8')
21 | } catch (error) {
22 | console.error('Failed to read OpenAPI specification file:', (error as Error).message)
23 | process.exit(1)
24 | }
25 |
26 | // Parse and validate the OpenApi Spec
27 | try {
28 | const parsed = JSON.parse(rawSpec)
29 |
30 | // Override baseUrl if specified.
31 | if (baseUrl) {
32 | parsed.servers[0].url = baseUrl
33 | }
34 |
35 | return parsed as OpenAPIV3.Document
36 | } catch (error) {
37 | if (error instanceof ValidationError) {
38 | throw error
39 | }
40 | console.error('Failed to parse OpenAPI spec:', (error as Error).message)
41 | process.exit(1)
42 | }
43 | }
44 |
45 | export async function initProxy(specPath: string, baseUrl: string |undefined) {
46 | const openApiSpec = await loadOpenApiSpec(specPath, baseUrl)
47 | const proxy = new MCPProxy('Notion API', openApiSpec)
48 |
49 | return proxy
50 | }
51 |
--------------------------------------------------------------------------------
/mcp_servers/notion/src/openapi-mcp-server/index.ts:
--------------------------------------------------------------------------------
1 | export { OpenAPIToMCPConverter } from './openapi/parser.js'
2 | export { HttpClient } from './client/http-client.js'
3 | export type { OpenAPIV3, OpenAPIV3_1 } from 'openapi-types'
4 |
--------------------------------------------------------------------------------
/mcp_servers/notion/src/openapi-mcp-server/openapi/file-upload.ts:
--------------------------------------------------------------------------------
1 | import { OpenAPIV3 } from 'openapi-types'
2 |
3 | /**
4 | * Identifies file upload parameters in an OpenAPI operation
5 | * @param operation The OpenAPI operation object to check
6 | * @returns Array of parameter names that are file uploads
7 | */
8 | export function isFileUploadParameter(operation: OpenAPIV3.OperationObject): string[] {
9 | const fileParams: string[] = []
10 |
11 | if (!operation.requestBody) return fileParams
12 |
13 | const requestBody = operation.requestBody as OpenAPIV3.RequestBodyObject
14 | const content = requestBody.content || {}
15 |
16 | // Check multipart/form-data content type for file uploads
17 | const multipartContent = content['multipart/form-data']
18 | if (!multipartContent?.schema) return fileParams
19 |
20 | const schema = multipartContent.schema as OpenAPIV3.SchemaObject
21 | if (schema.type !== 'object' || !schema.properties) return fileParams
22 |
23 | // Look for properties with type: string, format: binary which indicates file uploads
24 | Object.entries(schema.properties).forEach(([propName, prop]) => {
25 | const schemaProp = prop as OpenAPIV3.SchemaObject
26 | if (schemaProp.type === 'string' && schemaProp.format === 'binary') {
27 | fileParams.push(propName)
28 | }
29 |
30 | // Check for array of files
31 | if (schemaProp.type === 'array' && schemaProp.items) {
32 | const itemSchema = schemaProp.items as OpenAPIV3.SchemaObject
33 | if (itemSchema.type === 'string' && itemSchema.format === 'binary') {
34 | fileParams.push(propName)
35 | }
36 | }
37 | })
38 |
39 | return fileParams
40 | }
41 |
--------------------------------------------------------------------------------
/mcp_servers/notion/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "declaration": true,
5 | "declarationMap": true,
6 | "sourceMap": true,
7 | "outDir": "./build",
8 | "target": "es2021",
9 | "lib": ["es2022"],
10 | "jsx": "react-jsx",
11 | "module": "es2022",
12 | "moduleResolution": "Bundler",
13 | "types": ["node"],
14 | "resolveJsonModule": true,
15 | "allowJs": true,
16 | "checkJs": false,
17 | "isolatedModules": true,
18 | "allowSyntheticDefaultImports": true,
19 | "forceConsistentCasingInFileNames": true,
20 | "strict": true,
21 | "skipLibCheck": true
22 | },
23 | "include": ["test/**/*.ts", "scripts/**/*.ts", "src/**/*.ts"]
24 | }
25 |
--------------------------------------------------------------------------------
/mcp_servers/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "klavis-ai-mcp-servers",
3 | "version": "1.0.0",
4 | "private": true,
5 | "scripts": {
6 | "lint": "eslint \"**/*.ts\" --max-warnings=0",
7 | "lint:fix": "eslint \"**/*.ts\" --fix",
8 | "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
9 | "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"",
10 | "typecheck": "tsc --noEmit"
11 | },
12 | "devDependencies": {
13 | "@typescript-eslint/eslint-plugin": "^7.0.0",
14 | "@typescript-eslint/parser": "^7.0.0",
15 | "eslint": "^8.56.0",
16 | "eslint-config-prettier": "^9.1.0",
17 | "eslint-plugin-prettier": "^5.2.6",
18 | "lint-staged": "^15.5.1",
19 | "prettier": "^3.5.3"
20 | }
21 | }
--------------------------------------------------------------------------------
/mcp_servers/pandoc/.env.example:
--------------------------------------------------------------------------------
1 | GCS_BUCKET_NAME=GCS_BUCKET_NAME
--------------------------------------------------------------------------------
/mcp_servers/pandoc/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | texlive-latex-base \
9 | texlive-fonts-recommended \
10 | texlive-fonts-extra \
11 | texlive-latex-extra \
12 | lmodern \
13 | && rm -rf /var/lib/apt/lists/*
14 |
15 | # Copy only the requirements first to leverage Docker cache
16 | COPY mcp_servers/pandoc/requirements.txt .
17 | RUN pip install --no-cache-dir -r requirements.txt
18 |
19 | # Copy the server code
20 | COPY mcp_servers/pandoc/server.py .
21 | COPY mcp_servers/pandoc/.env.example .env
22 |
23 | # Expose the port the server runs on
24 | EXPOSE 5000
25 |
26 | # Command to run the server
27 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/pandoc/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.8.1
2 | pydantic>=2.0.0
3 | fastapi>=0.100.0
4 | uvicorn[standard]>=0.22.0
5 | pypandoc_binary>=1.15
6 | google-cloud-storage>=2.10.0
7 | python-dotenv>=1.0.0
8 | requests>=2.31.0
--------------------------------------------------------------------------------
/mcp_servers/perplexity/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "eslint:recommended",
4 | "plugin:@typescript-eslint/recommended",
5 | "prettier"
6 | ],
7 | "parser": "@typescript-eslint/parser",
8 | "plugins": [
9 | "@typescript-eslint"
10 | ],
11 | "root": true
12 | }
--------------------------------------------------------------------------------
/mcp_servers/perplexity/Dockerfile:
--------------------------------------------------------------------------------
1 | # Use a Node.js image as the base for building the application
2 | FROM node:22-alpine AS builder
3 |
4 | # Set the working directory inside the container
5 | WORKDIR /app
6 |
7 | # Copy package.json and package-lock.json to install dependencies
8 | COPY mcp_servers/perplexity/package.json mcp_servers/perplexity/package-lock.json ./
9 |
10 | # Install dependencies (ignoring scripts to prevent running the prepare script)
11 | RUN npm install --ignore-scripts
12 |
13 | # Copy the rest of the application source code
14 | COPY mcp_servers/perplexity .
15 |
16 | # Build the application using TypeScript
17 | RUN npm run build
18 |
19 | # Use a smaller Node.js image for the final image
20 | FROM node:22-slim AS release
21 |
22 | # Set the working directory inside the container
23 | WORKDIR /app
24 |
25 | # Copy the built application from the builder stage
26 | COPY --from=builder /app/dist /app/dist
27 | COPY --from=builder /app/package.json /app/package.json
28 | COPY --from=builder /app/package-lock.json /app/package-lock.json
29 | # Install only production dependencies
30 | RUN npm ci --omit=dev --ignore-scripts
31 |
32 | EXPOSE 5000
33 |
34 | # Specify the command to run the application
35 | ENTRYPOINT ["node", "dist/index.js"]
36 |
--------------------------------------------------------------------------------
/mcp_servers/perplexity/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/mcp-server-perplexity",
3 | "version": "1.0.0",
4 | "description": "MCP server for Perplexity API integration. Supports various Perplexity models for general queries, deep research, and reasoning tasks.",
5 | "type": "module",
6 | "bin": {
7 | "perplexity-mcp": "dist/index.js"
8 | },
9 | "files": [
10 | "dist"
11 | ],
12 | "publishConfig": {
13 | "access": "public"
14 | },
15 | "scripts": {
16 | "build": "tsc && node -e \"require('fs').chmodSync('dist/index.js', '755')\"",
17 | "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
18 | "start": "node dist/index.js",
19 | "lint": "eslint src/**/*.ts",
20 | "lint:fix": "eslint src/**/*.ts --fix",
21 | "format": "prettier --write .",
22 | "prepare": "npm run build",
23 | "publish": "npm run build && npm publish"
24 | },
25 | "license": "MIT",
26 | "dependencies": {
27 | "@modelcontextprotocol/sdk": "^1.11.1",
28 | "axios": "^1.6.2",
29 | "dotenv": "^16.4.7"
30 | },
31 | "devDependencies": {
32 | "@jest/globals": "^29.7.0",
33 | "@types/jest": "^29.5.14",
34 | "@types/node": "^20.10.5",
35 | "@typescript-eslint/eslint-plugin": "^7.0.0",
36 | "@typescript-eslint/parser": "^7.0.0",
37 | "eslint": "^8.56.0",
38 | "eslint-config-prettier": "^9.1.0",
39 | "jest": "^29.7.0",
40 | "jest-mock-extended": "^4.0.0-beta1",
41 | "prettier": "^3.1.1",
42 | "shx": "^0.3.4",
43 | "ts-jest": "^29.1.1",
44 | "typescript": "^5.3.3"
45 | },
46 | "engines": {
47 | "node": ">=18.0.0"
48 | },
49 | "keywords": [
50 | "mcp",
51 | "perplexity",
52 | "ai",
53 | "llm",
54 | "modelcontextprotocol"
55 | ],
56 | "author": "Klavis AI",
57 | "homepage": "https://modelcontextprotocol.io"
58 | }
59 |
--------------------------------------------------------------------------------
/mcp_servers/perplexity/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2015",
4 | "module": "ESNext",
5 | "outDir": "./dist",
6 | "rootDir": ".",
7 | "strict": true,
8 | "esModuleInterop": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "skipLibCheck": true,
11 | "moduleResolution": "node"
12 | },
13 | "include": [
14 | "./**/*.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/mcp_servers/postgres/.env.example:
--------------------------------------------------------------------------------
1 | # Database connection string (e.g. postgres://username:password@host:port/database)
2 | DATABASE_URL=postgres://postgres:password@localhost:5432/postgres
--------------------------------------------------------------------------------
/mcp_servers/postgres/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": false,
3 | "extends": [
4 | "../.eslintrc.js"
5 | ],
6 | "parserOptions": {
7 | "tsconfigRootDir": ".",
8 | "project": "./tsconfig.json"
9 | },
10 | "rules": {}
11 | }
--------------------------------------------------------------------------------
/mcp_servers/postgres/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:22.12-alpine AS builder
2 |
3 | COPY mcp_servers/postgres /app
4 |
5 | WORKDIR /app
6 |
7 | RUN --mount=type=cache,target=/root/.npm npm install
8 |
9 | RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev
10 |
11 | FROM node:22-alpine AS release
12 |
13 | COPY --from=builder /app/dist /app/dist
14 | COPY --from=builder /app/package.json /app/package.json
15 | COPY --from=builder /app/package-lock.json /app/package-lock.json
16 |
17 | ENV NODE_ENV=production
18 |
19 | EXPOSE 5000
20 |
21 | WORKDIR /app
22 |
23 | RUN npm ci --ignore-scripts --omit-dev
24 |
25 | ENTRYPOINT ["node", "dist/index.js"]
--------------------------------------------------------------------------------
/mcp_servers/postgres/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/mcp-server-postgres",
3 | "version": "0.6.2",
4 | "description": "MCP server for interacting with PostgreSQL databases",
5 | "license": "MIT",
6 | "author": "Klavis AI (https://klavis.ai)",
7 | "homepage": "https://klavis.ai",
8 | "type": "module",
9 | "bin": {
10 | "mcp-server-postgres": "dist/index.js"
11 | },
12 | "files": [
13 | "dist"
14 | ],
15 | "scripts": {
16 | "start": "tsc && shx chmod +x dist/*.js && node dist/index.js",
17 | "build": "tsc && shx chmod +x dist/*.js",
18 | "prepare": "npm run build",
19 | "watch": "tsc --watch"
20 | },
21 | "dependencies": {
22 | "@modelcontextprotocol/sdk": "1.11.1",
23 | "dotenv": "^16.4.5",
24 | "pg": "^8.13.0",
25 | "express": "^4.21.2"
26 | },
27 | "devDependencies": {
28 | "@types/node": "^22.13.17",
29 | "@types/pg": "^8.11.11",
30 | "@types/express": "^5.0.0",
31 | "shx": "^0.3.4",
32 | "typescript": "^5.6.2"
33 | }
34 | }
--------------------------------------------------------------------------------
/mcp_servers/postgres/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "module": "Node16",
5 | "moduleResolution": "Node16",
6 | "strict": true,
7 | "esModuleInterop": true,
8 | "skipLibCheck": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "resolveJsonModule": true,
11 | "outDir": "./dist",
12 | "rootDir": "."
13 | },
14 | "exclude": [
15 | "node_modules"
16 | ],
17 | "include": [
18 | "./**/*.ts"
19 | ]
20 | }
--------------------------------------------------------------------------------
/mcp_servers/report_generation/.env.example:
--------------------------------------------------------------------------------
1 | # Anthropic API credentials
2 | ANTHROPIC_API_KEY=your_anthropic_api_key
3 |
4 | # Supabase configuration
5 | SUPABASE_URL=https://your-project-id.supabase.co
6 | SUPABASE_KEY=your_supabase_key
7 |
8 | # Firecrawl API key
9 | FIRECRAWL_API_KEY=your_firecrawl_api_key
--------------------------------------------------------------------------------
/mcp_servers/report_generation/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy only the requirements first to leverage Docker cache
11 | COPY mcp_servers/report_generation/requirements.txt .
12 | RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | # Copy the server code
15 | COPY mcp_servers/report_generation/server.py .
16 |
17 | # Expose the port the server runs on
18 | EXPOSE 5000
19 |
20 | # Command to run the server
21 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/report_generation/requirements.txt:
--------------------------------------------------------------------------------
1 | anthropic>=0.21.0
2 | httpx>=0.27.0
3 | supabase>=2.3.0
4 | python-dotenv>=1.0.0
5 | asyncio>=3.4.3
6 | mcp>=1.8.1
7 | requests>=2.31.0
--------------------------------------------------------------------------------
/mcp_servers/resend/.env.example:
--------------------------------------------------------------------------------
1 | # Resend API key
2 | # Set this variable to use a fixed API key instead of requiring it in request headers
3 | RESEND_API_KEY=your_resend_api_key_here
--------------------------------------------------------------------------------
/mcp_servers/resend/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": false,
3 | "extends": [
4 | "../.eslintrc.js"
5 | ],
6 | "parserOptions": {
7 | "tsconfigRootDir": ".",
8 | "project": "./tsconfig.json"
9 | },
10 | "rules": {}
11 | }
--------------------------------------------------------------------------------
/mcp_servers/resend/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:22.12-alpine AS builder
2 |
3 | COPY . /app
4 |
5 | WORKDIR /app
6 |
7 | RUN --mount=type=cache,target=/root/.npm npm install
8 |
9 | RUN npm run build
10 |
11 | FROM node:22-alpine AS release
12 |
13 | COPY --from=builder /app/build /app/build
14 | COPY --from=builder /app/package.json /app/package.json
15 | COPY --from=builder /app/package-lock.json /app/package-lock.json
16 |
17 | ENV NODE_ENV=production
18 |
19 | EXPOSE 5000
20 |
21 | WORKDIR /app
22 |
23 | RUN npm ci --ignore-scripts --omit-dev
24 |
25 | ENTRYPOINT ["node", "build/index.js"]
--------------------------------------------------------------------------------
/mcp_servers/resend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/mcp-server-resend",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "keywords": [],
6 | "author": "Klavis AI",
7 | "license": "MIT",
8 | "description": "Klavis MCP server for Resend",
9 | "dependencies": {
10 | "@modelcontextprotocol/sdk": "^1.11.1",
11 | "@react-email/components": "^0.0.33",
12 | "@react-email/render": "^1.0.5",
13 | "dotenv": "^16.3.1",
14 | "resend": "^4.1.2",
15 | "zod": "^3.24.2",
16 | "express": "^5.1.0"
17 | },
18 | "devDependencies": {
19 | "@types/node": "^22.13.5",
20 | "@types/react": "^18.2.64",
21 | "@types/react-dom": "^18.2.21",
22 | "@types/express": "^5.0.0",
23 | "typescript": "^5.7.3"
24 | },
25 | "type": "module",
26 | "scripts": {
27 | "build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\""
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/mcp_servers/resend/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "module": "NodeNext",
5 | "moduleResolution": "NodeNext",
6 | "jsx": "react-jsx",
7 | "outDir": "./build",
8 | "rootDir": ".",
9 | "strict": true,
10 | "esModuleInterop": true,
11 | "skipLibCheck": true,
12 | "forceConsistentCasingInFileNames": true
13 | },
14 | "include": ["./**/*"],
15 | "exclude": ["node_modules"]
16 | }
17 |
--------------------------------------------------------------------------------
/mcp_servers/salesforce/.env.example:
--------------------------------------------------------------------------------
1 | # Port for the MCP server to listen on
2 | SALESFORCE_MCP_SERVER_PORT=5000
3 |
--------------------------------------------------------------------------------
/mcp_servers/salesforce/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy only the requirements first to leverage Docker cache
11 | COPY mcp_servers/salesforce/requirements.txt .
12 | RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | # Copy the server code
15 | COPY mcp_servers/salesforce/server.py .
16 |
17 | # Expose the port the server runs on
18 | EXPOSE 5001
19 |
20 | # Command to run the server
21 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/salesforce/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.0.0
2 | starlette>=0.40.0
3 | uvicorn>=0.32.1
4 | click>=8.1.7
5 | python-dotenv>=1.0.1
6 | simple-salesforce>=1.12.6
7 | requests>=2.32.3
--------------------------------------------------------------------------------
/mcp_servers/shopify/.env.example:
--------------------------------------------------------------------------------
1 | # Port number to listen on
2 | PORT=5000
3 |
4 | # Shopify Authentication Token
5 | SHOPIFY_SHOP_DOMAIN=your-shopify-store.shopify.com
6 |
7 | # Shopify api token (Make sure to set permissions properly, according to the use case)
8 | SHOPIFY_ACCESS_TOKEN=your-shopify-api-token
--------------------------------------------------------------------------------
/mcp_servers/shopify/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": false,
3 | "extends": [
4 | "../.eslintrc.js"
5 | ],
6 | "parserOptions": {
7 | "tsconfigRootDir": ".",
8 | "project": "./tsconfig.json"
9 | },
10 | "rules": {}
11 | }
--------------------------------------------------------------------------------
/mcp_servers/shopify/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:22-alpine AS builder
2 |
3 | COPY mcp_servers/shopify /app
4 |
5 | WORKDIR /app
6 |
7 | RUN --mount=type=cache,target=/root/.npm npm install
8 | RUN npm run build
9 |
10 | FROM node:22-alpine AS release
11 |
12 | COPY --from=builder /app/dist /app/dist
13 | COPY --from=builder /app/package.json /app/package.json
14 | COPY --from=builder /app/package-lock.json /app/package-lock.json
15 |
16 | ENV NODE_ENV=production
17 |
18 | EXPOSE 5000
19 |
20 | WORKDIR /app
21 |
22 | RUN npm ci --ignore-scripts --omit-dev
23 |
24 | ENTRYPOINT ["node", "dist/index.js"]
25 |
--------------------------------------------------------------------------------
/mcp_servers/shopify/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/shopify-mcp-server",
3 | "version": "0.1.0",
4 | "description": "MCP server for interacting with Shopify",
5 | "license": "MIT",
6 | "homepage": "https://www.klavis.ai",
7 | "type": "module",
8 | "bin": {
9 | "mcp-server-shopify": "dist/index.js"
10 | },
11 | "files": [
12 | "dist"
13 | ],
14 | "scripts": {
15 | "start": "tsc && shx chmod +x dist/*.js && node dist/index.js",
16 | "build": "tsc && shx chmod +x dist/*.js",
17 | "prepare": "npm run build",
18 | "watch": "tsc --watch",
19 | "test": "node test-sse.js"
20 | },
21 | "dependencies": {
22 | "@modelcontextprotocol/sdk": "^1.11.1",
23 | "@types/node": "^22",
24 | "express": "^4.21.2",
25 | "@supabase/supabase-js": "^2.49.1",
26 | "zod": "^3.22.4",
27 | "zod-to-json-schema": "^3.23.5",
28 | "dotenv": "^16.3.1"
29 | },
30 | "devDependencies": {
31 | "@types/express": "^5.0.0",
32 | "eventsource": "^2.0.2",
33 | "node-fetch": "^3.3.2",
34 | "shx": "^0.3.4",
35 | "typescript": "^5.6.2"
36 | }
37 | }
--------------------------------------------------------------------------------
/mcp_servers/shopify/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "outDir": "./dist",
4 | "rootDir": ".",
5 | "target": "ES2022",
6 | "module": "NodeNext",
7 | "moduleResolution": "NodeNext",
8 | "esModuleInterop": true,
9 | "strict": true,
10 | "skipLibCheck": true,
11 | "forceConsistentCasingInFileNames": true,
12 | "resolveJsonModule": true
13 | },
14 | "include": ["./**/*.ts"]
15 | }
16 |
--------------------------------------------------------------------------------
/mcp_servers/slack/.env.example:
--------------------------------------------------------------------------------
1 | # Slack Authentication Token
2 | SLACK_AUTH_TOKEN=xoxb-your-token-here
3 |
4 | # Slack Team ID (already used in the code)
5 | SLACK_TEAM_ID=your-team-id-here
--------------------------------------------------------------------------------
/mcp_servers/slack/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": false,
3 | "extends": [
4 | "../.eslintrc.js"
5 | ],
6 | "parserOptions": {
7 | "tsconfigRootDir": ".",
8 | "project": "./tsconfig.json"
9 | },
10 | "rules": {}
11 | }
--------------------------------------------------------------------------------
/mcp_servers/slack/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:22-alpine AS builder
2 |
3 | COPY mcp_servers/slack /app
4 |
5 | WORKDIR /app
6 |
7 | RUN --mount=type=cache,target=/root/.npm npm install
8 | RUN npm run build
9 |
10 | FROM node:22-alpine AS release
11 |
12 | COPY --from=builder /app/dist /app/dist
13 | COPY --from=builder /app/package.json /app/package.json
14 | COPY --from=builder /app/package-lock.json /app/package-lock.json
15 |
16 | ENV NODE_ENV=production
17 |
18 | EXPOSE 5000
19 |
20 | WORKDIR /app
21 |
22 | RUN npm ci --ignore-scripts --omit-dev
23 |
24 | ENTRYPOINT ["node", "dist/index.js"]
25 |
--------------------------------------------------------------------------------
/mcp_servers/slack/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/slack-mcp-server",
3 | "version": "0.6.2",
4 | "description": "MCP server for interacting with Slack",
5 | "license": "MIT",
6 | "homepage": "https://www.klavis.ai",
7 | "type": "module",
8 | "bin": {
9 | "mcp-server-slack": "dist/index.js"
10 | },
11 | "files": [
12 | "dist"
13 | ],
14 | "scripts": {
15 | "start": "tsc && shx chmod +x dist/*.js && node dist/index.js",
16 | "build": "tsc && shx chmod +x dist/*.js",
17 | "prepare": "npm run build",
18 | "watch": "tsc --watch",
19 | "test": "node test-sse.js"
20 | },
21 | "dependencies": {
22 | "@modelcontextprotocol/sdk": "^1.11.1",
23 | "@types/node": "^22",
24 | "express": "^4.21.2",
25 | "@supabase/supabase-js": "^2.49.1",
26 | "zod": "^3.22.4",
27 | "zod-to-json-schema": "^3.23.5"
28 | },
29 | "devDependencies": {
30 | "@types/express": "^5.0.0",
31 | "eventsource": "^2.0.2",
32 | "node-fetch": "^3.3.2",
33 | "shx": "^0.3.4",
34 | "typescript": "^5.6.2"
35 | }
36 | }
--------------------------------------------------------------------------------
/mcp_servers/slack/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "outDir": "./dist",
4 | "rootDir": ".",
5 | "target": "ES2022",
6 | "module": "NodeNext",
7 | "moduleResolution": "NodeNext",
8 | "esModuleInterop": true,
9 | "strict": true,
10 | "skipLibCheck": true,
11 | "forceConsistentCasingInFileNames": true,
12 | "resolveJsonModule": true
13 | },
14 | "include": ["./**/*.ts"]
15 | }
16 |
--------------------------------------------------------------------------------
/mcp_servers/stripe/Dockerfile:
--------------------------------------------------------------------------------
1 | # Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2 | # Use the Python base image
3 | FROM python:3.12-slim
4 |
5 | # Set the working directory
6 | WORKDIR /app
7 |
8 | # Install system dependencies
9 | RUN apt-get update && apt-get install -y --no-install-recommends \
10 | gcc \
11 | && rm -rf /var/lib/apt/lists/*
12 |
13 | # Copy requirements file
14 | COPY mcp_servers/stripe/requirements.txt .
15 | RUN pip install --no-cache-dir -r requirements.txt
16 |
17 | # Copy the server code
18 | COPY mcp_servers/stripe/src /app/src
19 |
20 | # Create a sample .env file
21 | RUN echo "STRIPE_API_KEY=your-stripe-api-key\nSTRIPE_MCP_SERVER_PORT=5002" > .env
22 |
23 | # Expose the port the server runs on
24 | EXPOSE 5002
25 |
26 | # Command to run the server
27 | CMD ["python", "src/server.py"]
28 |
--------------------------------------------------------------------------------
/mcp_servers/stripe/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.8.1
2 | pydantic
3 | fastapi
4 | uvicorn[standard]
5 | aiohttp
6 | python-dotenv
7 | typing-extensions
8 | click
9 | starlette
10 | stripe>=7.0.0
--------------------------------------------------------------------------------
/mcp_servers/stripe/src/__init__.py:
--------------------------------------------------------------------------------
1 | import asyncio
2 |
3 | from . import server
4 |
5 | __version__ = "0.1.7"
6 |
7 |
8 | def main():
9 | """Main entry point for the package."""
10 | asyncio.run(server.main())
11 |
12 |
13 | __all__ = ["main", "server", "__version__"]
--------------------------------------------------------------------------------
/mcp_servers/supabase/.env.example:
--------------------------------------------------------------------------------
1 | # Supabase MCP Server Environment Variables
2 |
3 | # Auth token for API access
4 | # If set, this token will be used instead of the x-auth-token header
5 | SUPABASE_AUTH_TOKEN=
6 |
7 | # Example:
8 | # SUPABASE_AUTH_TOKEN=your-auth-token-here
9 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": false,
3 | "extends": [
4 | "../.eslintrc.js"
5 | ],
6 | "parserOptions": {
7 | "tsconfigRootDir": ".",
8 | "project": "./tsconfig.json"
9 | },
10 | "rules": {
11 | // Package-specific rules can go here
12 | }
13 | }
--------------------------------------------------------------------------------
/mcp_servers/supabase/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:22.12-alpine AS builder
2 |
3 | COPY mcp_servers/supabase /app
4 |
5 | WORKDIR /app
6 |
7 | RUN --mount=type=cache,target=/root/.npm npm install
8 |
9 | RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev
10 |
11 | FROM node:22-alpine AS release
12 |
13 | COPY --from=builder /app/dist /app/dist
14 | COPY --from=builder /app/package.json /app/package.json
15 | COPY --from=builder /app/package-lock.json /app/package-lock.json
16 |
17 | ENV NODE_ENV=production
18 |
19 | EXPOSE 5000
20 |
21 | WORKDIR /app
22 |
23 | RUN npm ci --ignore-scripts --omit-dev
24 |
25 | ENTRYPOINT ["node", "dist/sse.cjs"]
--------------------------------------------------------------------------------
/mcp_servers/supabase/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@supabase/mcp-server-supabase",
3 | "version": "0.3.5",
4 | "description": "MCP server for interacting with Supabase",
5 | "license": "Apache-2.0",
6 | "type": "module",
7 | "main": "dist/index.cjs",
8 | "types": "dist/index.d.ts",
9 | "sideEffects": false,
10 | "scripts": {
11 | "build": "tsup --clean",
12 | "start": "node dist/sse.cjs",
13 | "prepublishOnly": "npm run build",
14 | "test": "vitest",
15 | "test:e2e": "vitest --project e2e",
16 | "test:unit": "vitest --project unit",
17 | "generate:management-api-types": "openapi-typescript https://api.supabase.com/api/v1-json -o ./src/management-api/types.ts"
18 | },
19 | "files": [
20 | "dist/**/*"
21 | ],
22 | "bin": {
23 | "supabase": "./dist/sse.js"
24 | },
25 | "exports": {
26 | ".": {
27 | "import": "./dist/index.js",
28 | "types": "./dist/index.d.ts",
29 | "default": "./dist/index.cjs"
30 | }
31 | },
32 | "dependencies": {
33 | "@modelcontextprotocol/sdk": "^1.11.1",
34 | "@supabase/mcp-utils": "0.1.3",
35 | "common-tags": "^1.8.2",
36 | "openapi-fetch": "^0.13.4",
37 | "zod": "^3.24.1",
38 | "express": "^5.1.0"
39 | },
40 | "devDependencies": {
41 | "@ai-sdk/anthropic": "^1.2.9",
42 | "@electric-sql/pglite": "^0.2.17",
43 | "@total-typescript/tsconfig": "^1.0.4",
44 | "@types/common-tags": "^1.8.4",
45 | "@types/node": "^22.8.6",
46 | "@types/express": "^5.0.0",
47 | "ai": "^4.3.4",
48 | "date-fns": "^4.1.0",
49 | "dotenv": "^16.5.0",
50 | "msw": "^2.7.3",
51 | "nanoid": "^5.1.5",
52 | "openapi-typescript": "^7.5.0",
53 | "openapi-typescript-helpers": "^0.0.15",
54 | "prettier": "^3.3.3",
55 | "tsup": "^8.3.5",
56 | "tsx": "^4.19.2",
57 | "typescript": "^5.6.3",
58 | "vitest": "^2.1.9"
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './server.js';
2 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/src/password.ts:
--------------------------------------------------------------------------------
1 | const UPPERCASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
2 | const LOWERCASE_CHARS = 'abcdefghijklmnopqrstuvwxyz';
3 | const NUMBER_CHARS = '0123456789';
4 | const SYMBOL_CHARS = '!@#$%^&*()_+~`|}{[]:;?><,./-=';
5 |
6 | export type GeneratePasswordOptions = {
7 | length?: number;
8 | numbers?: boolean;
9 | uppercase?: boolean;
10 | lowercase?: boolean;
11 | symbols?: boolean;
12 | };
13 |
14 | /**
15 | * Generates a cryptographically secure random password.
16 | *
17 | * @returns The generated password
18 | */
19 | export const generatePassword = ({
20 | length = 10,
21 | numbers = false,
22 | symbols = false,
23 | uppercase = true,
24 | lowercase = true,
25 | } = {}) => {
26 | // Build the character set based on options
27 | let chars = '';
28 | if (uppercase) {
29 | chars += UPPERCASE_CHARS;
30 | }
31 | if (lowercase) {
32 | chars += LOWERCASE_CHARS;
33 | }
34 | if (numbers) {
35 | chars += NUMBER_CHARS;
36 | }
37 | if (symbols) {
38 | chars += SYMBOL_CHARS;
39 | }
40 |
41 | if (chars.length === 0) {
42 | throw new Error('at least one character set must be selected');
43 | }
44 |
45 | const randomValues = new Uint32Array(length);
46 | crypto.getRandomValues(randomValues);
47 |
48 | // Map random values to our character set
49 | let password = '';
50 | for (let i = 0; i < length; i++) {
51 | const randomIndex = randomValues[i]! % chars.length;
52 | password += chars.charAt(randomIndex);
53 | }
54 |
55 | return password;
56 | };
57 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/src/pg-meta/extensions.sql:
--------------------------------------------------------------------------------
1 | SELECT
2 | e.name,
3 | n.nspname AS schema,
4 | e.default_version,
5 | x.extversion AS installed_version,
6 | e.comment
7 | FROM
8 | pg_available_extensions() e(name, default_version, comment)
9 | LEFT JOIN pg_extension x ON e.name = x.extname
10 | LEFT JOIN pg_namespace n ON x.extnamespace = n.oid
11 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/src/pg-meta/index.ts:
--------------------------------------------------------------------------------
1 | import { stripIndent } from 'common-tags';
2 | import columnsSql from './columns.sql';
3 | import extensionsSql from './extensions.sql';
4 | import tablesSql from './tables.sql';
5 |
6 | export const DEFAULT_SYSTEM_SCHEMAS = [
7 | 'information_schema',
8 | 'pg_catalog',
9 | 'pg_toast',
10 | ];
11 |
12 | /**
13 | * Generates the SQL query to list tables in the database.
14 | */
15 | export function listTablesSql(schemas: string[] = []) {
16 | let sql = stripIndent`
17 | with
18 | tables as (${tablesSql}),
19 | columns as (${columnsSql})
20 | select
21 | *,
22 | ${coalesceRowsToArray('columns', 'columns.table_id = tables.id')}
23 | from tables
24 | `;
25 |
26 | if (schemas.length > 0) {
27 | sql += ` where schema in (${schemas.map((s) => `'${s}'`).join(',')})`;
28 | } else {
29 | sql += ` where schema not in (${DEFAULT_SYSTEM_SCHEMAS.map((s) => `'${s}'`).join(',')})`;
30 | }
31 |
32 | return sql;
33 | }
34 |
35 | /**
36 | * Generates the SQL query to list all extensions in the database.
37 | */
38 | export function listExtensionsSql() {
39 | return extensionsSql;
40 | }
41 |
42 | /**
43 | * Generates a SQL segment that coalesces rows into an array of JSON objects.
44 | */
45 | export const coalesceRowsToArray = (source: string, filter: string) => {
46 | return stripIndent`
47 | COALESCE(
48 | (
49 | SELECT
50 | array_agg(row_to_json(${source})) FILTER (WHERE ${filter})
51 | FROM
52 | ${source}
53 | ),
54 | '{}'
55 | ) AS ${source}
56 | `;
57 | };
58 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/src/types/sql.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.sql' {
2 | const content: string;
3 | export default content;
4 | }
5 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/test/extensions.d.ts:
--------------------------------------------------------------------------------
1 | import 'vitest';
2 |
3 | interface CustomMatchers {
4 | /**
5 | * Uses LLM-as-a-judge to evaluate the received string against
6 | * criteria described in natural language.
7 | */
8 | toMatchCriteria(criteria: string): Promise;
9 | }
10 |
11 | declare module 'vitest' {
12 | interface Assertion extends CustomMatchers {}
13 | interface AsymmetricMatchersContaining extends CustomMatchers {}
14 | }
15 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/test/extensions.ts:
--------------------------------------------------------------------------------
1 | import { anthropic } from '@ai-sdk/anthropic';
2 | import { generateObject } from 'ai';
3 | import { codeBlock, stripIndent } from 'common-tags';
4 | import { expect } from 'vitest';
5 | import { z } from 'zod';
6 |
7 | const model = anthropic('claude-3-7-sonnet-20250219');
8 |
9 | expect.extend({
10 | async toMatchCriteria(received: string, criteria: string) {
11 | const completionResponse = await generateObject({
12 | model,
13 | schema: z.object({
14 | pass: z
15 | .boolean()
16 | .describe("Whether the 'Received' adheres to the test 'Criteria'"),
17 | reason: z
18 | .string()
19 | .describe(
20 | "The reason why 'Received' does or does not adhere to the test 'Criteria'. Must explain exactly which part of 'Received' did or did not pass the test 'Criteria'."
21 | ),
22 | }),
23 | messages: [
24 | {
25 | role: 'system',
26 | content: stripIndent`
27 | You are a test runner. Your job is to evaluate whether 'Received' adheres to the test 'Criteria'.
28 | `,
29 | },
30 | {
31 | role: 'user',
32 | content: codeBlock`
33 | Received:
34 | ${received}
35 |
36 | Criteria:
37 | ${criteria}
38 | `,
39 | },
40 | ],
41 | });
42 |
43 | const { pass, reason } = completionResponse.object;
44 |
45 | return {
46 | message: () =>
47 | codeBlock`
48 | ${this.utils.matcherHint('toMatchCriteria', received, criteria, {
49 | comment: `evaluated by LLM '${model.modelId}'`,
50 | isNot: this.isNot,
51 | promise: this.promise,
52 | })}
53 |
54 | ${reason}
55 | `,
56 | pass,
57 | };
58 | },
59 | });
60 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@total-typescript/tsconfig/bundler/dom/library",
3 | "include": [
4 | "src/**/*.ts"
5 | ],
6 | "compilerOptions": {
7 | "target": "ES2022",
8 | "module": "NodeNext",
9 | "moduleResolution": "NodeNext",
10 | "outDir": "./dist",
11 | "rootDir": ".",
12 | "strict": true,
13 | "esModuleInterop": true,
14 | "skipLibCheck": true,
15 | "forceConsistentCasingInFileNames": true,
16 | "resolveJsonModule": true
17 | }
18 | }
--------------------------------------------------------------------------------
/mcp_servers/supabase/tsup.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'tsup';
2 |
3 | export default defineConfig([
4 | {
5 | entry: ['src/index.ts', 'src/sse.ts'],
6 | format: ['cjs', 'esm'],
7 | outDir: 'dist',
8 | sourcemap: true,
9 | dts: true,
10 | minify: true,
11 | splitting: true,
12 | loader: {
13 | '.sql': 'text',
14 | },
15 | },
16 | ]);
17 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/vitest.setup.ts:
--------------------------------------------------------------------------------
1 | import { config } from 'dotenv';
2 | import { statSync } from 'fs';
3 | import './test/extensions.js';
4 |
5 | if (!process.env.CI) {
6 | const envPath = '.env.local';
7 | statSync(envPath);
8 | config({ path: envPath });
9 | }
10 |
--------------------------------------------------------------------------------
/mcp_servers/supabase/vitest.workspace.ts:
--------------------------------------------------------------------------------
1 | import { readFile } from 'fs/promises';
2 | import { Plugin } from 'vite';
3 | import { defineWorkspace } from 'vitest/config';
4 |
5 | function sqlLoaderPlugin(): Plugin {
6 | return {
7 | name: 'sql-loader',
8 | async transform(code, id) {
9 | if (id.endsWith('.sql')) {
10 | const textContent = await readFile(id, 'utf8');
11 | return `export default ${JSON.stringify(textContent)};`;
12 | }
13 | return code;
14 | },
15 | };
16 | }
17 |
18 | export default defineWorkspace([
19 | {
20 | plugins: [sqlLoaderPlugin()],
21 | test: {
22 | name: 'unit',
23 | include: ['src/**/*.{test,spec}.ts'],
24 | setupFiles: ['./vitest.setup.ts'],
25 | testTimeout: 30_000, // PGlite can take a while to initialize
26 | },
27 | },
28 | {
29 | plugins: [sqlLoaderPlugin()],
30 | test: {
31 | name: 'e2e',
32 | include: ['test/**/*.e2e.ts'],
33 | setupFiles: ['./vitest.setup.ts'],
34 | testTimeout: 30_000,
35 | },
36 | },
37 | ]);
38 |
--------------------------------------------------------------------------------
/mcp_servers/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "module": "NodeNext",
5 | "moduleResolution": "NodeNext",
6 | "esModuleInterop": true,
7 | "outDir": "./dist",
8 | "rootDir": ".",
9 | "skipLibCheck": true,
10 | "forceConsistentCasingInFileNames": true,
11 | "resolveJsonModule": true,
12 | "strict": true,
13 | "declaration": true
14 | },
15 | "include": [
16 | "./**/*.ts"
17 | ],
18 | "exclude": [
19 | "node_modules",
20 | "dist"
21 | ]
22 | }
--------------------------------------------------------------------------------
/mcp_servers/wordpress/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": false,
3 | "extends": [
4 | "../.eslintrc.js"
5 | ],
6 | "parserOptions": {
7 | "tsconfigRootDir": ".",
8 | "project": "./tsconfig.json"
9 | },
10 | "rules": {}
11 | }
--------------------------------------------------------------------------------
/mcp_servers/wordpress/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:22.12-alpine AS builder
2 |
3 | COPY mcp_servers/wordpress /app
4 |
5 | WORKDIR /app
6 |
7 | RUN --mount=type=cache,target=/root/.npm npm install
8 |
9 | RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev
10 |
11 | FROM node:22-alpine AS release
12 |
13 | COPY --from=builder /app/dist /app/dist
14 | COPY --from=builder /app/package.json /app/package.json
15 | COPY --from=builder /app/package-lock.json /app/package-lock.json
16 |
17 | ENV NODE_ENV=production
18 |
19 | EXPOSE 5000
20 |
21 | WORKDIR /app
22 |
23 | RUN npm ci --ignore-scripts --omit-dev
24 |
25 | ENTRYPOINT ["node", "dist/index.js"]
--------------------------------------------------------------------------------
/mcp_servers/wordpress/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@klavis-ai/mcp-server-wordpress",
3 | "version": "0.6.2",
4 | "description": "MCP server for interacting with WordPress sites",
5 | "license": "MIT",
6 | "author": "Klavis AI (https://klavis.ai)",
7 | "homepage": "https://klavis.ai",
8 | "type": "module",
9 | "bin": {
10 | "mcp-server-wordpress": "dist/index.js"
11 | },
12 | "files": [
13 | "dist"
14 | ],
15 | "scripts": {
16 | "start": "tsc && shx chmod +x dist/*.js && node dist/index.js",
17 | "build": "tsc && shx chmod +x dist/*.js",
18 | "prepare": "npm run build",
19 | "watch": "tsc --watch"
20 | },
21 | "dependencies": {
22 | "@modelcontextprotocol/sdk": "1.11.1",
23 | "dotenv": "^16.4.5",
24 | "express": "^4.21.2"
25 | },
26 | "devDependencies": {
27 | "@types/node": "^22.13.17",
28 | "@types/express": "^5.0.0",
29 | "shx": "^0.3.4",
30 | "typescript": "^5.6.2"
31 | }
32 | }
--------------------------------------------------------------------------------
/mcp_servers/wordpress/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "module": "Node16",
5 | "moduleResolution": "Node16",
6 | "strict": true,
7 | "esModuleInterop": true,
8 | "skipLibCheck": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "resolveJsonModule": true,
11 | "outDir": "./dist",
12 | "rootDir": "."
13 | },
14 | "exclude": [
15 | "node_modules"
16 | ],
17 | "include": [
18 | "./**/*.ts"
19 | ]
20 | }
--------------------------------------------------------------------------------
/mcp_servers/youtube/.env.example:
--------------------------------------------------------------------------------
1 | YOUTUBE_API_KEY=YOUR_API_KEY_HERE
2 | TRANSCRIPT_LANGUAGE=en,fr,de
3 | # YOUTUBE_MCP_SERVER_PORT=5000
4 | # WEBSHARE_PROXY_USERNAME=YOUR_USERNAME_HERE
5 | # WEBSHARE_PROXY_PASSWORD=YOUR_PASSWORD_HERE
--------------------------------------------------------------------------------
/mcp_servers/youtube/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.12-slim
2 |
3 | WORKDIR /app
4 |
5 | # Install system dependencies
6 | RUN apt-get update && apt-get install -y --no-install-recommends \
7 | gcc \
8 | && rm -rf /var/lib/apt/lists/*
9 |
10 | # Copy only the requirements first to leverage Docker cache
11 | COPY mcp_servers/youtube/requirements.txt .
12 | RUN pip install --no-cache-dir -r requirements.txt
13 |
14 | # Copy the server code
15 | COPY mcp_servers/youtube/server.py .
16 |
17 | COPY mcp_servers/youtube/.env.example .env
18 |
19 | # Expose the port the server runs on
20 | EXPOSE 5000
21 |
22 | # Command to run the server
23 | CMD ["python", "server.py"]
--------------------------------------------------------------------------------
/mcp_servers/youtube/requirements.txt:
--------------------------------------------------------------------------------
1 | mcp>=1.8.1
2 | pydantic
3 | fastapi
4 | uvicorn[standard]
5 | aiohttp
6 | python-dotenv
7 | typing-extensions
8 | youtube-transcript-api>=1.0.3
--------------------------------------------------------------------------------
/openapitools.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3 | "spaces": 2,
4 | "generator-cli": {
5 | "version": "7.13.0"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "klavis",
3 | "lockfileVersion": 3,
4 | "requires": true,
5 | "packages": {}
6 | }
7 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/LICENSE.mustache:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 Klavis AI
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/README.mustache:
--------------------------------------------------------------------------------
1 | # {{{projectName}}}
2 | {{#appDescriptionWithNewLines}}
3 | {{{.}}}
4 | {{/appDescriptionWithNewLines}}
5 |
6 | This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
7 |
8 | - API version: {{appVersion}}
9 | - Package version: {{packageVersion}}
10 | {{^hideGenerationTimestamp}}
11 | - Build date: {{generatedDate}}
12 | {{/hideGenerationTimestamp}}
13 | - Generator version: {{generatorVersion}}
14 | - Build package: {{generatorClass}}
15 | {{#infoUrl}}
16 | For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
17 | {{/infoUrl}}
18 |
19 | ## Requirements.
20 |
21 | Python {{{generatorLanguageVersion}}}
22 |
23 | ## Installation & Usage
24 | ### pip install
25 |
26 | If the python package is hosted on a repository, you can install directly using:
27 |
28 | ```sh
29 | pip install git+https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}.git
30 | ```
31 | (you may need to run `pip` with root permission: `sudo pip install git+https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}.git`)
32 |
33 | Then import the package:
34 | ```python
35 | import {{{packageName}}}
36 | ```
37 |
38 | ### Setuptools
39 |
40 | Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
41 |
42 | ```sh
43 | python setup.py install --user
44 | ```
45 | (or `sudo python setup.py install` to install the package for all users)
46 |
47 | Then import the package:
48 | ```python
49 | import {{{packageName}}}
50 | ```
51 |
52 | ### Tests
53 |
54 | Execute `pytest` to run the tests.
55 |
56 | ## Getting Started
57 |
58 | Please follow the [installation procedure](#installation--usage) and then run the following:
59 |
60 | {{> common_README }}
61 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/README_onlypackage.mustache:
--------------------------------------------------------------------------------
1 | # {{{projectName}}}
2 | {{#appDescription}}
3 | {{{.}}}
4 | {{/appDescription}}
5 |
6 | The `{{packageName}}` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
7 |
8 | - API version: {{appVersion}}
9 | - Package version: {{packageVersion}}
10 | {{^hideGenerationTimestamp}}
11 | - Build date: {{generatedDate}}
12 | {{/hideGenerationTimestamp}}
13 | - Generator version: {{generatorVersion}}
14 | - Build package: {{generatorClass}}
15 | {{#infoUrl}}
16 | For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
17 | {{/infoUrl}}
18 |
19 | ## Requirements.
20 |
21 | Python {{{generatorLanguageVersion}}}
22 |
23 | ## Installation & Usage
24 |
25 | This python library package is generated without supporting files like setup.py or requirements files
26 |
27 | To be able to use it, you will need these dependencies in your own package that uses this library:
28 |
29 | * urllib3 >= 2.1.0, < 3.0.0
30 | * python-dateutil >= 2.8.2
31 | {{#asyncio}}
32 | * aiohttp >= 3.8.4
33 | * aiohttp-retry >= 2.8.3
34 | {{/asyncio}}
35 | {{#tornado}}
36 | * tornado >= 4.2, < 5
37 | {{/tornado}}
38 | {{#hasHttpSignatureMethods}}
39 | * pem >= 19.3.0
40 | * pycryptodome >= 3.9.0
41 | {{/hasHttpSignatureMethods}}
42 | * pydantic >= 2
43 | * typing-extensions >= 4.7.1
44 |
45 | ## Getting Started
46 |
47 | In your own code, to use this library to connect and interact with {{{projectName}}},
48 | you can run the following:
49 |
50 | {{> common_README }}
51 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/__init__.mustache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/sdks/openapi-templates/python-sdk-templates/__init__.mustache
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/__init__api.mustache:
--------------------------------------------------------------------------------
1 | # flake8: noqa
2 |
3 | # import apis into api package
4 | {{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classFilename}} import {{classname}}
5 | {{/apis}}{{/apiInfo}}
6 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/__init__model.mustache:
--------------------------------------------------------------------------------
1 | # coding: utf-8
2 |
3 | # flake8: noqa
4 | {{>partial_header}}
5 |
6 | # import models into model package
7 | {{#models}}
8 | {{#model}}
9 | from {{modelPackage}}.{{classFilename}} import {{classname}}
10 | {{/model}}
11 | {{/models}}
12 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/__init__package.mustache:
--------------------------------------------------------------------------------
1 | # coding: utf-8
2 |
3 | # flake8: noqa
4 |
5 | {{>partial_header}}
6 |
7 | __version__ = "{{packageVersion}}"
8 |
9 | # import apis into sdk package
10 | {{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classFilename}} import {{classname}}
11 | {{/apis}}{{/apiInfo}}
12 | # import ApiClient
13 | from {{packageName}}.api_response import ApiResponse
14 | from {{packageName}}.api_client import ApiClient
15 | from {{packageName}}.configuration import Configuration
16 | from {{packageName}}.exceptions import OpenApiException
17 | from {{packageName}}.exceptions import ApiTypeError
18 | from {{packageName}}.exceptions import ApiValueError
19 | from {{packageName}}.exceptions import ApiKeyError
20 | from {{packageName}}.exceptions import ApiAttributeError
21 | from {{packageName}}.exceptions import ApiException
22 | {{#hasHttpSignatureMethods}}
23 | from {{packageName}}.signing import HttpSigningConfiguration
24 | {{/hasHttpSignatureMethods}}
25 |
26 | # import models into sdk package
27 | {{#models}}
28 | {{#model}}
29 | from {{modelPackage}}.{{classFilename}} import {{classname}}
30 | {{/model}}
31 | {{/models}}
32 | {{#recursionLimit}}
33 |
34 | __import__('sys').setrecursionlimit({{{.}}})
35 | {{/recursionLimit}}
36 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/api_doc_example.mustache:
--------------------------------------------------------------------------------
1 |
2 | ```python
3 | import {{{packageName}}}
4 | {{#vendorExtensions.x-py-example-import}}
5 | {{{.}}}
6 | {{/vendorExtensions.x-py-example-import}}
7 | from {{{packageName}}}.rest import ApiException
8 | from pprint import pprint
9 |
10 | {{> python_doc_auth_partial}}
11 | # Enter a context with an instance of the API client
12 | {{#asyncio}}async {{/asyncio}}with {{{packageName}}}.ApiClient(configuration) as api_client:
13 | # Create an instance of the API class
14 | api_instance = {{{packageName}}}.{{{classname}}}(api_client)
15 | {{#allParams}}
16 | {{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}
17 | {{/allParams}}
18 |
19 | try:
20 | {{#summary}}
21 | # {{{.}}}
22 | {{/summary}}
23 | {{#returnType}}api_response = {{/returnType}}{{#asyncio}}await {{/asyncio}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}})
24 | {{#returnType}}
25 | print("The response of {{classname}}->{{operationId}}:\n")
26 | pprint(api_response)
27 | {{/returnType}}
28 | except Exception as e:
29 | print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e)
30 | ```
31 |
32 | {{#vendorExtensions.x-py-postponed-example-imports.size}}
33 | {{#vendorExtensions.x-py-postponed-example-imports}}
34 | {{{.}}}
35 | {{/vendorExtensions.x-py-postponed-example-imports}}
36 | {{classname}}.update_forward_refs()
37 | {{/vendorExtensions.x-py-postponed-example-imports.size}}
38 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/api_response.mustache:
--------------------------------------------------------------------------------
1 | """API response object."""
2 |
3 | from __future__ import annotations
4 | from typing import Optional, Generic, Mapping, TypeVar
5 | from pydantic import Field, StrictInt, StrictBytes, BaseModel
6 |
7 | T = TypeVar("T")
8 |
9 | class ApiResponse(BaseModel, Generic[T]):
10 | """
11 | API response object
12 | """
13 |
14 | status_code: StrictInt = Field(description="HTTP status code")
15 | headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers")
16 | data: T = Field(description="Deserialized data given the data type")
17 | raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
18 |
19 | model_config = {
20 | "arbitrary_types_allowed": True
21 | }
22 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/github-workflow.mustache:
--------------------------------------------------------------------------------
1 | # NOTE: This file is auto generated by OpenAPI Generator.
2 | # URL: https://openapi-generator.tech
3 | #
4 | # ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
5 |
6 | name: {{packageName}} Python package
7 | {{=<% %>=}}
8 |
9 | on: [push, pull_request]
10 |
11 | jobs:
12 | build:
13 |
14 | runs-on: ubuntu-latest
15 | strategy:
16 | matrix:
17 | python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
18 |
19 | steps:
20 | - uses: actions/checkout@v4
21 | - name: Set up Python ${{ matrix.python-version }}
22 | uses: actions/setup-python@v4
23 | with:
24 | python-version: ${{ matrix.python-version }}
25 | - name: Install dependencies
26 | run: |
27 | python -m pip install --upgrade pip
28 | pip install -r requirements.txt
29 | pip install -r test-requirements.txt
30 | - name: Test with pytest
31 | run: |
32 | pytest --cov=<%packageName%>
33 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/gitignore.mustache:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | env/
12 | build/
13 | develop-eggs/
14 | dist/
15 | downloads/
16 | eggs/
17 | .eggs/
18 | lib/
19 | lib64/
20 | parts/
21 | sdist/
22 | var/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 |
27 | # PyInstaller
28 | # Usually these files are written by a python script from a template
29 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
30 | *.manifest
31 | *.spec
32 |
33 | # Installer logs
34 | pip-log.txt
35 | pip-delete-this-directory.txt
36 |
37 | # Unit test / coverage reports
38 | htmlcov/
39 | .tox/
40 | .coverage
41 | .coverage.*
42 | .cache
43 | nosetests.xml
44 | coverage.xml
45 | *,cover
46 | .hypothesis/
47 | venv/
48 | .venv/
49 | .python-version
50 | .pytest_cache
51 |
52 | # Translations
53 | *.mo
54 | *.pot
55 |
56 | # Django stuff:
57 | *.log
58 |
59 | # Sphinx documentation
60 | docs/_build/
61 |
62 | # PyBuilder
63 | target/
64 |
65 | #Ipython Notebook
66 | .ipynb_checkpoints
67 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/gitlab-ci.mustache:
--------------------------------------------------------------------------------
1 | # NOTE: This file is auto generated by OpenAPI Generator.
2 | # URL: https://openapi-generator.tech
3 | #
4 | # ref: https://docs.gitlab.com/ee/ci/README.html
5 | # ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
6 |
7 | stages:
8 | - test
9 |
10 | .pytest:
11 | stage: test
12 | script:
13 | - pip install -r requirements.txt
14 | - pip install -r test-requirements.txt
15 | - pytest --cov={{{packageName}}}
16 |
17 | pytest-3.9:
18 | extends: .pytest
19 | image: python:3.9-alpine
20 | pytest-3.10:
21 | extends: .pytest
22 | image: python:3.10-alpine
23 | pytest-3.11:
24 | extends: .pytest
25 | image: python:3.11-alpine
26 | pytest-3.12:
27 | extends: .pytest
28 | image: python:3.12-alpine
29 | pytest-3.13:
30 | extends: .pytest
31 | image: python:3.13-alpine
32 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/model.mustache:
--------------------------------------------------------------------------------
1 | # coding: utf-8
2 |
3 | {{>partial_header}}
4 |
5 | {{#models}}
6 | {{#model}}
7 | {{#isEnum}}
8 | {{>model_enum}}
9 | {{/isEnum}}
10 | {{^isEnum}}
11 | {{#oneOf}}{{#-first}}{{>model_oneof}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>model_anyof}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>model_generic}}{{/anyOf}}{{/oneOf}}
12 | {{/isEnum}}
13 | {{/model}}
14 | {{/models}}
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/model_doc.mustache:
--------------------------------------------------------------------------------
1 | {{#models}}{{#model}}# {{classname}}
2 |
3 | {{#description}}{{&description}}
4 | {{/description}}
5 |
6 | {{^isEnum}}
7 | ## Properties
8 |
9 | Name | Type | Description | Notes
10 | ------------ | ------------- | ------------- | -------------
11 | {{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
12 | {{/vars}}
13 |
14 | ## Example
15 |
16 | ```python
17 | from {{modelPackage}}.{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}} import {{classname}}
18 |
19 | # TODO update the JSON string below
20 | json = "{}"
21 | # create an instance of {{classname}} from a JSON string
22 | {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_instance = {{classname}}.from_json(json)
23 | # print the JSON string representation of the object
24 | print({{classname}}.to_json())
25 |
26 | # convert the object into a dict
27 | {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict = {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_instance.to_dict()
28 | # create an instance of {{classname}} from a dict
29 | {{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_from_dict = {{classname}}.from_dict({{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}}_dict)
30 | ```
31 | {{/isEnum}}
32 | {{#isEnum}}
33 | ## Enum
34 | {{#allowableValues}}{{#enumVars}}
35 | * `{{name}}` (value: `{{{value}}}`)
36 | {{/enumVars}}{{/allowableValues}}
37 | {{/isEnum}}
38 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
39 |
40 | {{/model}}{{/models}}
41 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/model_enum.mustache:
--------------------------------------------------------------------------------
1 | from __future__ import annotations
2 | import json
3 | from enum import Enum
4 | {{#vendorExtensions.x-py-other-imports}}
5 | {{{.}}}
6 | {{/vendorExtensions.x-py-other-imports}}
7 | from typing_extensions import Self
8 |
9 |
10 | class {{classname}}({{vendorExtensions.x-py-enum-type}}, Enum):
11 | """
12 | {{{description}}}{{^description}}{{{classname}}}{{/description}}
13 | """
14 |
15 | """
16 | allowed enum values
17 | """
18 | {{#allowableValues}}
19 | {{#enumVars}}
20 | {{{name}}} = {{{value}}}
21 | {{/enumVars}}
22 |
23 | @classmethod
24 | def from_json(cls, json_str: str) -> Self:
25 | """Create an instance of {{classname}} from a JSON string"""
26 | return cls(json.loads(json_str))
27 |
28 | {{#defaultValue}}
29 |
30 | #
31 | @classmethod
32 | def _missing_value_(cls, value):
33 | if value is no_arg:
34 | return cls.{{{.}}}
35 | {{/defaultValue}}
36 | {{/allowableValues}}
37 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/partial_api_args.mustache:
--------------------------------------------------------------------------------
1 | (
2 | self,
3 | {{#allParams}}
4 | {{paramName}}: {{{vendorExtensions.x-py-typing}}}{{^required}} = None{{/required}},
5 | {{/allParams}}
6 | _request_timeout: Union[
7 | None,
8 | Annotated[StrictFloat, Field(gt=0)],
9 | Tuple[
10 | Annotated[StrictFloat, Field(gt=0)],
11 | Annotated[StrictFloat, Field(gt=0)]
12 | ]
13 | ] = None,
14 | _request_auth: Optional[Dict[StrictStr, Any]] = None,
15 | _content_type: Optional[StrictStr] = None,
16 | _headers: Optional[Dict[StrictStr, Any]] = None,
17 | _host_index: Annotated[StrictInt, Field(ge=0, le={{#servers.size}}{{servers.size}}{{/servers.size}}{{^servers.size}}1{{/servers.size}})] = 0,
18 | )
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/partial_header.mustache:
--------------------------------------------------------------------------------
1 | """
2 | {{#appName}}
3 | {{{.}}}
4 |
5 | {{/appName}}
6 | {{#appDescription}}
7 | {{{.}}}
8 |
9 | {{/appDescription}}
10 | {{#version}}
11 | The version of the OpenAPI document: {{{.}}}
12 | {{/version}}
13 | {{#infoEmail}}
14 | Contact: {{{.}}}
15 | {{/infoEmail}}
16 | Generated by OpenAPI Generator (https://openapi-generator.tech)
17 |
18 | Do not edit the class manually.
19 | """ # noqa: E501
20 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/py.typed.mustache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/sdks/openapi-templates/python-sdk-templates/py.typed.mustache
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/requirements.mustache:
--------------------------------------------------------------------------------
1 | urllib3 >= 2.1.0, < 3.0.0
2 | python_dateutil >= 2.8.2
3 | {{#asyncio}}
4 | aiohttp >= 3.8.4
5 | aiohttp-retry >= 2.8.3
6 | {{/asyncio}}
7 | {{#tornado}}
8 | tornado = ">= 4.2, < 5"
9 | {{/tornado}}
10 | {{#hasHttpSignatureMethods}}
11 | pem >= 19.3.0
12 | pycryptodome >= 3.9.0
13 | {{/hasHttpSignatureMethods}}
14 | pydantic >= 2
15 | typing-extensions >= 4.7.1
16 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/setup.mustache:
--------------------------------------------------------------------------------
1 | # coding: utf-8
2 |
3 | {{>partial_header}}
4 |
5 | from setuptools import setup, find_packages # noqa: H301
6 | from pathlib import Path
7 |
8 | # To install the library, run the following
9 | #
10 | # python setup.py install
11 | #
12 | # prerequisite: setuptools
13 | # http://pypi.python.org/pypi/setuptools
14 | NAME = "{{{projectName}}}"
15 | VERSION = "{{packageVersion}}"
16 | PYTHON_REQUIRES = ">= 3.9"
17 | REQUIRES = [
18 | "urllib3 >= 2.1.0, < 3.0.0",
19 | "python-dateutil >= 2.8.2",
20 | {{#asyncio}}
21 | "aiohttp >= 3.8.4",
22 | "aiohttp-retry >= 2.8.3",
23 | {{/asyncio}}
24 | {{#tornado}}
25 | "tornado>=4.2, < 5",
26 | {{/tornado}}
27 | {{#hasHttpSignatureMethods}}
28 | "pem >= 19.3.0",
29 | "pycryptodome >= 3.9.0",
30 | {{/hasHttpSignatureMethods}}
31 | "pydantic >= 2",
32 | "typing-extensions >= 4.7.1",
33 | ]
34 |
35 | this_directory = Path(__file__).parent
36 | long_description = (this_directory / "README.md").read_text()
37 |
38 | setup(
39 | name=NAME,
40 | version=VERSION,
41 | description="{{appName}}",
42 | author="{{infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}",
43 | author_email="{{infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}",
44 | url="{{packageUrl}}",
45 | keywords=["MCP", "AI", "LLM", "Klavis", "Klavis AI"],
46 | install_requires=REQUIRES,
47 | packages=find_packages(exclude=["test", "tests"]),
48 | include_package_data=True,
49 | {{#licenseInfo}}license="{{.}}",
50 | {{/licenseInfo}}long_description_content_type='text/markdown',
51 | long_description=long_description,
52 | package_data={"{{{packageName}}}": ["py.typed"]},
53 | )
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/setup_cfg.mustache:
--------------------------------------------------------------------------------
1 | [flake8]
2 | max-line-length=99
3 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/test-requirements.mustache:
--------------------------------------------------------------------------------
1 | pytest >= 7.2.1
2 | pytest-cov >= 2.8.1
3 | tox >= 3.9.0
4 | flake8 >= 4.0.0
5 | types-python-dateutil >= 2.8.19.14
6 | mypy >= 1.5
7 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/tox.mustache:
--------------------------------------------------------------------------------
1 | [tox]
2 | envlist = py3
3 |
4 | [testenv]
5 | deps=-r{toxinidir}/requirements.txt
6 | -r{toxinidir}/test-requirements.txt
7 |
8 | commands=
9 | pytest --cov={{{packageName}}}
10 |
--------------------------------------------------------------------------------
/sdks/openapi-templates/python-sdk-templates/travis.mustache:
--------------------------------------------------------------------------------
1 | # ref: https://docs.travis-ci.com/user/languages/python
2 | language: python
3 | python:
4 | - "3.9"
5 | - "3.10"
6 | - "3.11"
7 | - "3.12"
8 | - "3.13"
9 | # uncomment the following if needed
10 | #- "3.13-dev" # 3.13 development branch
11 | #- "nightly" # nightly build
12 | # command to install dependencies
13 | install:
14 | - "pip install -r requirements.txt"
15 | - "pip install -r test-requirements.txt"
16 | # command to run tests
17 | script: pytest --cov={{{packageName}}}
18 |
--------------------------------------------------------------------------------
/sdks/python/.github/workflows/python.yml:
--------------------------------------------------------------------------------
1 | # NOTE: This file is auto generated by OpenAPI Generator.
2 | # URL: https://openapi-generator.tech
3 | #
4 | # ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
5 |
6 | name: klavis Python package
7 |
8 | on: [push, pull_request]
9 |
10 | jobs:
11 | build:
12 |
13 | runs-on: ubuntu-latest
14 | strategy:
15 | matrix:
16 | python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
17 |
18 | steps:
19 | - uses: actions/checkout@v4
20 | - name: Set up Python ${{ matrix.python-version }}
21 | uses: actions/setup-python@v4
22 | with:
23 | python-version: ${{ matrix.python-version }}
24 | - name: Install dependencies
25 | run: |
26 | python -m pip install --upgrade pip
27 | pip install -r requirements.txt
28 | pip install -r test-requirements.txt
29 | - name: Test with pytest
30 | run: |
31 | pytest --cov=klavis
32 |
--------------------------------------------------------------------------------
/sdks/python/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | env/
12 | build/
13 | develop-eggs/
14 | dist/
15 | downloads/
16 | eggs/
17 | .eggs/
18 | lib/
19 | lib64/
20 | parts/
21 | sdist/
22 | var/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 |
27 | # PyInstaller
28 | # Usually these files are written by a python script from a template
29 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
30 | *.manifest
31 | *.spec
32 |
33 | # Installer logs
34 | pip-log.txt
35 | pip-delete-this-directory.txt
36 |
37 | # Unit test / coverage reports
38 | htmlcov/
39 | .tox/
40 | .coverage
41 | .coverage.*
42 | .cache
43 | nosetests.xml
44 | coverage.xml
45 | *,cover
46 | .hypothesis/
47 | venv/
48 | .venv/
49 | .python-version
50 | .pytest_cache
51 |
52 | # Translations
53 | *.mo
54 | *.pot
55 |
56 | # Django stuff:
57 | *.log
58 |
59 | # Sphinx documentation
60 | docs/_build/
61 |
62 | # PyBuilder
63 | target/
64 |
65 | #Ipython Notebook
66 | .ipynb_checkpoints
67 |
--------------------------------------------------------------------------------
/sdks/python/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | # NOTE: This file is auto generated by OpenAPI Generator.
2 | # URL: https://openapi-generator.tech
3 | #
4 | # ref: https://docs.gitlab.com/ee/ci/README.html
5 | # ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
6 |
7 | stages:
8 | - test
9 |
10 | .pytest:
11 | stage: test
12 | script:
13 | - pip install -r requirements.txt
14 | - pip install -r test-requirements.txt
15 | - pytest --cov=klavis
16 |
17 | pytest-3.9:
18 | extends: .pytest
19 | image: python:3.9-alpine
20 | pytest-3.10:
21 | extends: .pytest
22 | image: python:3.10-alpine
23 | pytest-3.11:
24 | extends: .pytest
25 | image: python:3.11-alpine
26 | pytest-3.12:
27 | extends: .pytest
28 | image: python:3.12-alpine
29 | pytest-3.13:
30 | extends: .pytest
31 | image: python:3.13-alpine
32 |
--------------------------------------------------------------------------------
/sdks/python/.openapi-generator-ignore:
--------------------------------------------------------------------------------
1 | # OpenAPI Generator Ignore
2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3 |
4 | # Use this file to prevent files from being overwritten by the generator.
5 | # The patterns follow closely to .gitignore or .dockerignore.
6 |
7 | # As an example, the C# client generator defines ApiClient.cs.
8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9 | #ApiClient.cs
10 |
11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12 | #foo/*/qux
13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14 |
15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16 | #foo/**/qux
17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18 |
19 | # You can also negate patterns with an exclamation (!).
20 | # For example, you can ignore all files in a docs folder with the file extension .md:
21 | #docs/*.md
22 | # Then explicitly reverse the ignore rule for a single file:
23 | #!docs/README.md
24 |
25 | README.md
--------------------------------------------------------------------------------
/sdks/python/.openapi-generator/VERSION:
--------------------------------------------------------------------------------
1 | 7.13.0
2 |
--------------------------------------------------------------------------------
/sdks/python/.travis.yml:
--------------------------------------------------------------------------------
1 | # ref: https://docs.travis-ci.com/user/languages/python
2 | language: python
3 | python:
4 | - "3.9"
5 | - "3.10"
6 | - "3.11"
7 | - "3.12"
8 | - "3.13"
9 | # uncomment the following if needed
10 | #- "3.13-dev" # 3.13 development branch
11 | #- "nightly" # nightly build
12 | # command to install dependencies
13 | install:
14 | - "pip install -r requirements.txt"
15 | - "pip install -r test-requirements.txt"
16 | # command to run tests
17 | script: pytest --cov=klavis
18 |
--------------------------------------------------------------------------------
/sdks/python/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 Klavis AI
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/sdks/python/docs/CallToolRequest.md:
--------------------------------------------------------------------------------
1 | # CallToolRequest
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **server_url** | **str** | The full URL for connecting to the MCP server via Server-Sent Events (SSE) |
9 | **tool_name** | **str** | The name of the tool to call |
10 | **tool_args** | **Dict[str, object]** | The input parameters for the tool | [optional]
11 |
12 | ## Example
13 |
14 | ```python
15 | from klavis.models.call_tool_request import CallToolRequest
16 |
17 | # TODO update the JSON string below
18 | json = "{}"
19 | # create an instance of CallToolRequest from a JSON string
20 | call_tool_request_instance = CallToolRequest.from_json(json)
21 | # print the JSON string representation of the object
22 | print(CallToolRequest.to_json())
23 |
24 | # convert the object into a dict
25 | call_tool_request_dict = call_tool_request_instance.to_dict()
26 | # create an instance of CallToolRequest from a dict
27 | call_tool_request_from_dict = CallToolRequest.from_dict(call_tool_request_dict)
28 | ```
29 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30 |
31 |
32 |
--------------------------------------------------------------------------------
/sdks/python/docs/CallToolResponse.md:
--------------------------------------------------------------------------------
1 | # CallToolResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **success** | **bool** | Whether the API call was successful |
9 | **result** | [**CallToolResult**](CallToolResult.md) | | [optional]
10 | **error** | **str** | | [optional]
11 |
12 | ## Example
13 |
14 | ```python
15 | from klavis.models.call_tool_response import CallToolResponse
16 |
17 | # TODO update the JSON string below
18 | json = "{}"
19 | # create an instance of CallToolResponse from a JSON string
20 | call_tool_response_instance = CallToolResponse.from_json(json)
21 | # print the JSON string representation of the object
22 | print(CallToolResponse.to_json())
23 |
24 | # convert the object into a dict
25 | call_tool_response_dict = call_tool_response_instance.to_dict()
26 | # create an instance of CallToolResponse from a dict
27 | call_tool_response_from_dict = CallToolResponse.from_dict(call_tool_response_dict)
28 | ```
29 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30 |
31 |
32 |
--------------------------------------------------------------------------------
/sdks/python/docs/CallToolResult.md:
--------------------------------------------------------------------------------
1 | # CallToolResult
2 |
3 | The server's response to a tool call.
4 |
5 | ## Properties
6 |
7 | Name | Type | Description | Notes
8 | ------------ | ------------- | ------------- | -------------
9 | **content** | **List[object]** | The content of the tool call |
10 | **is_error** | **bool** | Whether the tool call was successful | [optional] [default to False]
11 |
12 | ## Example
13 |
14 | ```python
15 | from klavis.models.call_tool_result import CallToolResult
16 |
17 | # TODO update the JSON string below
18 | json = "{}"
19 | # create an instance of CallToolResult from a JSON string
20 | call_tool_result_instance = CallToolResult.from_json(json)
21 | # print the JSON string representation of the object
22 | print(CallToolResult.to_json())
23 |
24 | # convert the object into a dict
25 | call_tool_result_dict = call_tool_result_instance.to_dict()
26 | # create an instance of CallToolResult from a dict
27 | call_tool_result_from_dict = CallToolResult.from_dict(call_tool_result_dict)
28 | ```
29 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30 |
31 |
32 |
--------------------------------------------------------------------------------
/sdks/python/docs/CreateServerRequest.md:
--------------------------------------------------------------------------------
1 | # CreateServerRequest
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **server_name** | [**ServerName**](ServerName.md) | The name of the target MCP server. |
9 | **user_id** | **str** | The identifier for the user requesting the server URL. |
10 | **platform_name** | **str** | The name of the platform associated with the user (e.g., 'Den', 'CamelAI'). |
11 |
12 | ## Example
13 |
14 | ```python
15 | from klavis.models.create_server_request import CreateServerRequest
16 |
17 | # TODO update the JSON string below
18 | json = "{}"
19 | # create an instance of CreateServerRequest from a JSON string
20 | create_server_request_instance = CreateServerRequest.from_json(json)
21 | # print the JSON string representation of the object
22 | print(CreateServerRequest.to_json())
23 |
24 | # convert the object into a dict
25 | create_server_request_dict = create_server_request_instance.to_dict()
26 | # create an instance of CreateServerRequest from a dict
27 | create_server_request_from_dict = CreateServerRequest.from_dict(create_server_request_dict)
28 | ```
29 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30 |
31 |
32 |
--------------------------------------------------------------------------------
/sdks/python/docs/CreateServerResponse.md:
--------------------------------------------------------------------------------
1 | # CreateServerResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **server_url** | **str** | The full URL for connecting to the MCP server via Server-Sent Events (SSE), including the instance ID. |
9 | **instance_id** | **str** | The unique identifier for this specific server connection instance. |
10 |
11 | ## Example
12 |
13 | ```python
14 | from klavis.models.create_server_response import CreateServerResponse
15 |
16 | # TODO update the JSON string below
17 | json = "{}"
18 | # create an instance of CreateServerResponse from a JSON string
19 | create_server_response_instance = CreateServerResponse.from_json(json)
20 | # print the JSON string representation of the object
21 | print(CreateServerResponse.to_json())
22 |
23 | # convert the object into a dict
24 | create_server_response_dict = create_server_response_instance.to_dict()
25 | # create an instance of CreateServerResponse from a dict
26 | create_server_response_from_dict = CreateServerResponse.from_dict(create_server_response_dict)
27 | ```
28 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/sdks/python/docs/CreateWhiteLabelingRequest.md:
--------------------------------------------------------------------------------
1 | # CreateWhiteLabelingRequest
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **client_id** | **str** | OAuth client ID |
9 | **client_secret** | **str** | OAuth client secret |
10 | **server_name** | [**WhiteLabelServerName**](WhiteLabelServerName.md) | Optional. The name of the server |
11 | **redirect_url** | **str** | | [optional]
12 | **scope** | **str** | | [optional]
13 | **account_id** | **str** | | [optional]
14 |
15 | ## Example
16 |
17 | ```python
18 | from klavis.models.create_white_labeling_request import CreateWhiteLabelingRequest
19 |
20 | # TODO update the JSON string below
21 | json = "{}"
22 | # create an instance of CreateWhiteLabelingRequest from a JSON string
23 | create_white_labeling_request_instance = CreateWhiteLabelingRequest.from_json(json)
24 | # print the JSON string representation of the object
25 | print(CreateWhiteLabelingRequest.to_json())
26 |
27 | # convert the object into a dict
28 | create_white_labeling_request_dict = create_white_labeling_request_instance.to_dict()
29 | # create an instance of CreateWhiteLabelingRequest from a dict
30 | create_white_labeling_request_from_dict = CreateWhiteLabelingRequest.from_dict(create_white_labeling_request_dict)
31 | ```
32 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
33 |
34 |
35 |
--------------------------------------------------------------------------------
/sdks/python/docs/GetInstanceResponse.md:
--------------------------------------------------------------------------------
1 | # GetInstanceResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **instance_id** | **str** | | [optional]
9 | **is_authenticated** | **bool** | Indicates whether the instance is authenticated successfully. | [optional] [default to False]
10 | **server_name** | **str** | The name of the MCP server associated with the instance. | [optional] [default to '']
11 | **platform** | **str** | The platform associated with the instance (e.g., 'Den', 'CamelAI'). | [optional] [default to '']
12 | **external_user_id** | **str** | The user's identifier on the external platform. | [optional] [default to '']
13 |
14 | ## Example
15 |
16 | ```python
17 | from klavis.models.get_instance_response import GetInstanceResponse
18 |
19 | # TODO update the JSON string below
20 | json = "{}"
21 | # create an instance of GetInstanceResponse from a JSON string
22 | get_instance_response_instance = GetInstanceResponse.from_json(json)
23 | # print the JSON string representation of the object
24 | print(GetInstanceResponse.to_json())
25 |
26 | # convert the object into a dict
27 | get_instance_response_dict = get_instance_response_instance.to_dict()
28 | # create an instance of GetInstanceResponse from a dict
29 | get_instance_response_from_dict = GetInstanceResponse.from_dict(get_instance_response_dict)
30 | ```
31 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
32 |
33 |
34 |
--------------------------------------------------------------------------------
/sdks/python/docs/GetMcpServersResponse.md:
--------------------------------------------------------------------------------
1 | # GetMcpServersResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **servers** | [**List[McpServer]**](McpServer.md) | |
9 |
10 | ## Example
11 |
12 | ```python
13 | from klavis.models.get_mcp_servers_response import GetMcpServersResponse
14 |
15 | # TODO update the JSON string below
16 | json = "{}"
17 | # create an instance of GetMcpServersResponse from a JSON string
18 | get_mcp_servers_response_instance = GetMcpServersResponse.from_json(json)
19 | # print the JSON string representation of the object
20 | print(GetMcpServersResponse.to_json())
21 |
22 | # convert the object into a dict
23 | get_mcp_servers_response_dict = get_mcp_servers_response_instance.to_dict()
24 | # create an instance of GetMcpServersResponse from a dict
25 | get_mcp_servers_response_from_dict = GetMcpServersResponse.from_dict(get_mcp_servers_response_dict)
26 | ```
27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sdks/python/docs/GetToolsResponse.md:
--------------------------------------------------------------------------------
1 | # GetToolsResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **tools** | [**List[ServerTool]**](ServerTool.md) | List of available tools with their descriptions | [optional]
9 |
10 | ## Example
11 |
12 | ```python
13 | from klavis.models.get_tools_response import GetToolsResponse
14 |
15 | # TODO update the JSON string below
16 | json = "{}"
17 | # create an instance of GetToolsResponse from a JSON string
18 | get_tools_response_instance = GetToolsResponse.from_json(json)
19 | # print the JSON string representation of the object
20 | print(GetToolsResponse.to_json())
21 |
22 | # convert the object into a dict
23 | get_tools_response_dict = get_tools_response_instance.to_dict()
24 | # create an instance of GetToolsResponse from a dict
25 | get_tools_response_from_dict = GetToolsResponse.from_dict(get_tools_response_dict)
26 | ```
27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sdks/python/docs/GithubOauthErrorResponse.md:
--------------------------------------------------------------------------------
1 | # GithubOauthErrorResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **error** | **str** | Error message from the OAuth process |
9 |
10 | ## Example
11 |
12 | ```python
13 | from klavis.models.github_oauth_error_response import GithubOauthErrorResponse
14 |
15 | # TODO update the JSON string below
16 | json = "{}"
17 | # create an instance of GithubOauthErrorResponse from a JSON string
18 | github_oauth_error_response_instance = GithubOauthErrorResponse.from_json(json)
19 | # print the JSON string representation of the object
20 | print(GithubOauthErrorResponse.to_json())
21 |
22 | # convert the object into a dict
23 | github_oauth_error_response_dict = github_oauth_error_response_instance.to_dict()
24 | # create an instance of GithubOauthErrorResponse from a dict
25 | github_oauth_error_response_from_dict = GithubOauthErrorResponse.from_dict(github_oauth_error_response_dict)
26 | ```
27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sdks/python/docs/GithubOauthSuccessResponse.md:
--------------------------------------------------------------------------------
1 | # GithubOauthSuccessResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **status** | **str** | Status of the OAuth process |
9 | **message** | **str** | Success message |
10 | **data** | **Dict[str, object]** | | [optional]
11 |
12 | ## Example
13 |
14 | ```python
15 | from klavis.models.github_oauth_success_response import GithubOauthSuccessResponse
16 |
17 | # TODO update the JSON string below
18 | json = "{}"
19 | # create an instance of GithubOauthSuccessResponse from a JSON string
20 | github_oauth_success_response_instance = GithubOauthSuccessResponse.from_json(json)
21 | # print the JSON string representation of the object
22 | print(GithubOauthSuccessResponse.to_json())
23 |
24 | # convert the object into a dict
25 | github_oauth_success_response_dict = github_oauth_success_response_instance.to_dict()
26 | # create an instance of GithubOauthSuccessResponse from a dict
27 | github_oauth_success_response_from_dict = GithubOauthSuccessResponse.from_dict(github_oauth_success_response_dict)
28 | ```
29 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30 |
31 |
32 |
--------------------------------------------------------------------------------
/sdks/python/docs/HTTPValidationError.md:
--------------------------------------------------------------------------------
1 | # HTTPValidationError
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **detail** | [**List[ValidationError]**](ValidationError.md) | | [optional]
9 |
10 | ## Example
11 |
12 | ```python
13 | from klavis.models.http_validation_error import HTTPValidationError
14 |
15 | # TODO update the JSON string below
16 | json = "{}"
17 | # create an instance of HTTPValidationError from a JSON string
18 | http_validation_error_instance = HTTPValidationError.from_json(json)
19 | # print the JSON string representation of the object
20 | print(HTTPValidationError.to_json())
21 |
22 | # convert the object into a dict
23 | http_validation_error_dict = http_validation_error_instance.to_dict()
24 | # create an instance of HTTPValidationError from a dict
25 | http_validation_error_from_dict = HTTPValidationError.from_dict(http_validation_error_dict)
26 | ```
27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sdks/python/docs/JiraOauthErrorResponse.md:
--------------------------------------------------------------------------------
1 | # JiraOauthErrorResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **error** | **str** | Error message from the OAuth process |
9 |
10 | ## Example
11 |
12 | ```python
13 | from klavis.models.jira_oauth_error_response import JiraOauthErrorResponse
14 |
15 | # TODO update the JSON string below
16 | json = "{}"
17 | # create an instance of JiraOauthErrorResponse from a JSON string
18 | jira_oauth_error_response_instance = JiraOauthErrorResponse.from_json(json)
19 | # print the JSON string representation of the object
20 | print(JiraOauthErrorResponse.to_json())
21 |
22 | # convert the object into a dict
23 | jira_oauth_error_response_dict = jira_oauth_error_response_instance.to_dict()
24 | # create an instance of JiraOauthErrorResponse from a dict
25 | jira_oauth_error_response_from_dict = JiraOauthErrorResponse.from_dict(jira_oauth_error_response_dict)
26 | ```
27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sdks/python/docs/JiraOauthSuccessResponse.md:
--------------------------------------------------------------------------------
1 | # JiraOauthSuccessResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **status** | **str** | Status of the OAuth process | [optional] [default to 'success']
9 | **message** | **str** | Success message |
10 |
11 | ## Example
12 |
13 | ```python
14 | from klavis.models.jira_oauth_success_response import JiraOauthSuccessResponse
15 |
16 | # TODO update the JSON string below
17 | json = "{}"
18 | # create an instance of JiraOauthSuccessResponse from a JSON string
19 | jira_oauth_success_response_instance = JiraOauthSuccessResponse.from_json(json)
20 | # print the JSON string representation of the object
21 | print(JiraOauthSuccessResponse.to_json())
22 |
23 | # convert the object into a dict
24 | jira_oauth_success_response_dict = jira_oauth_success_response_instance.to_dict()
25 | # create an instance of JiraOauthSuccessResponse from a dict
26 | jira_oauth_success_response_from_dict = JiraOauthSuccessResponse.from_dict(jira_oauth_success_response_dict)
27 | ```
28 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/sdks/python/docs/ListToolResponse.md:
--------------------------------------------------------------------------------
1 | # ListToolResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **success** | **bool** | Whether the list tools request was successful |
9 | **tools** | **List[object]** | List of tools available for the MCP server |
10 |
11 | ## Example
12 |
13 | ```python
14 | from klavis.models.list_tool_response import ListToolResponse
15 |
16 | # TODO update the JSON string below
17 | json = "{}"
18 | # create an instance of ListToolResponse from a JSON string
19 | list_tool_response_instance = ListToolResponse.from_json(json)
20 | # print the JSON string representation of the object
21 | print(ListToolResponse.to_json())
22 |
23 | # convert the object into a dict
24 | list_tool_response_dict = list_tool_response_instance.to_dict()
25 | # create an instance of ListToolResponse from a dict
26 | list_tool_response_from_dict = ListToolResponse.from_dict(list_tool_response_dict)
27 | ```
28 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/sdks/python/docs/McpServer.md:
--------------------------------------------------------------------------------
1 | # McpServer
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **id** | **str** | |
9 | **name** | **str** | |
10 | **description** | **str** | | [optional]
11 | **tools** | [**List[ServerTool]**](ServerTool.md) | | [optional]
12 |
13 | ## Example
14 |
15 | ```python
16 | from klavis.models.mcp_server import McpServer
17 |
18 | # TODO update the JSON string below
19 | json = "{}"
20 | # create an instance of McpServer from a JSON string
21 | mcp_server_instance = McpServer.from_json(json)
22 | # print the JSON string representation of the object
23 | print(McpServer.to_json())
24 |
25 | # convert the object into a dict
26 | mcp_server_dict = mcp_server_instance.to_dict()
27 | # create an instance of McpServer from a dict
28 | mcp_server_from_dict = McpServer.from_dict(mcp_server_dict)
29 | ```
30 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
31 |
32 |
33 |
--------------------------------------------------------------------------------
/sdks/python/docs/NotionOauthErrorResponse.md:
--------------------------------------------------------------------------------
1 | # NotionOauthErrorResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **error** | **str** | Error message from the OAuth process |
9 |
10 | ## Example
11 |
12 | ```python
13 | from klavis.models.notion_oauth_error_response import NotionOauthErrorResponse
14 |
15 | # TODO update the JSON string below
16 | json = "{}"
17 | # create an instance of NotionOauthErrorResponse from a JSON string
18 | notion_oauth_error_response_instance = NotionOauthErrorResponse.from_json(json)
19 | # print the JSON string representation of the object
20 | print(NotionOauthErrorResponse.to_json())
21 |
22 | # convert the object into a dict
23 | notion_oauth_error_response_dict = notion_oauth_error_response_instance.to_dict()
24 | # create an instance of NotionOauthErrorResponse from a dict
25 | notion_oauth_error_response_from_dict = NotionOauthErrorResponse.from_dict(notion_oauth_error_response_dict)
26 | ```
27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sdks/python/docs/NotionOauthSuccessResponse.md:
--------------------------------------------------------------------------------
1 | # NotionOauthSuccessResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **status** | **str** | Status of the OAuth process | [optional] [default to 'success']
9 | **message** | **str** | Success message |
10 |
11 | ## Example
12 |
13 | ```python
14 | from klavis.models.notion_oauth_success_response import NotionOauthSuccessResponse
15 |
16 | # TODO update the JSON string below
17 | json = "{}"
18 | # create an instance of NotionOauthSuccessResponse from a JSON string
19 | notion_oauth_success_response_instance = NotionOauthSuccessResponse.from_json(json)
20 | # print the JSON string representation of the object
21 | print(NotionOauthSuccessResponse.to_json())
22 |
23 | # convert the object into a dict
24 | notion_oauth_success_response_dict = notion_oauth_success_response_instance.to_dict()
25 | # create an instance of NotionOauthSuccessResponse from a dict
26 | notion_oauth_success_response_from_dict = NotionOauthSuccessResponse.from_dict(notion_oauth_success_response_dict)
27 | ```
28 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/sdks/python/docs/ServerName.md:
--------------------------------------------------------------------------------
1 | # ServerName
2 |
3 |
4 | ## Enum
5 |
6 | * `MARKDOWN2DOC` (value: `'Markdown2doc'`)
7 |
8 | * `SLACK` (value: `'Slack'`)
9 |
10 | * `SUPABASE` (value: `'Supabase'`)
11 |
12 | * `POSTGRES` (value: `'Postgres'`)
13 |
14 | * `YOUTUBE` (value: `'YouTube'`)
15 |
16 | * `DOC2MARKDOWN` (value: `'Doc2markdown'`)
17 |
18 | * `KLAVIS_REPORTGEN` (value: `'Klavis ReportGen'`)
19 |
20 | * `RESEND` (value: `'Resend'`)
21 |
22 | * `DISCORD` (value: `'Discord'`)
23 |
24 | * `FIRECRAWL_WEB_SEARCH` (value: `'Firecrawl Web Search'`)
25 |
26 | * `GITHUB` (value: `'GitHub'`)
27 |
28 | * `FIRECRAWL_DEEP_RESEARCH` (value: `'Firecrawl Deep Research'`)
29 |
30 | * `JIRA` (value: `'Jira'`)
31 |
32 | * `WORDPRESS` (value: `'WordPress'`)
33 |
34 | * `NOTION` (value: `'Notion'`)
35 |
36 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
37 |
38 |
39 |
--------------------------------------------------------------------------------
/sdks/python/docs/ServerTool.md:
--------------------------------------------------------------------------------
1 | # ServerTool
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **name** | **str** | |
9 | **description** | **str** | |
10 |
11 | ## Example
12 |
13 | ```python
14 | from klavis.models.server_tool import ServerTool
15 |
16 | # TODO update the JSON string below
17 | json = "{}"
18 | # create an instance of ServerTool from a JSON string
19 | server_tool_instance = ServerTool.from_json(json)
20 | # print the JSON string representation of the object
21 | print(ServerTool.to_json())
22 |
23 | # convert the object into a dict
24 | server_tool_dict = server_tool_instance.to_dict()
25 | # create an instance of ServerTool from a dict
26 | server_tool_from_dict = ServerTool.from_dict(server_tool_dict)
27 | ```
28 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/sdks/python/docs/SetAuthTokenRequest.md:
--------------------------------------------------------------------------------
1 | # SetAuthTokenRequest
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **instance_id** | **str** | The unique identifier for the connection instance |
9 | **auth_token** | **str** | The authentication token to save |
10 |
11 | ## Example
12 |
13 | ```python
14 | from klavis.models.set_auth_token_request import SetAuthTokenRequest
15 |
16 | # TODO update the JSON string below
17 | json = "{}"
18 | # create an instance of SetAuthTokenRequest from a JSON string
19 | set_auth_token_request_instance = SetAuthTokenRequest.from_json(json)
20 | # print the JSON string representation of the object
21 | print(SetAuthTokenRequest.to_json())
22 |
23 | # convert the object into a dict
24 | set_auth_token_request_dict = set_auth_token_request_instance.to_dict()
25 | # create an instance of SetAuthTokenRequest from a dict
26 | set_auth_token_request_from_dict = SetAuthTokenRequest.from_dict(set_auth_token_request_dict)
27 | ```
28 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/sdks/python/docs/SlackOauthErrorResponse.md:
--------------------------------------------------------------------------------
1 | # SlackOauthErrorResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **error** | **str** | Error message from the OAuth process |
9 |
10 | ## Example
11 |
12 | ```python
13 | from klavis.models.slack_oauth_error_response import SlackOauthErrorResponse
14 |
15 | # TODO update the JSON string below
16 | json = "{}"
17 | # create an instance of SlackOauthErrorResponse from a JSON string
18 | slack_oauth_error_response_instance = SlackOauthErrorResponse.from_json(json)
19 | # print the JSON string representation of the object
20 | print(SlackOauthErrorResponse.to_json())
21 |
22 | # convert the object into a dict
23 | slack_oauth_error_response_dict = slack_oauth_error_response_instance.to_dict()
24 | # create an instance of SlackOauthErrorResponse from a dict
25 | slack_oauth_error_response_from_dict = SlackOauthErrorResponse.from_dict(slack_oauth_error_response_dict)
26 | ```
27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sdks/python/docs/SlackOauthSuccessResponse.md:
--------------------------------------------------------------------------------
1 | # SlackOauthSuccessResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **status** | **str** | Status of the OAuth process | [optional] [default to 'success']
9 | **message** | **str** | Success message |
10 |
11 | ## Example
12 |
13 | ```python
14 | from klavis.models.slack_oauth_success_response import SlackOauthSuccessResponse
15 |
16 | # TODO update the JSON string below
17 | json = "{}"
18 | # create an instance of SlackOauthSuccessResponse from a JSON string
19 | slack_oauth_success_response_instance = SlackOauthSuccessResponse.from_json(json)
20 | # print the JSON string representation of the object
21 | print(SlackOauthSuccessResponse.to_json())
22 |
23 | # convert the object into a dict
24 | slack_oauth_success_response_dict = slack_oauth_success_response_instance.to_dict()
25 | # create an instance of SlackOauthSuccessResponse from a dict
26 | slack_oauth_success_response_from_dict = SlackOauthSuccessResponse.from_dict(slack_oauth_success_response_dict)
27 | ```
28 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/sdks/python/docs/StatusResponse.md:
--------------------------------------------------------------------------------
1 | # StatusResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **success** | **bool** | |
9 | **message** | **str** | | [optional]
10 |
11 | ## Example
12 |
13 | ```python
14 | from klavis.models.status_response import StatusResponse
15 |
16 | # TODO update the JSON string below
17 | json = "{}"
18 | # create an instance of StatusResponse from a JSON string
19 | status_response_instance = StatusResponse.from_json(json)
20 | # print the JSON string representation of the object
21 | print(StatusResponse.to_json())
22 |
23 | # convert the object into a dict
24 | status_response_dict = status_response_instance.to_dict()
25 | # create an instance of StatusResponse from a dict
26 | status_response_from_dict = StatusResponse.from_dict(status_response_dict)
27 | ```
28 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/sdks/python/docs/SupabaseOauthErrorResponse.md:
--------------------------------------------------------------------------------
1 | # SupabaseOauthErrorResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **error** | **str** | Error message from the OAuth process |
9 |
10 | ## Example
11 |
12 | ```python
13 | from klavis.models.supabase_oauth_error_response import SupabaseOauthErrorResponse
14 |
15 | # TODO update the JSON string below
16 | json = "{}"
17 | # create an instance of SupabaseOauthErrorResponse from a JSON string
18 | supabase_oauth_error_response_instance = SupabaseOauthErrorResponse.from_json(json)
19 | # print the JSON string representation of the object
20 | print(SupabaseOauthErrorResponse.to_json())
21 |
22 | # convert the object into a dict
23 | supabase_oauth_error_response_dict = supabase_oauth_error_response_instance.to_dict()
24 | # create an instance of SupabaseOauthErrorResponse from a dict
25 | supabase_oauth_error_response_from_dict = SupabaseOauthErrorResponse.from_dict(supabase_oauth_error_response_dict)
26 | ```
27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sdks/python/docs/SupabaseOauthSuccessResponse.md:
--------------------------------------------------------------------------------
1 | # SupabaseOauthSuccessResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **status** | **str** | Status of the OAuth process | [optional] [default to 'success']
9 | **message** | **str** | Success message |
10 |
11 | ## Example
12 |
13 | ```python
14 | from klavis.models.supabase_oauth_success_response import SupabaseOauthSuccessResponse
15 |
16 | # TODO update the JSON string below
17 | json = "{}"
18 | # create an instance of SupabaseOauthSuccessResponse from a JSON string
19 | supabase_oauth_success_response_instance = SupabaseOauthSuccessResponse.from_json(json)
20 | # print the JSON string representation of the object
21 | print(SupabaseOauthSuccessResponse.to_json())
22 |
23 | # convert the object into a dict
24 | supabase_oauth_success_response_dict = supabase_oauth_success_response_instance.to_dict()
25 | # create an instance of SupabaseOauthSuccessResponse from a dict
26 | supabase_oauth_success_response_from_dict = SupabaseOauthSuccessResponse.from_dict(supabase_oauth_success_response_dict)
27 | ```
28 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/sdks/python/docs/ValidationError.md:
--------------------------------------------------------------------------------
1 | # ValidationError
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **loc** | [**List[ValidationErrorLocInner]**](ValidationErrorLocInner.md) | |
9 | **msg** | **str** | |
10 | **type** | **str** | |
11 |
12 | ## Example
13 |
14 | ```python
15 | from klavis.models.validation_error import ValidationError
16 |
17 | # TODO update the JSON string below
18 | json = "{}"
19 | # create an instance of ValidationError from a JSON string
20 | validation_error_instance = ValidationError.from_json(json)
21 | # print the JSON string representation of the object
22 | print(ValidationError.to_json())
23 |
24 | # convert the object into a dict
25 | validation_error_dict = validation_error_instance.to_dict()
26 | # create an instance of ValidationError from a dict
27 | validation_error_from_dict = ValidationError.from_dict(validation_error_dict)
28 | ```
29 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30 |
31 |
32 |
--------------------------------------------------------------------------------
/sdks/python/docs/ValidationErrorLocInner.md:
--------------------------------------------------------------------------------
1 | # ValidationErrorLocInner
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 |
9 | ## Example
10 |
11 | ```python
12 | from klavis.models.validation_error_loc_inner import ValidationErrorLocInner
13 |
14 | # TODO update the JSON string below
15 | json = "{}"
16 | # create an instance of ValidationErrorLocInner from a JSON string
17 | validation_error_loc_inner_instance = ValidationErrorLocInner.from_json(json)
18 | # print the JSON string representation of the object
19 | print(ValidationErrorLocInner.to_json())
20 |
21 | # convert the object into a dict
22 | validation_error_loc_inner_dict = validation_error_loc_inner_instance.to_dict()
23 | # create an instance of ValidationErrorLocInner from a dict
24 | validation_error_loc_inner_from_dict = ValidationErrorLocInner.from_dict(validation_error_loc_inner_dict)
25 | ```
26 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
27 |
28 |
29 |
--------------------------------------------------------------------------------
/sdks/python/docs/WhiteLabelServerName.md:
--------------------------------------------------------------------------------
1 | # WhiteLabelServerName
2 |
3 |
4 | ## Enum
5 |
6 | * `SLACK` (value: `'Slack'`)
7 |
8 | * `SUPABASE` (value: `'Supabase'`)
9 |
10 | * `NOTION` (value: `'Notion'`)
11 |
12 | * `GITHUB` (value: `'GitHub'`)
13 |
14 | * `JIRA` (value: `'Jira'`)
15 |
16 | * `WORDPRESS` (value: `'WordPress'`)
17 |
18 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
19 |
20 |
21 |
--------------------------------------------------------------------------------
/sdks/python/docs/WhiteLabelingResponse.md:
--------------------------------------------------------------------------------
1 | # WhiteLabelingResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **success** | **bool** | Whether the operation was successful |
9 | **data** | **Dict[str, object]** | | [optional]
10 | **message** | **str** | | [optional]
11 |
12 | ## Example
13 |
14 | ```python
15 | from klavis.models.white_labeling_response import WhiteLabelingResponse
16 |
17 | # TODO update the JSON string below
18 | json = "{}"
19 | # create an instance of WhiteLabelingResponse from a JSON string
20 | white_labeling_response_instance = WhiteLabelingResponse.from_json(json)
21 | # print the JSON string representation of the object
22 | print(WhiteLabelingResponse.to_json())
23 |
24 | # convert the object into a dict
25 | white_labeling_response_dict = white_labeling_response_instance.to_dict()
26 | # create an instance of WhiteLabelingResponse from a dict
27 | white_labeling_response_from_dict = WhiteLabelingResponse.from_dict(white_labeling_response_dict)
28 | ```
29 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30 |
31 |
32 |
--------------------------------------------------------------------------------
/sdks/python/docs/WordpressOauthErrorResponse.md:
--------------------------------------------------------------------------------
1 | # WordpressOauthErrorResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **error** | **str** | Error message from the OAuth process |
9 |
10 | ## Example
11 |
12 | ```python
13 | from klavis.models.wordpress_oauth_error_response import WordpressOauthErrorResponse
14 |
15 | # TODO update the JSON string below
16 | json = "{}"
17 | # create an instance of WordpressOauthErrorResponse from a JSON string
18 | wordpress_oauth_error_response_instance = WordpressOauthErrorResponse.from_json(json)
19 | # print the JSON string representation of the object
20 | print(WordpressOauthErrorResponse.to_json())
21 |
22 | # convert the object into a dict
23 | wordpress_oauth_error_response_dict = wordpress_oauth_error_response_instance.to_dict()
24 | # create an instance of WordpressOauthErrorResponse from a dict
25 | wordpress_oauth_error_response_from_dict = WordpressOauthErrorResponse.from_dict(wordpress_oauth_error_response_dict)
26 | ```
27 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sdks/python/docs/WordpressOauthSuccessResponse.md:
--------------------------------------------------------------------------------
1 | # WordpressOauthSuccessResponse
2 |
3 |
4 | ## Properties
5 |
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **status** | **str** | Status of the OAuth process | [optional] [default to 'success']
9 | **message** | **str** | Success message |
10 |
11 | ## Example
12 |
13 | ```python
14 | from klavis.models.wordpress_oauth_success_response import WordpressOauthSuccessResponse
15 |
16 | # TODO update the JSON string below
17 | json = "{}"
18 | # create an instance of WordpressOauthSuccessResponse from a JSON string
19 | wordpress_oauth_success_response_instance = WordpressOauthSuccessResponse.from_json(json)
20 | # print the JSON string representation of the object
21 | print(WordpressOauthSuccessResponse.to_json())
22 |
23 | # convert the object into a dict
24 | wordpress_oauth_success_response_dict = wordpress_oauth_success_response_instance.to_dict()
25 | # create an instance of WordpressOauthSuccessResponse from a dict
26 | wordpress_oauth_success_response_from_dict = WordpressOauthSuccessResponse.from_dict(wordpress_oauth_success_response_dict)
27 | ```
28 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29 |
30 |
31 |
--------------------------------------------------------------------------------
/sdks/python/klavis/api/__init__.py:
--------------------------------------------------------------------------------
1 | # flake8: noqa
2 |
3 | # import apis into api package
4 | from klavis.api.github_oauth_api import GithubOauthApi
5 | from klavis.api.jira_oauth_api import JiraOauthApi
6 | from klavis.api.mcp_server_api import McpServerApi
7 | from klavis.api.notion_oauth_api import NotionOauthApi
8 | from klavis.api.slack_oauth_api import SlackOauthApi
9 | from klavis.api.supabase_oauth_api import SupabaseOauthApi
10 | from klavis.api.white_labeling_api import WhiteLabelingApi
11 | from klavis.api.wordpress_oauth_api import WordpressOauthApi
12 |
13 |
--------------------------------------------------------------------------------
/sdks/python/klavis/api_response.py:
--------------------------------------------------------------------------------
1 | """API response object."""
2 |
3 | from __future__ import annotations
4 | from typing import Optional, Generic, Mapping, TypeVar
5 | from pydantic import Field, StrictInt, StrictBytes, BaseModel
6 |
7 | T = TypeVar("T")
8 |
9 | class ApiResponse(BaseModel, Generic[T]):
10 | """
11 | API response object
12 | """
13 |
14 | status_code: StrictInt = Field(description="HTTP status code")
15 | headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers")
16 | data: T = Field(description="Deserialized data given the data type")
17 | raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
18 |
19 | model_config = {
20 | "arbitrary_types_allowed": True
21 | }
22 |
--------------------------------------------------------------------------------
/sdks/python/klavis/models/server_name.py:
--------------------------------------------------------------------------------
1 | # coding: utf-8
2 |
3 | """
4 | Klavis AI (https://www.klavis.ai)
5 |
6 | Klavis AI - Open Source MCP Integrations for AI Applications
7 |
8 | The version of the OpenAPI document: 0.1.0
9 | Contact: connect@klavis.ai
10 | Generated by OpenAPI Generator (https://openapi-generator.tech)
11 |
12 | Do not edit the class manually.
13 | """ # noqa: E501
14 |
15 |
16 | from __future__ import annotations
17 | import json
18 | from enum import Enum
19 | from typing_extensions import Self
20 |
21 |
22 | class ServerName(str, Enum):
23 | """
24 | ServerName
25 | """
26 |
27 | """
28 | allowed enum values
29 | """
30 | MARKDOWN2DOC = 'Markdown2doc'
31 | SLACK = 'Slack'
32 | SUPABASE = 'Supabase'
33 | POSTGRES = 'Postgres'
34 | YOUTUBE = 'YouTube'
35 | DOC2MARKDOWN = 'Doc2markdown'
36 | KLAVIS_REPORTGEN = 'Klavis ReportGen'
37 | RESEND = 'Resend'
38 | DISCORD = 'Discord'
39 | FIRECRAWL_WEB_SEARCH = 'Firecrawl Web Search'
40 | GITHUB = 'GitHub'
41 | FIRECRAWL_DEEP_RESEARCH = 'Firecrawl Deep Research'
42 | JIRA = 'Jira'
43 | WORDPRESS = 'WordPress'
44 | NOTION = 'Notion'
45 |
46 | @classmethod
47 | def from_json(cls, json_str: str) -> Self:
48 | """Create an instance of ServerName from a JSON string"""
49 | return cls(json.loads(json_str))
50 |
51 |
52 |
--------------------------------------------------------------------------------
/sdks/python/klavis/models/white_label_server_name.py:
--------------------------------------------------------------------------------
1 | # coding: utf-8
2 |
3 | """
4 | Klavis AI (https://www.klavis.ai)
5 |
6 | Klavis AI - Open Source MCP Integrations for AI Applications
7 |
8 | The version of the OpenAPI document: 0.1.0
9 | Contact: connect@klavis.ai
10 | Generated by OpenAPI Generator (https://openapi-generator.tech)
11 |
12 | Do not edit the class manually.
13 | """ # noqa: E501
14 |
15 |
16 | from __future__ import annotations
17 | import json
18 | from enum import Enum
19 | from typing_extensions import Self
20 |
21 |
22 | class WhiteLabelServerName(str, Enum):
23 | """
24 | WhiteLabelServerName
25 | """
26 |
27 | """
28 | allowed enum values
29 | """
30 | SLACK = 'Slack'
31 | SUPABASE = 'Supabase'
32 | NOTION = 'Notion'
33 | GITHUB = 'GitHub'
34 | JIRA = 'Jira'
35 | WORDPRESS = 'WordPress'
36 |
37 | @classmethod
38 | def from_json(cls, json_str: str) -> Self:
39 | """Create an instance of WhiteLabelServerName from a JSON string"""
40 | return cls(json.loads(json_str))
41 |
42 |
43 |
--------------------------------------------------------------------------------
/sdks/python/klavis/py.typed:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/sdks/python/klavis/py.typed
--------------------------------------------------------------------------------
/sdks/python/requirements.txt:
--------------------------------------------------------------------------------
1 | urllib3 >= 2.1.0, < 3.0.0
2 | python_dateutil >= 2.8.2
3 | pydantic >= 2
4 | typing-extensions >= 4.7.1
5 |
--------------------------------------------------------------------------------
/sdks/python/setup.cfg:
--------------------------------------------------------------------------------
1 | [flake8]
2 | max-line-length=99
3 |
--------------------------------------------------------------------------------
/sdks/python/setup.py:
--------------------------------------------------------------------------------
1 | # coding: utf-8
2 |
3 | """
4 | Klavis AI (https://www.klavis.ai)
5 |
6 | Klavis AI - Open Source MCP Integrations for AI Applications
7 |
8 | The version of the OpenAPI document: 0.1.0
9 | Contact: connect@klavis.ai
10 | Generated by OpenAPI Generator (https://openapi-generator.tech)
11 |
12 | Do not edit the class manually.
13 | """ # noqa: E501
14 |
15 |
16 | from setuptools import setup, find_packages # noqa: H301
17 | from pathlib import Path
18 |
19 | # To install the library, run the following
20 | #
21 | # python setup.py install
22 | #
23 | # prerequisite: setuptools
24 | # http://pypi.python.org/pypi/setuptools
25 | NAME = "klavis"
26 | VERSION = "0.1.2"
27 | PYTHON_REQUIRES = ">= 3.9"
28 | REQUIRES = [
29 | "urllib3 >= 2.1.0, < 3.0.0",
30 | "python-dateutil >= 2.8.2",
31 | "pydantic >= 2",
32 | "typing-extensions >= 4.7.1",
33 | ]
34 |
35 | this_directory = Path(__file__).parent
36 | long_description = (this_directory / "README.md").read_text()
37 |
38 | setup(
39 | name=NAME,
40 | version=VERSION,
41 | description="Klavis AI (https://www.klavis.ai)",
42 | author="Klavis AI",
43 | author_email="connect@klavis.ai",
44 | url="",
45 | keywords=["MCP", "AI", "LLM", "Klavis", "Klavis AI"],
46 | install_requires=REQUIRES,
47 | packages=find_packages(exclude=["test", "tests"]),
48 | include_package_data=True,
49 | license="MIT",
50 | long_description_content_type='text/markdown',
51 | long_description=long_description,
52 | package_data={"klavis": ["py.typed"]},
53 | )
--------------------------------------------------------------------------------
/sdks/python/test-requirements.txt:
--------------------------------------------------------------------------------
1 | pytest >= 7.2.1
2 | pytest-cov >= 2.8.1
3 | tox >= 3.9.0
4 | flake8 >= 4.0.0
5 | types-python-dateutil >= 2.8.19.14
6 | mypy >= 1.5
7 |
--------------------------------------------------------------------------------
/sdks/python/tox.ini:
--------------------------------------------------------------------------------
1 | [tox]
2 | envlist = py3
3 |
4 | [testenv]
5 | deps=-r{toxinidir}/requirements.txt
6 | -r{toxinidir}/test-requirements.txt
7 |
8 | commands=
9 | pytest --cov=klavis
10 |
--------------------------------------------------------------------------------
/static/klavis-ai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Klavis-AI/klavis/c3a0793edc5fc56206e522adec0da9cf1c298b03/static/klavis-ai.png
--------------------------------------------------------------------------------