-
Notifications
You must be signed in to change notification settings - Fork 71
Readme Polish + License #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2025 Polygon.io | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,17 @@ | ||
| <a href="https://polygon.io"> | ||
| <div align="center"> | ||
| <picture> | ||
| <source media="(prefers-color-scheme: light)" srcset="assets/polygon_banner_lightmode.png"> | ||
| <source media="(prefers-color-scheme: dark)" srcset="assets/polygon_banner_darkmode.png"> | ||
| <img alt="Polygon.io logo" src="assets/polygon_banner_lightmode.png" height="100"> | ||
| </picture> | ||
| </div> | ||
| </a> | ||
| <br> | ||
|
|
||
| > [!IMPORTANT] | ||
| > :test_tube: This project is experimental and could be subject to breaking changes. | ||
|
|
||
| # Polygon.io MCP Server | ||
|
|
||
| A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that provides access to [Polygon.io](https://polygon.io) financial market data API through an LLM-friendly interface. | ||
|
|
@@ -19,26 +33,55 @@ This server exposes all Polygon.io API endpoints as MCP tools, providing access | |
| ### Prerequisites | ||
|
|
||
| - Python 3.8+ | ||
| - A Polygon.io API key ([Get one here](https://polygon.io)) | ||
| - A Polygon.io API key <br> [![Button]][Link] | ||
| - [Astral UV](https://docs.astral.sh/uv/getting-started/installation/) | ||
| - For existing installs, check that you have a version that supports the `uvx` command. | ||
|
|
||
| ### Direct Installation | ||
| ### Claude Code | ||
|
|
||
| ```bash | ||
| # Install dependencies | ||
| uv sync | ||
|
|
||
| # Run the server | ||
| POLYGON_API_KEY=your_api_key_here uv run mcp_polygon | ||
| ``` | ||
|
|
||
| ### Integration with Claude | ||
|
|
||
| For Claude users, you can add the Polygon MCP server: | ||
| Use the following command to add the Polygon MCP server to your local environment. | ||
|
|
||
| ```bash | ||
| # Claude CLI | ||
| claude mcp add polygon -e POLYGON_API_KEY=your_api_key_here -- uv run /path/to/mcp_polygon/entrypoint.py | ||
| ``` | ||
| This command will install the MCP server in your current project. | ||
| If you want to install it globally, you can run the command with `-s <scope>` flag. | ||
| See `claude mcp add --help` for more options. | ||
|
Comment on lines
+48
to
+50
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By default the MCP is added to
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah nice find! |
||
|
|
||
| You can also run `claude mcp add-from-claude-desktop` if the MCP server is installed already for Claude Desktop. | ||
|
|
||
| ### Claude Desktop | ||
|
|
||
| 1. Follow the [Claude Desktop MCP installation instructions](https://modelcontextprotocol.io/quickstart/user) to complete the initial installation and find your configuration file. | ||
| 1. Use the following example as reference to add Polygon's MCP server. | ||
| Make sure you complete the various fields. | ||
| 1. Path find your path to `uvx`, run `which uvx` in your terminal. | ||
| 2. Replace `<your_api_key_here>` with your actual Polygon.io API key. | ||
| 3. Replace `<your_home_directory>` with your home directory path, e.g., `/home/username` (Mac/Linux) or `C:\Users\username` (Windows). | ||
|
|
||
| <details> | ||
| <summary>claude_desktop_config.json</summary> | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "polygon": { | ||
| "command": "<path_to_your_uvx_install>/uvx", | ||
| "args": [ | ||
| "--from", | ||
| "git+https://github.com/polygon-io/mcp_polygon@master", | ||
| "mcp_polygon" | ||
| ], | ||
| "env": { | ||
| "POLYGON_API_KEY": "<your_api_key_here>", | ||
| "HOME": "<your_home_directory>" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this was only needed because the repo is private, so we might be able to remove later. |
||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| </details> | ||
|
|
||
| ## Usage Examples | ||
|
|
||
|
|
@@ -66,22 +109,18 @@ This MCP server implements all Polygon.io API endpoints as tools, including: | |
|
|
||
| Each tool follows the Polygon.io SDK parameter structure while converting responses to standard JSON that LLMs can easily process. | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### Environment Variables | ||
|
|
||
| - `POLYGON_API_KEY` (required): Your Polygon.io API key | ||
|
|
||
|
Comment on lines
-69
to
-74
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made a few edits like this just to make things more concise. |
||
| ## Development | ||
|
|
||
| ### Building and Publishing | ||
| ### Running Locally | ||
|
|
||
| Check to ensure you have the [Prerequisites](#prerequisites) installed. | ||
|
|
||
| ```bash | ||
| # Sync dependencies | ||
| uv sync | ||
|
|
||
| # Build package distributions | ||
| uv build | ||
| # Run the server | ||
| POLYGON_API_KEY=your_api_key_here uv run mcp_polygon | ||
| ``` | ||
|
|
||
| ### Debugging | ||
|
|
@@ -94,12 +133,18 @@ npx @modelcontextprotocol/inspector uv --directory /path/to/mcp_polygon run mcp_ | |
|
|
||
| This will launch a browser interface where you can interact with your MCP server directly and see input/output for each tool. | ||
|
|
||
| ## License | ||
|
|
||
| [License information] | ||
|
|
||
| ## Links | ||
|
|
||
| - [Polygon.io Documentation](https://polygon.io/docs) | ||
| - [Model Context Protocol](https://modelcontextprotocol.io) | ||
| - [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) | ||
|
|
||
| ## Contributing | ||
| If you found a bug or have an idea for a new feature, please first discuss it with us by submitting a new issue. | ||
| We will respond to issues within at most 3 weeks. | ||
| We're also open to volunteers if you want to submit a PR for any open issues but please discuss it with us beforehand. | ||
| PRs that aren't linked to an existing issue or discussed with us ahead of time will generally be declined. | ||
|
Comment on lines
+141
to
+145
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also borrowed from the SDK readmes |
||
|
|
||
| <!-----------------------------------------------------------------------------> | ||
| [Link]: https://polygon.io 'Polygon.io Home Page' | ||
| <!---------------------------------[ Buttons ]---------------------------------> | ||
| [Button]: https://img.shields.io/badge/Get_One_For_Free-5F5CFF?style=for-the-badge&logoColor=white | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used MIT because all the SDKs are licensed that way.