Skip to content

Commit cf5343b

Browse files
authored
SWI-8019 Create Bandwidth MCP Server (#1)
* SWI-8019 First Pass at MCP * switch from filtering apis to tools and update server * move for `uv` and update readme * refactor * cleanup * update gitignore * add pytest * changes for tests * servers unit tests * add test workflow * pytest-asyncio not necessary for now * remove some unnecessary error handling * add pytest-httpx * use mocking and update unit tests * test wf * add black for code formatting * format src with black * format test with black * add use cases guide * period * fix imports for tests * add eums * update use cases guide * update config * readme updates * readme * readme and use cases updates * update test command in wf * add pytest async req * add encoding to file open for mocks * format * update links to repo * remove untested hint
1 parent 6f27082 commit cf5343b

26 files changed

+8494
-5
lines changed

.bandwidth/catalog-info.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ apiVersion: backstage.io/v1alpha1
22
kind: Location
33
metadata:
44
schemaVersion: v1.0.0
5-
name: bandwidth-mcp-server-location
6-
description: Links to additional entities in the bandwidth-mcp-server repository.
5+
name: mcp-server-location
6+
description: Links to additional entities in the mcp-server repository.
77
annotations:
8-
github.com/project-slug: Bandwidth/bandwidth-mcp-server
8+
github.com/project-slug: Bandwidth/mcp-server
99
spec:
1010
targets:
1111
- ./component.yaml

.bandwidth/component.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ apiVersion: backstage.io/v1alpha1
22
kind: Component
33
metadata:
44
schemaVersion: v1.0.0
5-
name: bandwidth-mcp-server
5+
name: mcp-server
66
description: Official Bandwidth MCP Server
77
annotations:
8-
github.com/project-slug: Bandwidth/bandwidth-mcp-server
8+
github.com/project-slug: Bandwidth/mcp-server
99
organization: BW
1010
costCenter: Development - Software Infra
1111
platformType:

.github/workflows/test-pr.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Test PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
test:
14+
name: Test PR
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [windows-2025, ubuntu-24.04]
19+
python-version: ['3.10', '3.11', '3.12', '3.13']
20+
fail-fast: false
21+
env:
22+
PYTHON_VERSION: ${{ matrix.python-version }}
23+
OPERATING_SYSTEM: ${{ matrix.os }}
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
34+
- name: Install Packages and Test
35+
run: |
36+
pip install -r requirements.txt
37+
pip install -r dev-requirements.txt
38+
python -m pytest -v

.gitignore

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[codz]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
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+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# Installer logs
30+
pip-log.txt
31+
pip-delete-this-directory.txt
32+
33+
# Unit test / coverage reports
34+
htmlcov/
35+
.tox/
36+
.nox/
37+
.coverage
38+
.coverage.*
39+
.cache
40+
nosetests.xml
41+
coverage.xml
42+
*.cover
43+
*.py.cover
44+
.hypothesis/
45+
.pytest_cache/
46+
cover/
47+
48+
# uv
49+
uv.lock
50+
51+
# pyenv
52+
# For a library or package, you might want to ignore these files since the code is
53+
# intended to run in multiple environments; otherwise, check them in:
54+
# .python-version
55+
56+
# pipenv
57+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
58+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
59+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
60+
# install all needed dependencies.
61+
#Pipfile.lock
62+
63+
# poetry
64+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
65+
# This is especially recommended for binary packages to ensure reproducibility, and is more
66+
# commonly ignored for libraries.
67+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
68+
#poetry.lock
69+
#poetry.toml
70+
71+
# Environments
72+
.env
73+
.envrc
74+
.venv
75+
env/
76+
venv/
77+
ENV/
78+
env.bak/
79+
venv.bak/
80+
81+
# PyCharm
82+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
83+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
84+
# and can be added to the global gitignore or merged into this file. For a more nuclear
85+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
86+
#.idea/
87+
88+
# Visual Studio Code
89+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
90+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
91+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
92+
# you could uncomment the following to ignore the entire vscode folder
93+
# .vscode/

0 commit comments

Comments
 (0)